vexcl icon indicating copy to clipboard operation
vexcl copied to clipboard

error: ‘Type’ is not a member of ‘vex::Filter’ when VEXCL_BACKEND_CUDA is defined

Open mw66 opened this issue 6 years ago • 1 comments

ctx = new vex::Context( vex::Filter::Type(CL_DEVICE_TYPE_GPU) && vex::Filter::DoublePrecision && vex::Filter::Count(1) );

I think vex should define a dummy func in this case, so the client code no matter which backend it choose to use.

mw66 avatar Mar 19 '18 04:03 mw66

CL_DEVICE_TYPE_* constants are defined in CL/cl.h, which may be unavailable for non-opencl-based backends. How about ~~providing~~ using dummy vex::Filter::GPU, vex::Filter::CPU, vex::Filter::Accelerator instead?

EDIT: those are already defined for the CUDA backend: https://github.com/ddemidov/vexcl/blob/master/vexcl/backend/cuda/filter.hpp#L53-L56

ddemidov avatar Mar 19 '18 04:03 ddemidov