Skip to content

Commit

Permalink
Merge branch 'gpu-field-accessor' into 'master'
Browse files Browse the repository at this point in the history
Use uint_t instead of int to access f of gpu field

See merge request walberla/walberla!659
  • Loading branch information
Markus Holzer committed Mar 7, 2024
2 parents 17a4582 + b333724 commit 94eff89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gpu/FieldAccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace gpu
__device__ __forceinline__ bool isValidPosition() { return true; }

__device__ T & get() { return * (T*)(ptr_); }
__device__ T & get( int f) { return * (T*)(ptr_ + f * fOffset_); }
__device__ T & get( uint_t f) { return * (T*)(ptr_ + f * fOffset_); }


__device__ T & getNeighbor( int cx, int cy, int cz ) const
Expand All @@ -88,7 +88,7 @@ namespace gpu
cz * zOffset_ );
}

__device__ T & getNeighbor( int cx, int cy, int cz, int cf )
__device__ T & getNeighbor( int cx, int cy, int cz, uint_t cf )
{
return * (T*)( ptr_ + cx * xOffset_ +
cy * yOffset_ +
Expand Down

0 comments on commit 94eff89

Please sign in to comment.