Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Persistency::DistributedAccessRepositoryInFile::LoadQuids ( DistributedAccess da,
const KernelMatrixLocator loc 
) [inline, private]

Definition at line 194 of file DistributedAccessRepositoryInFile.h.

References Impala::Util::Broadcast(), Impala::Core::Table::Copy(), Impala::Core::Matrix::DistributedAccess::GetColumnQuids(), Impala::Core::Matrix::DistributedAccess::GetColumns(), GetDir(), Impala::Persistency::KernelMatrixLocator::GetFeature(), Impala::Persistency::RepositoryInFileSystem::GetFile(), Impala::Core::Matrix::DistributedAccess::GetRowQuids(), Impala::Core::Matrix::DistributedAccess::GetRows(), Impala::Core::Matrix::DistributedAccess::GetStartNode(), ILOG_ERROR, Impala::Util::Read(), RepFS(), Impala::Core::Table::Table::Size(), Impala::Util::IOBuffer::Valid(), Impala::Persistency::File::Valid(), and Impala::Util::Write().

Referenced by Get().

00195     {
00196         String dir = GetDir(loc);
00197         String filenamebase = loc.GetFeature();
00198 
00199         Core::Table::QuidTable* rowQuids = da->GetRowQuids();
00200         Core::Table::QuidTable* columnQuids = da->GetColumnQuids();
00201         if (Link::Mpi::MyId() == da->GetStartNode())
00202         {
00203             String filename = filenamebase + ".columns.tab";
00204             File file = RepFS().GetFile(loc, dir, filename, false, false);
00205             Read(columnQuids, file);
00206             filename = filenamebase + ".rows.tab";
00207             file = RepFS().GetFile(loc, dir, filename, false, true);
00208             if (file.Valid())
00209             {
00210                 file = RepFS().GetFile(loc, dir, filename, false, false);
00211                 Read(rowQuids, file);
00212             }
00213             else
00214             {   // assume square kernel
00215                 Core::Table::Copy(rowQuids, columnQuids);
00216             }
00217 
00218             if (rowQuids->Size() != da->GetRows())
00219                 ILOG_ERROR("number of quids doesn't match totalrows: "
00220                            << rowQuids->Size() << " vs " << da->GetRows());
00221             if (columnQuids->Size() != da->GetColumns())
00222                 ILOG_ERROR("number of quids doesn't match totalcolumns: "
00223                            << columnQuids->Size() << " vs " << da->GetColumns());
00224             Util::IOBuffer* buf = new Util::IOBuffer(da->GetRows()*
00225                                                      sizeof(Quid) + 0x1000);
00226             Write(rowQuids, buf, true);
00227             Broadcast(buf, da->GetStartNode());
00228             delete buf;
00229             buf = new Util::IOBuffer(da->GetColumns()*sizeof(Quid)+0x1000);
00230             Write(columnQuids, buf, true);
00231             Broadcast(buf, da->GetStartNode());
00232             delete buf;
00233         }
00234         else
00235         {
00236             Util::IOBuffer* buf = new Util::IOBuffer();
00237             Broadcast(buf, da->GetStartNode());
00238             if (buf && buf->Valid())
00239             {
00240                 Read(rowQuids, buf);
00241                 delete buf;
00242             }
00243             buf = new Util::IOBuffer();
00244             Broadcast(buf, da->GetStartNode());
00245             if (buf && buf->Valid())
00246             {
00247                 Read(columnQuids, buf);
00248                 delete buf;
00249             }
00250             if (rowQuids->Size() != da->GetRows())
00251                 ILOG_ERROR_NODE("number of quids doesn't match totalrows");
00252             if (columnQuids->Size() != da->GetColumns())
00253                 ILOG_ERROR_NODE("number of quids doesn't match totalcolumns");
00254         }
00255     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:38 2011 for ImpalaSrc by  doxygen 1.5.1