added forall_with_streams and updated BenchmarkForall.cpp#232
added forall_with_streams and updated BenchmarkForall.cpp#232neelakausik wants to merge 19 commits intodevelopfrom
Conversation
|
Didn't you have a macro in DefaultMacros.h as well? |
src/care/forall.h
Outdated
| forall(gpu_simulation{}, res, fileName, lineNumber, start, end, std::forward<LB>(body)); | ||
| #elif defined(__CUDACC__) | ||
| forall(RAJA::cuda_exec<CARE_CUDA_BLOCK_SIZE, CARE_CUDA_ASYNC>{}, | ||
| res, RAJA::RangeSegment(start, end), std::forward<LB>(body)); |
There was a problem hiding this comment.
I think you need an overload of forall that takes a resource, right?
There was a problem hiding this comment.
This is the function you are calling: https://github.com/LLNL/CARE/pull/232/files#diff-1df40e04088de0f82501a0065752487396b8abeb4c3d30780e79119cc63789a7R74
But it does not accept a resource argument. I'm confused at how this is working.
There was a problem hiding this comment.
I thought it was calling RAJA::forall, but will look into it further
There was a problem hiding this comment.
It shouldn't be calling RAJA::forall - there's no overload that takes the fileName and lineNumber.
There was a problem hiding this comment.
Also, that's the main reason I dislike "using namespace..." statements - it's too easy to accidentally call the wrong function.
benchmarks/BenchmarkRaja.cpp
Outdated
|
|
||
| for (auto _ : state) { | ||
| //run num kernels | ||
| omp_set_num_threads(16); |
There was a problem hiding this comment.
This should be N rather than 16.
src/care/forall.h
Outdated
| /// | ||
| //////////////////////////////////////////////////////////////////////////////// | ||
| template <typename ExecutionPolicy, typename LB> | ||
| void forall(ExecutionPolicy /* policy */, Resource res, const char * fileName, const int lineNumber, |
There was a problem hiding this comment.
You should add a template parameter as the resource type since we want to be able to accept any resource type.
No description provided.