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

void Impala::Core::Matrix::DistributedAccess::Dump ( int  cornerWidth = 4,
int  cornerHeight = 4 
) [inline]

Definition at line 532 of file DistributedAccess.h.

References GetColumnPartCount(), GetColumns(), GetOwnerOfPart(), GetPart(), GetPartNr(), GetRow(), GetRowPartCount(), GetRows(), ILOG_ERROR, mAverages, mFeatures, mParts, mWeights, Impala::Core::Matrix::VirtualMatrix::NrCol(), and Impala::Core::Matrix::VirtualMatrix::NrRow().

Referenced by Impala::Core::Training::KernelMatrix::Dump().

00533     {
00534         std::cout << "Dumping DistributedAccess" << std::endl;
00535         std::cout << "rows x columns = " << GetRows() << " x " << GetColumns()
00536                   << ", parts = " << GetRowPartCount() << " x "
00537                   << GetColumnPartCount() << std::endl;
00538         for (int i=0 ; i<mFeatures.size() ; i++)
00539         {
00540             std::cout << "feature " << i << " = " << mFeatures[i]
00541                       << " weight=" << mWeights[i] << " average="
00542                       << mAverages[i] << std::endl;
00543         }
00544         int id = Link::Mpi::MyId();
00545         std::cout << "my id = " << id << std::endl;
00546         if (mParts.size() == 0)
00547         {
00548             std::cout << "no parts loaded" << std::endl;
00549             return;
00550         }
00551 
00552         for (int r=0 ; r<GetRowPartCount() ; r++)
00553         {
00554             for (int c=0 ; c<GetColumnPartCount() ; c++)
00555             {
00556                 int i = GetPartNr(r,c);
00557                 std::cout << "r=" << r << ", c=" << c << ", part=" << i
00558                           << ", owner=" << GetOwnerOfPart(i);
00559                 VirtualMatrix* mat = GetPart(i);
00560                 if (mat)
00561                     std::cout << ", part rows x cols = " << mat->NrRow()
00562                               << " x " << mat->NrCol() << std::endl;
00563                     else
00564                         std::cout << ", part=0" << std::endl;
00565             }
00566         }
00567 
00568         int rowSize = GetColumns();
00569         std::cout << "rowSize = " << rowSize << std::endl;
00570         double* rowBuf = new double[rowSize];
00571         for (int y=0 ; y<GetRows() ; y++)
00572         {
00573             if ((y < cornerHeight) || (y >= (GetRows()-cornerHeight)))
00574             {
00575                 int res = GetRow(y, rowBuf, rowSize);
00576                 if (res != rowSize)
00577                 {
00578                     ILOG_ERROR("[Dump2]: row=" << y << ", received " << res <<
00579                                " instead of " << rowSize);
00580                 }
00581                 std::cout << "row = " << y << " :- ";
00582                 for (int x=0 ; x<rowSize ; x++)
00583                 {
00584                     if ((x < cornerWidth) || (x >= (rowSize-cornerWidth)))
00585                     {
00586                         std::cout << rowBuf[x] << ", ";
00587                     }
00588                     else
00589                     {
00590                         if (x == cornerWidth)
00591                             std::cout << "..., ";
00592                     }
00593                 }
00594                 std::cout << std::endl;
00595             }
00596             else
00597             {
00598                 if (y == cornerHeight)
00599                     std::cout << "................." << std::endl;
00600             }
00601         }
00602         delete rowBuf;
00603         std::cout << "Dump done" << std::endl;
00604     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:20:19 2011 for ImpalaSrc by  doxygen 1.5.1