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

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

Definition at line 391 of file DistributedAccessRepositoryInFile.h.

References Impala::Persistency::File::CopyFrom(), Impala::Core::Matrix::DistributedAccess::GetColumnPartCount(), GetDir(), Impala::Persistency::KernelMatrixLocator::GetFeature(), Impala::Persistency::RepositoryInFileSystem::GetFile(), Impala::Core::Matrix::DistributedAccess::GetOwnerOfPart(), Impala::Core::Matrix::DistributedAccess::GetPart(), Impala::Core::Matrix::DistributedAccess::GetPartNr(), Impala::Persistency::File::GetPath(), Impala::Core::Matrix::DistributedAccess::GetRowPartCount(), Impala::Persistency::KernelMatrixLocator::GetWriteReal32(), Impala::MakeString(), and RepFS().

Referenced by Add().

00392     {
00393         typedef Core::Matrix::VirtualMatrixFactory VirtualMatrixFactory;
00394         String dir = GetDir(loc);
00395         VirtualMatrixFactory& vmf = VirtualMatrixFactory::GetInstance();
00396         for (int r=0 ; r<da->GetRowPartCount() ; r++)
00397         {
00398             for (int c=0 ; c<da->GetColumnPartCount() ; c++)
00399             {
00400                 int i = da->GetPartNr(r,c);
00401                 if (Link::Mpi::MyId() == da->GetOwnerOfPart(i))
00402                 {
00403                     Core::Matrix::VirtualMatrix* part = da->GetPart(i);
00404                     String filename = loc.GetFeature() + ".precomputed.part-R"
00405                         + MakeString(r) + "-C" + MakeString(c) + ".raw" ;
00406                     File file = RepFS().GetFile(loc, dir, filename, true,
00407                                                 false);
00408                     ILOG_INFO_NODE("Saving part in " << file.GetPath());
00409                     Core::Matrix::VirtualMatrix* dst = 
00410                         vmf.ConstructIOBufferWriter(part->NrRow(), part->NrCol(),
00411                                                     file, loc.GetWriteReal32(),
00412                                                     false);
00413                     dst->CopyFrom(part);
00414                     delete dst;
00415                 }
00416             }
00417         }
00418     }

Here is the call graph for this function:


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