-
Notifications
You must be signed in to change notification settings - Fork 2
Issue 155 New Unit Test for Field #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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. |
return *this; | ||
} | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need a present clause here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same matter in lines 90 and 73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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