From e5a808fb8dda438f900ca66354e5598ce20babd6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 1 Nov 2022 04:05:57 -0400 Subject: [PATCH] apply correct platform selection for OpenCL context --- lib/gpu/geryon/ocl_device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gpu/geryon/ocl_device.h b/lib/gpu/geryon/ocl_device.h index 185f4967e8..4163d40881 100644 --- a/lib/gpu/geryon/ocl_device.h +++ b/lib/gpu/geryon/ocl_device.h @@ -536,9 +536,9 @@ int UCL_Device::create_context() { cl_int errorv; cl_context_properties props[3]; props[0]=CL_CONTEXT_PLATFORM; - props[1]=_platform; + props[1]=(cl_context_properties)_cl_platform; props[2]=0; - _context=clCreateContext(0,1,&_cl_device,nullptr,nullptr,&errorv); + _context=clCreateContext(props,1,&_cl_device,nullptr,nullptr,&errorv); if (errorv!=CL_SUCCESS) { #ifndef UCL_NO_EXIT std::cerr << "UCL Error: Could not access accelerator number " << _device