From ba39a6a34b79ab91984b913535ff44461544491d Mon Sep 17 00:00:00 2001 From: YCY <> Date: Thu, 19 May 2011 10:53:48 +0000 Subject: [PATCH 1/1] OCC22355 Avoid annoying warnings in NCollection_SparseArray.hxx on 64-bit Linux with Intel compiler QA test command creation --- src/QANCollection/FILES | 1 + src/QANCollection/QANCollection3.cxx | 21 +++++- .../QANCollection_PerfSparseArray.hxx | 72 +++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100755 src/QANCollection/QANCollection_PerfSparseArray.hxx diff --git a/src/QANCollection/FILES b/src/QANCollection/FILES index f760d02a55..590efdfddf 100755 --- a/src/QANCollection/FILES +++ b/src/QANCollection/FILES @@ -17,3 +17,4 @@ QANCollection_PerfLists.hxx QANCollection_PerfMaps.hxx QANCollection_PerfTest.hxx QANCollectionTest.cxx +QANCollection_PerfSparseArray.hxx \ No newline at end of file diff --git a/src/QANCollection/QANCollection3.cxx b/src/QANCollection/QANCollection3.cxx index 758c5854a2..982fa183c6 100755 --- a/src/QANCollection/QANCollection3.cxx +++ b/src/QANCollection/QANCollection3.cxx @@ -13,6 +13,8 @@ #include +#include + IMPLEMENT_HARRAY1(QANCollection_HArray1Perf) IMPLEMENT_HARRAY2(QANCollection_HArray2Perf) IMPLEMENT_HSET(QANCollection_HSetPerf) @@ -224,6 +226,20 @@ static Standard_Integer QANColPerfIndexedDataMap(Draw_Interpretor& di, Standard_ return 0; } +//======================================================================= +//function : QANColCheckSparseArray +//purpose : +//======================================================================= +static Standard_Integer QANColCheckSparseArray(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) +{ + Standard_Integer Repeat, Size; + if ( CheckArguments(di, argc, argv, Repeat, Size) ) { + return 1; + } + CompSparseArray(Repeat,Size); + return 0; +} + void QANCollection::Commands3(Draw_Interpretor& theCommands) { char *group = "QANCollection"; @@ -241,6 +257,9 @@ void QANCollection::Commands3(Draw_Interpretor& theCommands) { theCommands.Add("QANColPerfDoubleMap", "QANColPerfDoubleMap Repeat Size", __FILE__, QANColPerfDoubleMap, group); theCommands.Add("QANColPerfIndexedMap", "QANColPerfIndexedMap Repeat Size", __FILE__, QANColPerfIndexedMap, group); theCommands.Add("QANColPerfIndexedDataMap", "QANColPerfIndexedDataMap Repeat Size", __FILE__, QANColPerfIndexedDataMap, group); - + + theCommands.Add("QANColCheckSparseArray", "QANColCheckSparseArray Repeat Size", __FILE__, QANColCheckSparseArray, group); + return; } + diff --git a/src/QANCollection/QANCollection_PerfSparseArray.hxx b/src/QANCollection/QANCollection_PerfSparseArray.hxx new file mode 100755 index 0000000000..3aff1dd594 --- /dev/null +++ b/src/QANCollection/QANCollection_PerfSparseArray.hxx @@ -0,0 +1,72 @@ +// File: QANCollection_PerfArrays.hxx +// Created: Wed May 15 15:29:20 2002 +// Author: Alexander KARTOMIN (akm) +// + + +#ifndef QANCollection_PerfSparseArray_HeaderFile +#define QANCollection_PerfSparseArray_HeaderFile + +#define PERF_ENABLE_METERS +#include +////////////////////////////////#include +#include +#include + +// ===================== Test perform of SparseArray type ========================== +void CompSparseArray (const Standard_Integer theRep, const Standard_Integer theSize) +{ + Standard_Integer i,j; + for (i=0; i a1(theSize),a2(theSize); + + PERF_STOP_METER("NCollection_SparseArray creation") + + PERF_START_METER("NCollection_SparseArray filling") + for( j=0;j