mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 03:20:47 +08:00
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:
committed by
sys_ocldev
parent
3a75c4fb71
commit
971eb7a1b4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user