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

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

Definition at line 526 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().

00527 {
00528     typedef typename ArrayT::StorType StorT;
00529   
00530     ILOG_VAR(Impala.Core.Array.ReadRawListVarIndex);
00531     String typeStr = Element::TypeString<StorT>(0);
00532     String formatStr = "version: 2, binary: %lld, type: " + typeStr +
00533                        ", elemSize: %lld, nr: %lld";
00534 
00535     Int64 binary;
00536     Int64 elemSize;
00537     Int64 nrA;
00538     char buf[200];
00539     Util::IOBuffer::PositionType startPos = buffer->GetPosition();
00540     buffer->Gets(buf, 200);
00541     int res = sscanf(buf, formatStr.c_str(), &binary, &elemSize, &nrA);
00542     if ((res != 3) || (elemSize != ArrayT::ElemSize()))
00543     {
00544         ILOG_ERROR("Header is not compatible");
00545         return;
00546     }
00547     if (binary)
00548     {
00549         buffer->SetPosition(startPos + 200);
00550         for (Int64 n=0 ; n<nrA ; n++)
00551         {
00552             Int64 curPos = buffer->GetPosition();
00553             list.push_back(curPos);
00554             Int64 width;
00555             Int64 height;
00556             buffer->Read(buf, 20);
00557             sscanf(buf, "%lld %lld ", &width, &height);
00558             size_t blockSize = width*height*elemSize;
00559             buffer->SetPosition(buffer->GetPosition() + blockSize);
00560         }
00561     }
00562     else
00563     {
00564         ILOG_ERROR("mode not implemented");
00565     }
00566 }

Here is the call graph for this function:


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