cn/r part 2 of 2.

This commit is contained in:
XMRig 2019-09-04 11:23:04 +07:00
parent b9e15389ca
commit 57f82f7504
16 changed files with 287 additions and 139 deletions

View file

@ -375,7 +375,7 @@ cl_int xmrig::OclLib::getProgramInfo(cl_program program, cl_program_info param_n
}
cl_int xmrig::OclLib::releaseCommandQueue(cl_command_queue command_queue)
cl_int xmrig::OclLib::release(cl_command_queue command_queue)
{
assert(pReleaseCommandQueue != nullptr);
assert(pGetCommandQueueInfo != nullptr);
@ -391,7 +391,7 @@ cl_int xmrig::OclLib::releaseCommandQueue(cl_command_queue command_queue)
}
cl_int xmrig::OclLib::releaseContext(cl_context context)
cl_int xmrig::OclLib::release(cl_context context)
{
assert(pReleaseContext != nullptr);
@ -404,7 +404,7 @@ cl_int xmrig::OclLib::releaseContext(cl_context context)
}
cl_int xmrig::OclLib::releaseKernel(cl_kernel kernel)
cl_int xmrig::OclLib::release(cl_kernel kernel)
{
assert(pReleaseKernel != nullptr);
@ -421,7 +421,7 @@ cl_int xmrig::OclLib::releaseKernel(cl_kernel kernel)
}
cl_int xmrig::OclLib::releaseMemObject(cl_mem mem_obj)
cl_int xmrig::OclLib::release(cl_mem mem_obj)
{
assert(pReleaseMemObject != nullptr);
@ -438,7 +438,7 @@ cl_int xmrig::OclLib::releaseMemObject(cl_mem mem_obj)
}
cl_int xmrig::OclLib::releaseProgram(cl_program program)
cl_int xmrig::OclLib::release(cl_program program)
{
assert(pReleaseProgram != nullptr);
@ -550,6 +550,15 @@ cl_uint xmrig::OclLib::getNumPlatforms()
}
cl_uint xmrig::OclLib::getReferenceCount(cl_program program)
{
cl_uint out = 0;
OclLib::getProgramInfo(program, CL_PROGRAM_REFERENCE_COUNT, sizeof(cl_uint), &out);
return out;
}
cl_ulong xmrig::OclLib::getDeviceUlong(cl_device_id id, cl_device_info param, cl_ulong defaultValue)
{
OclLib::getDeviceInfo(id, param, sizeof(cl_ulong), &defaultValue);