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

template<class ArrayT>
void Impala::Core::Array::WriteRawListVar ( std::vector< ArrayT * >  list,
String  fileName,
Util::Database *  db,
bool  writeIndex,
bool  binary 
) [inline]

Definition at line 301 of file WriteRaw.h.

References Impala::Util::DatabaseWriteNative(), Impala::Util::Database::GetIOBuffer(), ILOG_ERROR, ILOG_VAR, and WriteRawListVar().

00303 {
00304     ILOG_VAR(Impala.Core.Array.WriteRawListVar);
00305     //Util::IOBuffer* buf = db->GetIOBuffer(fileName, false, false, "tmp");
00306     Util::IOBuffer* buf = db->GetIOBuffer(fileName, false, false, "tmp", 0, true);
00307     if (!buf)
00308         return;
00309 
00310     WriteRawListVar(list, buf, binary);
00311     delete buf;
00312 
00313     if (!writeIndex)
00314         return;
00315     if (!binary)
00316     {
00317         ILOG_ERROR("Cannot write index for non-binary files");
00318         return;
00319     }
00320 
00321     size_t storSize = sizeof(typename ArrayT::StorType);
00322     Int64 elemSize = ArrayT::ElemSize();
00323     std::vector<Int64> v;
00324     Int64 pos = 200;
00325     for (Int64 i=0 ; i<list.size() ; i++)
00326     {
00327         v.push_back(pos);
00328         pos += 20 + storSize * list[i]->CW() * list[i]->CH() * elemSize;
00329     }
00330     Util::DatabaseWriteNative(fileName + ".idx", db, v.begin(), v.end());
00331 }

Here is the call graph for this function:


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