-
Notifications
You must be signed in to change notification settings - Fork 39
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
enabled all combinations of pre and post streaming in native cuda template #251
base: master
Are you sure you want to change the base?
Conversation
…generate all combinations of pre and post streaming (post streaming still needs interface integration and unit tests...)
|
||
constexpr index_t e[q][d] = {e}; | ||
constexpr scalar_t w[q] = {w}; | ||
read(i); |
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.
key change: simplified template body by shifting the streaming logic into a macro definition
}} | ||
}} | ||
for (index_t i = 0; i < q; ++i) | ||
write(i); |
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.
key change: simplified template body by shifting the streaming logic into a macro definition
#define neighbour(q_, sign_) (((q_ * dimension[0] + clamp(index[0] sign_ e[q_][0], dimension[0])) * dimension[1] + clamp(index[1] sign_ e[q_][1], dimension[1])) * dimension[2] + clamp(index[2] sign_ e[q_][2], dimension[2])) | ||
#endif | ||
|
||
#define read_(q_) f_reg[q_] = f[dist_index[q_]]; ((void)0) |
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.
new definitions for reading / writing / streaming
@@ -161,6 +161,8 @@ def generate(self): | |||
|
|||
val['name'] = self.name | |||
val['version'] = self.version | |||
val['enable_pre_streaming'] = '0' |
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.
new flags for controling the streaming in the generated kernel
Description
Enabled all combinations of pre and post streaming in native cuda template.
Still needs integration into the Simulation interface and unit tests.
Bugfix: out-of-date native cuda directory was removed.