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

template<class ArrayT>
void Impala::Core::Array::ReadRawListVarIndex ( std::vector< Int64 > &  list,
Util::IOBuffer *  buffer 
) [inline]

Definition at line 383 of file ReadRaw.h.

References Impala::Util::IOBuffer::GetPosition(), Impala::Util::IOBuffer::Gets(), ILOG_ERROR, ILOG_VAR, Impala::Util::IOBuffer::Read(), and Impala::Util::IOBuffer::SetPosition().

00384 {
00385     typedef typename ArrayT::StorType StorT;
00386   
00387     ILOG_VAR(Impala.Core.Array.ReadRawListVarIndex);
00388     String typeStr = Element::TypeString<StorT>(0);
00389     String formatStr = "version: 2, binary: %lld, type: " + typeStr +
00390                        ", elemSize: %lld, nr: %lld";
00391 
00392     Int64 binary;
00393     Int64 elemSize;
00394     Int64 nrA;
00395     char buf[200];
00396     Util::IOBuffer::PositionType startPos = buffer->GetPosition();
00397     buffer->Gets(buf, 200);
00398     int res = sscanf(buf, formatStr.c_str(), &binary, &elemSize, &nrA);
00399     if ((res != 3) || (elemSize != ArrayT::ElemSize()))
00400     {
00401         ILOG_ERROR("Header is not compatible");
00402         return;
00403     }
00404     if (binary)
00405     {
00406         buffer->SetPosition(startPos + 200);
00407         for (Int64 n=0 ; n<nrA ; n++)
00408         {
00409             Int64 curPos = buffer->GetPosition();
00410             list.push_back(curPos);
00411             Int64 width;
00412             Int64 height;
00413             buffer->Read(buf, 20);
00414             sscanf(buf, "%lld %lld ", &width, &height);
00415             size_t blockSize = width*height*elemSize;
00416             buffer->SetPosition(buffer->GetPosition() + blockSize);
00417         }
00418     }
00419     else
00420     {
00421         ILOG_ERROR("mode not implemented");
00422     }
00423 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:58:25 2010 for ImpalaSrc by  doxygen 1.5.1