mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
localise scope of variables declared in macro
This commit is contained in:
parent
0996ba9396
commit
f15eeb0283
@ -108,13 +108,15 @@ void LambdaApplySIMT(uint64_t Isites, uint64_t Osites, lambda Lambda)
|
|||||||
|
|
||||||
// Copy the for_each_n style ; Non-blocking variant
|
// Copy the for_each_n style ; Non-blocking variant
|
||||||
#define accelerator_forNB( iterator, num, nsimd, ... ) \
|
#define accelerator_forNB( iterator, num, nsimd, ... ) \
|
||||||
typedef uint64_t Iterator; \
|
{ \
|
||||||
auto lambda = [=] accelerator (Iterator lane,Iterator iterator) mutable { \
|
typedef uint64_t Iterator; \
|
||||||
__VA_ARGS__; \
|
auto lambda = [=] accelerator (Iterator lane,Iterator iterator) mutable { \
|
||||||
}; \
|
__VA_ARGS__; \
|
||||||
dim3 cu_threads(gpu_threads,nsimd); \
|
}; \
|
||||||
dim3 cu_blocks ((num+gpu_threads-1)/gpu_threads); \
|
dim3 cu_threads(gpu_threads,nsimd); \
|
||||||
LambdaApplySIMT<<<cu_blocks,cu_threads>>>(nsimd,num,lambda);
|
dim3 cu_blocks ((num+gpu_threads-1)/gpu_threads); \
|
||||||
|
LambdaApplySIMT<<<cu_blocks,cu_threads>>>(nsimd,num,lambda); \
|
||||||
|
}
|
||||||
|
|
||||||
// Copy the for_each_n style ; Non-blocking variant (default
|
// Copy the for_each_n style ; Non-blocking variant (default
|
||||||
#define accelerator_for( iterator, num, nsimd, ... ) \
|
#define accelerator_for( iterator, num, nsimd, ... ) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user