Skip to content

Commit

Permalink
Add BOUT_HOST_DEVICE to accessor operators for GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
ggeorgakoudis committed Nov 8, 2023
1 parent 5eb2931 commit 78919ec
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 78919ec

Please sign in to comment.