cl_int clReleaseMemObjectFCL (cl_mem memobj) { MSG(clReleaseMemObjectFCL); if (!FreeOCL::is_valid(memobj)) return CL_INVALID_MEM_OBJECT; memobj->release(); if (memobj->get_ref_count() == 0) { memobj->invalidate(); memobj->unlock(); delete memobj; } else memobj->unlock(); return CL_SUCCESS; }
cl_int clRetainMemObjectFCL (cl_mem memobj) { MSG(clRetainMemObjectFCL); if (!FreeOCL::is_valid(memobj)) return CL_INVALID_MEM_OBJECT; memobj->retain(); memobj->unlock(); return CL_SUCCESS; }