| 2790 | }; |
| 2791 | |
| 2792 | inline 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 |
nothing calls this directly
no test coverage detected