Conversation
cb7f66f to
c620e5d
Compare
|
we may consider removing the Field::swap method For example: if you know forget to swap data_pointer_a and data_pointer_b as well it is doomed to fail. But if the developer has to use swap it is clear what happens. of course, he is free to look into the Field::swap method but I think that is an easy source for an error when you are not fully aware of what happens in the Field::swap method. Especially because you are calling the function with the Field objects and not the data pointer. |
|
|
||
| Field &operator*=(const real x) { | ||
| #pragma acc parallel loop independent present(this->data[:m_size]) async | ||
| #pragma acc parallel loop |
There was a problem hiding this comment.
don't we need a present clause here?
There was a problem hiding this comment.
same matter in lines 90 and 73
There was a problem hiding this comment.
independent is also important to tell the compiler that the loop can be freely parallelise
added two tests that control the data pointer after a change in the data field