-
Notifications
You must be signed in to change notification settings - Fork 53
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
Core: variadic templates for backend. #559
base: develop
Are you sure you want to change the base?
Conversation
The assign and reduce parallelisation functions can now handle arbitrary numbers of function arguments, which are forwarded to the lambda. Therefore, the lambda is now placed before the variadic arguments. Note that they can now also be called without arguments, allowing e.g. an assignment of zero to an entire `field`.
2830b1f
to
0ad8c31
Compare
We cannot capture variadic parameters in the CUDA lambdas, which we would need in the variadic reduce. The API now includes an integer size argument again, since it otherwise would not work if the parameter pack was empty (and it is needed in the CUDA version of reduce).
Codecov Report
@@ Coverage Diff @@
## develop #559 +/- ##
===========================================
+ Coverage 50.06% 50.27% +0.21%
===========================================
Files 88 88
Lines 10136 10183 +47
===========================================
+ Hits 5075 5120 +45
- Misses 5061 5063 +2 |
- replaced all usage of `fill` - replaced all usage of `normalize_vectors` - tidied up the Solvers by using `Backend::par::apply`. With this change, particularly RK4 and Heun should become faster in OpenMP and CUDA
8cd8065
to
3228c39
Compare
3228c39
to
61da747
Compare
Unfortunately, the extended lambdas in CUDA are more restricted than I thought, see https://docs.nvidia.com/cuda/cuda-c-programming-guide/#extended-lambda-restrictions The main issue is this rule:
This means that, for example, most Note also
|
212372f
to
f49c114
Compare
63fbd74
to
2edff73
Compare
The assign and reduce parallelisation functions can now handle arbitrary numbers of function arguments, which are forwarded to the lambda.
Therefore, the lambda is now placed before the variadic arguments.
Note that they can now also be called without arguments, allowing e.g. an assignment of zero to an entire
field
.This PR is related to issue #529.
TODO: