unsigned initExecutionBluesteins(const unsigned size, const unsigned m) { allocateHostMemoryBluesteins(size, m); if (deviceCount) { printf("Initializing device(s).." ); // create the OpenCL context on available GPU devices init_cl_context(CL_DEVICE_TYPE_GPU); const cl_uint ciDeviceCount = getDeviceCount(); if (!ciDeviceCount) { printf("No opencl specific devices!\n"); return 0; } printf("Creating Command Queue...\n"); // create a command queue on device 1 for (unsigned i = 0; i < deviceCount; ++i) { createCommandQueue(i); } } return 1; }
cl_int init_fb_cl(framebuffer_t *fb) { cl_int ret; if (fb->clctx.command_queue) { clReleaseMemObject(fb->data_cl); deinit_clctx(&fb->clctx); } ret = init_cl_context(&fb->clctx, 1); CL_ERR_RET("init_cl_context", ret); make_gl_tex(fb); data_cl_alloc(fb, 1); return ret; }