Commit 044c9e0f authored by kicici's avatar kicici

Fixing headers, using `= delete`, some asserts.

parent 7d4a2655
......@@ -19,7 +19,7 @@
#include <map>
#include <string>
#include "Common.h"
#include "Cubism/Common.h"
CUBISM_NAMESPACE_BEGIN
......
......@@ -13,7 +13,7 @@
#include "Grid.h"
//#include "Concepts.h"
// #include <omp.h>
#include <string.h>
#include <cstring>
#include <string>
#ifdef __bgq__
......@@ -472,13 +472,8 @@ public:
}
private:
//forbidden
BlockLab(const BlockLab&):
m_state(eMRAGBlockLab_Uninitialized),
m_cacheBlock(NULL){abort();}
BlockLab& operator=(const BlockLab&){abort(); return *this;}
BlockLab(const BlockLab&) = delete;
BlockLab& operator=(const BlockLab&) = delete;
};
......
......@@ -58,8 +58,7 @@ public:
BlockProcessingMT_Simple_TBB(const BlockProcessingMT_Simple_TBB& p):
processing(p.processing), ptrInfos(p.ptrInfos){}
//forbidden
BlockProcessingMT_Simple_TBB& operator=(const BlockProcessingMT_Simple_TBB& p){abort(); return *this;}
BlockProcessingMT_Simple_TBB& operator=(const BlockProcessingMT_Simple_TBB& p) = delete;
template <typename BlockedRange>
void operator()(const BlockedRange& r) const
......@@ -144,8 +143,7 @@ public:
ptrInfos(p.ptrInfos), m_availableLabs(p.m_availableLabs), current_time(p.current_time) {}
private:
//forbidden
BlockProcessingMT_TBB& operator=(const BlockProcessingMT_TBB& p){abort(); return *this;}
BlockProcessingMT_TBB& operator=(const BlockProcessingMT_TBB& p) = delete;
}; /* BlockProcessingMT_TBB */
......
......@@ -60,6 +60,9 @@ protected:
void _alloc()
{
assert(NX > 0 && "Number of blocks per X must be greater than 0.");
assert(NY > 0 && "Number of blocks per Y must be greater than 0.");
assert(NZ > 0 && "Number of blocks per Z must be greater than 0.");
allocator<Block> alloc;
m_blocks = alloc.allocate(N);
assert(m_blocks!=NULL);
......
......@@ -54,6 +54,9 @@ public:
const double _maxextent = 1, const MPI_Comm comm = MPI_COMM_WORLD):
TGrid(nX, nY, nZ, _maxextent), timestamp(0), worldcomm(comm)
{
assert(npeX > 0 && "Number of processes per X must be greater than 0.");
assert(npeY > 0 && "Number of processes per Y must be greater than 0.");
assert(npeZ > 0 && "Number of processes per Z must be greater than 0.");
blocksize[0] = Block::sizeX;
blocksize[1] = Block::sizeY;
blocksize[2] = Block::sizeZ;
......
......@@ -7,8 +7,8 @@
*
*/
#pragma once
#include <assert.h>
#include <stdio.h>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
......
......@@ -7,8 +7,8 @@
*
*/
#pragma once
#include <assert.h>
#include <stdio.h>
#include <cassert>
#include <cstdio>
#include "Matrix3D.h"
CUBISM_NAMESPACE_BEGIN
......
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