Commit 90d73a8d authored by incardon's avatar incardon
Browse files

Fixing POWER9

parent c2cab188
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
NEWS 100755 → 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -120,7 +120,10 @@ endif()
if (CMAKE_COMPILER_IS_GNUCC)
target_compile_options(mem_map PRIVATE "-Wno-deprecated-declarations")
target_compile_options(mem_map PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -mavx>)
if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")
target_compile_options(mem_map PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -mavx>)
endif()
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 )
target_compile_options(mem_map PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -fabi-version=6>)
......
File mode changed from 100755 to 100644
......@@ -20,6 +20,9 @@ class grid_smb
{
private:
//! Box enclosing the grid
Box<dim,size_t> box;
indexT blockSz[dim];
indexT sz[dim];
......@@ -31,12 +34,25 @@ public:
grid_smb() {}
/*! \brief Return the box enclosing the grid
*
* \return the box
*
*/
inline Box<dim,size_t> getBox() const
{
return box;
}
__host__ __device__ grid_smb(const size_t (& sz)[dim])
{
for (int d=0; d<dim; ++d)
{
this->sz[d] = sz[d];
blockSz[d] = sz[d] / blockEdgeSize + ((sz[d] % blockEdgeSize) != 0);
box.setHigh(d,sz[d]);
box.setLow(d,0);
}
}
......@@ -46,6 +62,9 @@ public:
{
this->sz[d] = sz[d];
blockSz[d] = sz[d] / blockEdgeSize + ((sz[d] % blockEdgeSize) != 0);
box.setHigh(d,sz[d]);
box.setLow(d,0);
}
}
......@@ -55,6 +74,9 @@ public:
{
blockSz[i] = (indexT)domainBlockEdgeSize;
sz[i] = (indexT)domainBlockEdgeSize * blockEdgeSize;
box.setHigh(i,domainBlockEdgeSize);
box.setLow(i,0);
}
}
......@@ -65,6 +87,9 @@ public:
{
blockSz[i] = blockGrid.size(i);
sz[i] = blockGrid.size(i) * blockEdgeSize;
box.setHigh(i,sz[i]);
box.setLow(i,0);
}
}
......@@ -76,16 +101,27 @@ public:
assert(dim <= 3);
blockSz[i] = blockDimensions.x;
sz[i] = blockSz[i] * blockEdgeSize;
box.setHigh(i,sz[i]);
box.setLow(i,0);
if (dim > 1)
{
++i;
blockSz[i] = blockDimensions.y;
sz[i] = blockSz[i] * blockEdgeSize;
box.setHigh(i,sz[i]);
box.setLow(i,0);
if (dim > 2)
{
++i;
blockSz[i] = blockDimensions.z;
sz[i] = blockSz[i] * blockEdgeSize;
box.setHigh(i,sz[i]);
box.setLow(i,0);
}
}
}
......
......@@ -16,7 +16,7 @@ BOOST_AUTO_TEST_SUITE( grid_expression_test )
BOOST_AUTO_TEST_CASE( grid_expression_use)
{
const grid_key_dx<3> key1(1,2,3);
const comb<3> c({1,0,-1});
const comb<3> c({(char)1,0,(char)-1});
const grid_key_dx<3> key2(4,5,6);
const grid_key_dx<3> key3(12,11,10);
......
File mode changed from 100755 to 100644
......@@ -19,7 +19,8 @@ BOOST_AUTO_TEST_CASE( grid_sm_linearization )
const grid_key_dx<3> key1(1,2,3);
const grid_key_dx<3> zero(0,0,0);
const grid_key_dx<3> seven(7,7,7);
const comb<3> c({1,0,-1});
const comb<3> c({(char)1,(char)0,(char)-1});
size_t sz[3] = {8,8,8};
grid_sm<3,int> gs(sz);
......
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