Commit b6c71dbf authored by COULAUD Olivier's avatar COULAUD Olivier

Remove cppcheck bugs

parent 3ae9e15e
......@@ -38,8 +38,10 @@ namespace FAca {
// control vectors (true if not used, false if used)
bool *const r = new bool[nx];
bool *const c = new bool[ny];
for (unsigned int i=0; i<nx; ++i) r[i] = true;
for (unsigned int j=0; j<ny; ++j) c[j] = true;
for (unsigned int i=0; i<nx; ++i){
r[i] = true;}
for (unsigned int j=0; j<ny; ++j) {
c[j] = true;}
// compute Frobenius norm of original Matrix K
FReal norm2K = 0;
......@@ -145,8 +147,10 @@ namespace FAca {
// control vectors (true if not used, false if used)
bool *const r = new bool[nx];
bool *const c = new bool[ny];
for (unsigned int i=0; i<nx; ++i) r[i] = true;
for (unsigned int j=0; j<ny; ++j) c[j] = true;
for (unsigned int i=0; i<nx; ++i){
r[i] = true;}
for (unsigned int j=0; j<ny; ++j){
c[j] = true; }
// initialize rank k and UV'
k = 0;
......@@ -336,4 +340,4 @@ namespace FAca {
};
#endif /* FACA_HPP */
\ No newline at end of file
#endif /* FACA_HPP */
......@@ -52,7 +52,10 @@ private:
void plotState() const {
#ifdef SCALFMM_USE_MEM_STATS
printf("[SCALFMM-MEMSTAT] Total number of allocations %llu \n", numberOfAllocations);
printf("[SCALFMM-MEMSTAT] Memory used at the end %lu Bytes (%f MB)\n", FMemStats::controler.getCurrentAllocated(), FMemStats::controler.getCurrentAllocatedMB());
/* printf("[SCALFMM-MEMSTAT] Memory used at the end %lu Bytes (%f MB)\n", FMemStats::controler.getCurrentAllocated(), FMemStats::controler.getCurrentAllocatedMB()); */
std::cout << "[SCALFMM-MEMSTAT] Memory used at the end "
<< FMemStats::controler.getCurrentAllocated()
<< " Bytes ("<< FMemStats::controler.getCurrentAllocatedMB() <<" B)\n";
printf("[SCALFMM-MEMSTAT] Max memory used %llu Bytes (%f MB)\n", FMemStats::controler.getMaxAllocated(), FMemStats::controler.getMaxAllocatedMB());
printf("[SCALFMM-MEMSTAT] Total memory used %llu Bytes (%f MB)\n", FMemStats::controler.getTotalAllocated(), FMemStats::controler.getTotalAllocatedMB());
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment