Skip to content

Commit

Permalink
Update some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
psakievich committed Sep 18, 2023
1 parent bfc6678 commit a4ad40e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/ngp_utils/SmartFieldRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ class SmartFieldRef<FieldType, LEGACY ,ACCESS,typename std::enable_if_t<std::is_
~SmartFieldRef()
{
if (is_write_) {
// LEGACY implementation needs to be used in a limited scope.
// Redundant usage is fine since sync's and mod's will be no-ops
// but long lived cases like alg class members will negate the
// purpose of this abstraction
fieldRef_.modify_on_host();
}
}
Expand Down Expand Up @@ -135,7 +139,7 @@ class SmartFieldRef<FieldType, MEMSPACE,ACCESS,typename std::enable_if_t<std::is
{
if (is_write_) {
if(is_copy_constructed_){
// device implementations should only ever execute inside a
// NgpFieldBase implementations should only ever execute inside a
// kokkos::paralle_for and hence be captured by a lambda. Therefore we only
// ever need to sync copies that will have been snatched up through lambda
// capture.
Expand Down

0 comments on commit a4ad40e

Please sign in to comment.