Skip to content

Commit

Permalink
Merge pull request #2806 from boutproject/fix-gpu-execution
Browse files Browse the repository at this point in the history
Add BOUT_HOST_DEVICE to accessor operators for GPU
  • Loading branch information
bendudson authored Nov 8, 2023
2 parents bd75280 + 78919ec commit 50c23e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/bout/field_accessor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ struct BoutRealArray {

/// Cast operators, so can be assigned to a raw pointer
/// Note: Not explicit, so can be cast implicitly
operator BoutReal*() { return data; }
BOUT_HOST_DEVICE operator BoutReal*() { return data; }

operator const BoutReal*() const { return data; }
BOUT_HOST_DEVICE operator const BoutReal*() const { return data; }
};

/// Thin wrapper around field data, for fast but unsafe access
Expand Down

0 comments on commit 50c23e2

Please sign in to comment.