Definition at line 242 of file mainIm.cpp. References Impala::Core::Array::ARRAY2DSCALARINT32, Impala::Core::Array::ARRAY2DSCALARREAL64, Impala::Core::Array::ARRAY2DSCALARUINT8, Impala::Core::Array::ARRAY2DVEC3UINT8, Impala::atof(), DoTestEqualTem(), Impala::CmdOptions::GetArg(), Impala::Util::Database::GetInstance(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetNrArg(), ILOG_ERROR, ILOG_INFO, ILOG_VAR, and Impala::Core::Array::ReadRawArrayType(). Referenced by mainIm(). 00243 { 00244 ILOG_VAR(Impala.Application.Im.DoTestEqual); 00245 CmdOptions& options = CmdOptions::GetInstance(); 00246 if (options.GetNrArg() < 3) 00247 { 00248 ILOG_ERROR("Need more arguments"); 00249 return; 00250 } 00251 Util::Database* db = &Util::Database::GetInstance(); 00252 00253 String name1 = options.GetArg(1); 00254 String name2 = options.GetArg(2); 00255 double eps = 0.00001; 00256 if (options.GetNrArg() >= 5) 00257 eps = atof(options.GetArg(4)); 00258 00259 ArrayType type1 = ReadRawArrayType(name1, db); 00260 ArrayType type2 = ReadRawArrayType(name2, db); 00261 if (type1 != type2) 00262 { 00263 ILOG_INFO("ArrayType's differ"); 00264 return; 00265 } 00266 00267 switch (type1) 00268 { 00269 case ARRAY2DSCALARUINT8: 00270 DoTestEqualTem(Array2dScalarUInt8(), name1, name2, eps); 00271 break; 00272 case ARRAY2DSCALARINT32: 00273 DoTestEqualTem(Array2dScalarInt32(), name1, name2, eps); 00274 break; 00275 case ARRAY2DSCALARREAL64: 00276 DoTestEqualTem(Array2dScalarReal64(), name1, name2, eps); 00277 break; 00278 case ARRAY2DVEC3UINT8: 00279 DoTestEqualTem(Array2dVec3UInt8(), name1, name2, eps); 00280 break; 00281 default: 00282 ILOG_INFO("unknown array type"); 00283 } 00284 }
Here is the call graph for this function: ![]()
|