Skip to content

Commit

Permalink
some corections to the pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed Feb 24, 2025
1 parent 7c3e263 commit f34182b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tools/Pbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Pbc {
if(type!=unset && type!=orthorombic) {
plumed_merror("Current openACC implementation only works with unset or orthorombic pbcs");
}
#pragma acc enter data copyin(this[0:1], type, box, invBox)
#pragma acc enter data copyin(this[0:1], type)
box.toACCDevice();
invBox.toACCDevice();
}
Expand Down
4 changes: 2 additions & 2 deletions src/tools/Tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ class TensorGeneric:
public:
//upload the tensor to the current acc device
void toACCDevice()const {
#pragma acc enter data copyin(this[0:1], d,d[0:n*m-1])
#pragma acc enter data copyin(this[0:1], d, d[0:n*m-1])
}
void removeFromACCDevice() const {
// just delete
#pragma acc exit data delete( invBox, box,type, this[0:1])
#pragma acc exit data delete( d[0:n*m-1], d, this[0:1])
}
/// Constructor accepting n*m double parameters.
/// Can be used as Tensor<2,2>(1.0,2.0,3.0,4.0)
Expand Down

0 comments on commit f34182b

Please sign in to comment.