OWL
OptiX7 Wrapper Library
|
Go to the documentation of this file.
25 inline int linear(
const vec2i &ID,
const vec2i &dims)
26 {
return ID.x + dims.x*ID.y; }
28 template<
typename Lambda>
29 inline void for_each(
const vec2i &dims,
const Lambda &lambda)
31 for (
int iy=0;iy<dims.y;iy++)
32 for (
int ix=0;ix<dims.x;ix++)
36 #if OWL_HAVE_PARALLEL_FOR
37 template<
typename Lambda>
38 inline void parallel_for(
const vec2i &dims,
const Lambda &lambda)
41 lambda(vec2i(index%dims.x,index/dims.x));
45 template<
typename Lambda>
46 inline void serial_for(
const vec2i &dims,
const Lambda &lambda)
49 lambda(vec2i(index%dims.x,index/dims.x));
void serial_for(const vec2i &dims, const Lambda &lambda)
Definition: array2D.h:46
void parallel_for(INDEX_T nTasks, TASK_T &&taskFunction, size_t blockSize=1)
Definition: parallel_for.h:69
void for_each(const vec2i &dims, const Lambda &lambda)
Definition: array2D.h:29
int linear(const vec2i &ID, const vec2i &dims)
Definition: array2D.h:25
Definition: APIContext.cpp:36
void serial_for(INDEX_T nTasks, TASK_T &&taskFunction)
Definition: parallel_for.h:38