You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class MyKernel; // Forward declaration of the name of the lambda functor cl::sycl::queue myQueue;
cl::sycl::program MyProgram(myQueue.get_context());
/* use the name of the kernel to obtain the associated program */
MyProgram.build_from_name<MyKernel>();
myQueue.submit([&](handler& commandGroup) { commandgroup.parallel_for<class MyKernel>(
cl::sycl::nd_range<2>(4, 4),
MyProgram.get_kernel<MyKernel>(), // execute the kernel as compiled in MyProgram
([=](cl::sycl::nd_item<2> index) {
//[kernel code]
})); });
Could anyone tell me what just happened about above code? What is the signature of the parallel_for?
parallel_for(range r, kernel k, MyKernel (lambda)), I'm I correct?