the function
viennacl::ocl::set_context_device_type(id, viennacl::ocl::gpu_tag());
(and similarly for CPUs and accelerators) described in Section 8.1 in the manual (http://viennacl.sourceforge.net/viennacl-manual-current.pdf) is what you're looking for. Note that the device type must be set before any ViennaCL object is created.
Best regards,
Karli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
how can i select the Device-type when using OpenCL?
In my case I want to compare the OpenCL-performance of CL_DEVICE_TYPE_CPU and CL_DEVICE_TYPE_GPU.
I'm working on the sparse.cpp from the ViennaCL framework (./examples/benchmark/sparse.cpp) and enabled OpenCL by
#define VIENNACL_WITH_OPENCL 1
greetings
Hi,
the function
viennacl::ocl::set_context_device_type(id, viennacl::ocl::gpu_tag());
(and similarly for CPUs and accelerators) described in Section 8.1 in the manual (http://viennacl.sourceforge.net/viennacl-manual-current.pdf) is what you're looking for. Note that the device type must be set before any ViennaCL object is created.
Best regards,
Karli
Hi,
thanks for your answer, works well.
greetings
intel CPUs or AMD CPUs?