HPXCL
 All Classes Functions
Classes | Public Member Functions
hpx::opencl::work_size< DIM > Struct Template Reference

Kernel execution dimensions. More...

#include <kernel.hpp>

List of all members.

Classes

struct  dimension

Public Member Functions

dimension & operator[] (std::size_t idx)

Detailed Description

template<std::size_t DIM>
struct hpx::opencl::work_size< DIM >

Kernel execution dimensions.

This structure offers an alternative way to set and reuse kernel execution dimensions.

Example:

 {.cpp}
     // Create work_size object
     hpx::opencl::work_size<1> dim;                                           

     // Set dimensions. 
     dim[0].offset = 0;                                                       
     dim[0].size = 2048; 
     
     // Set local work size.
     // This can be left out.
     // OpenCL will then automatically determine the best local work size.
     dim[0].local_size = 64;

     // Enqueue a kernel using the work_size object
     event kernel_event = kernel.enqueue(dim).get();
Examples:
hello_world.cpp.

The documentation for this struct was generated from the following file:
 All Classes Functions