MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / getDefault

Method getDefault

include/internal/CL/cl.hpp:2792–2813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2790};
2791
2792inline Device Device::getDefault(cl_int * err)
2793{
2794 cl_int error;
2795 Device device;
2796
2797 Context context = Context::getDefault(&error);
2798 detail::errHandler(error, __CREATE_CONTEXT_ERR);
2799
2800 if (error != CL_SUCCESS) {
2801 if (err != NULL) {
2802 *err = error;
2803 }
2804 }
2805 else {
2806 device = context.getInfo<CL_CONTEXT_DEVICES>()[0];
2807 if (err != NULL) {
2808 *err = CL_SUCCESS;
2809 }
2810 }
2811
2812 return device;
2813}
2814
2815
2816#ifdef _WIN32

Callers

nothing calls this directly

Calls 1

errHandlerFunction · 0.85

Tested by

no test coverage detected