Add initial implementation of specialization constants

Related-To: NEO-2260

Change-Id: Ib722109039555a028eb4ec0862e9de72342f9730
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
Jobczyk, Lukasz
2019-04-25 12:46:43 +02:00
committed by sys_ocldev
parent 3a75c4fb71
commit 971eb7a1b4
16 changed files with 561 additions and 42 deletions

View File

@@ -4659,3 +4659,21 @@ cl_int CL_API_CALL clAddCommentINTEL(cl_platform_id platform, const char *commen
return retVal;
}
cl_int CL_API_CALL clSetProgramSpecializationConstant(cl_program program, cl_uint specId, size_t specSize, const void *specValue) {
cl_int retVal = CL_SUCCESS;
API_ENTER(&retVal);
DBG_LOG_INPUTS("program", program,
"specId", specId,
"specSize", specSize,
"specValue", specValue);
Program *pProgram = nullptr;
retVal = validateObjects(WithCastToInternal(program, &pProgram), specValue);
if (retVal == CL_SUCCESS) {
retVal = pProgram->setProgramSpecializationConstant(specId, specSize, specValue);
}
return retVal;
}