Skip to content
Snippets Groups Projects
Commit 2a627991 authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Merge branch 'cell_idx_c-gpufield' into 'master'

Suppress signedness warning in GPUField.impl.h

See merge request walberla/walberla!322
parents 08ff3279 e5825bea
No related merge requests found
......@@ -96,9 +96,9 @@ GPUField<T>::~GPUField()
template<typename T>
T * GPUField<T>::dataAt(cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f)
{
auto offset = (x + nrOfGhostLayers_) * xStride() +
(y + nrOfGhostLayers_) * yStride() +
(z + nrOfGhostLayers_) * zStride() +
auto offset = (x + cell_idx_c(nrOfGhostLayers_)) * xStride() +
(y + cell_idx_c(nrOfGhostLayers_)) * yStride() +
(z + cell_idx_c(nrOfGhostLayers_)) * zStride() +
f * fStride();
return static_cast<T*>(pitchedPtr_.ptr) + offset;
}
......@@ -106,9 +106,9 @@ T * GPUField<T>::dataAt(cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f)
template<typename T>
const T * GPUField<T>::dataAt(cell_idx_t x, cell_idx_t y, cell_idx_t z, cell_idx_t f) const
{
auto offset = (x + nrOfGhostLayers_) * xStride() +
(y + nrOfGhostLayers_) * yStride() +
(z + nrOfGhostLayers_) * zStride() +
auto offset = (x + cell_idx_c(nrOfGhostLayers_)) * xStride() +
(y + cell_idx_c(nrOfGhostLayers_)) * yStride() +
(z + cell_idx_c(nrOfGhostLayers_)) * zStride() +
f * fStride();
return static_cast<T*>(pitchedPtr_.ptr) + offset;
}
......
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