|
@@ -37,19 +37,21 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
const char* const pcOCLBuildOpts,
|
|
const char* const pcOCLBuildOpts,
|
|
|
const _GHE_LOGLVL LogLvl,
|
|
const _GHE_LOGLVL LogLvl,
|
|
|
const _GHE_BUILD_LOG_MODE BuildLogMode
|
|
const _GHE_BUILD_LOG_MODE BuildLogMode
|
|
|
-#if defined(__OCLH_BUILDER_FLAG) || defined(__OCLH_COMPILER_ONLY_FLAG) || defined(__OCLH_LINKER_ONLY_FLAG)
|
|
|
|
|
|
|
+#if defined(__OCLH_BUILDER_FLAG) || \
|
|
|
|
|
+ defined(__OCLH_COMPILER_ONLY_FLAG) || \
|
|
|
|
|
+ defined(__OCLH_LINKER_ONLY_FLAG)
|
|
|
, char* const pcOutputPrefix
|
|
, char* const pcOutputPrefix
|
|
|
#endif /* defined(__OCLH_BUILDER_FLAG) ||
|
|
#endif /* defined(__OCLH_BUILDER_FLAG) ||
|
|
|
defined(__OCLH_COMPILER_ONLY_FLAG) ||
|
|
defined(__OCLH_COMPILER_ONLY_FLAG) ||
|
|
|
defined(__OCLH_LINKER_ONLY_FLAG) */
|
|
defined(__OCLH_LINKER_ONLY_FLAG) */
|
|
|
) {
|
|
) {
|
|
|
/**/
|
|
/**/
|
|
|
-#define __CLAPI_ERR_ROUTINE_WITH_RET(___CLAPI_CALL) \
|
|
|
|
|
-{ const cl_int tmp=pwSet->APIErr; \
|
|
|
|
|
- char pcLogMsg[_GHM_MAXLEN_OF_LOGMSG]; \
|
|
|
|
|
|
|
+#define __CLAPI_ERR_ROUTINE_WITH_RET(___CLAPI_CALL) \
|
|
|
|
|
+{ const cl_int tmp=pwSet->APIErr; \
|
|
|
|
|
+ char pcLogMsg[_GHM_MAXLEN_OF_LOGMSG]; \
|
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG, "%s/%s", __func__, ___CLAPI_CALL); \
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG, "%s/%s", __func__, ___CLAPI_CALL); \
|
|
|
- _ghf_logWS_APIErr(*pwSet, pcLogMsg); \
|
|
|
|
|
- _ghf_wipeWS(pwSet); \
|
|
|
|
|
|
|
+ _ghf_logWS_APIErr(*pwSet, pcLogMsg); \
|
|
|
|
|
+ _ghf_wipeWS(pwSet); \
|
|
|
return(tmp); }
|
|
return(tmp); }
|
|
|
/**/
|
|
/**/
|
|
|
char pcLogMsg[_GHM_MAXLEN_OF_LOGMSG];
|
|
char pcLogMsg[_GHM_MAXLEN_OF_LOGMSG];
|
|
@@ -278,7 +280,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
#endif /* __OCLH_BUILD_LOG_TO_STDOUT_FLAG */
|
|
#endif /* __OCLH_BUILD_LOG_TO_STDOUT_FLAG */
|
|
|
pwSet->APIErr=cliBuildCLAPIErr;
|
|
pwSet->APIErr=cliBuildCLAPIErr;
|
|
|
if(pwSet->APIErr) {
|
|
if(pwSet->APIErr) {
|
|
|
- if(_ghf_isLogValid(TmpLog)) {
|
|
|
|
|
|
|
+ if(_ghf_isLog_Valid(TmpLog)) {
|
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
|
pwSet->Log=TmpLog;
|
|
pwSet->Log=TmpLog;
|
|
@@ -291,7 +293,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
clCreateKernelsInProgram(pwSet->Program, 0u, NULL,
|
|
clCreateKernelsInProgram(pwSet->Program, 0u, NULL,
|
|
|
&cluNofKernels);
|
|
&cluNofKernels);
|
|
|
if(pwSet->APIErr) {
|
|
if(pwSet->APIErr) {
|
|
|
- if(_ghf_isLogValid(TmpLog)) {
|
|
|
|
|
|
|
+ if(_ghf_isLog_Valid(TmpLog)) {
|
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
|
pwSet->Log=TmpLog;
|
|
pwSet->Log=TmpLog;
|
|
@@ -306,7 +308,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
|
"%s/Host memory allocation failed",
|
|
"%s/Host memory allocation failed",
|
|
|
__func__);
|
|
__func__);
|
|
|
- if(_ghf_isLogValid(TmpLog)) {
|
|
|
|
|
|
|
+ if(_ghf_isLog_Valid(TmpLog)) {
|
|
|
_ghf_logWS_Msg(*pwSet, pcLogMsg);
|
|
_ghf_logWS_Msg(*pwSet, pcLogMsg);
|
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
|
pwSet->Log=TmpLog;
|
|
pwSet->Log=TmpLog;
|
|
@@ -329,7 +331,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
* ClangFECompilerGetKernelArgInfoTask::
|
|
* ClangFECompilerGetKernelArgInfoTask::
|
|
|
* GetKernelArgInfo */
|
|
* GetKernelArgInfo */
|
|
|
if(pwSet->APIErr) {
|
|
if(pwSet->APIErr) {
|
|
|
- if(_ghf_isLogValid(TmpLog)) {
|
|
|
|
|
|
|
+ if(_ghf_isLog_Valid(TmpLog)) {
|
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
_ghf_logWS_APIErr(*pwSet, pcLogMsg);
|
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
|
pwSet->Log=TmpLog;
|
|
pwSet->Log=TmpLog;
|
|
@@ -344,7 +346,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
"%s/The number of created kernels "
|
|
"%s/The number of created kernels "
|
|
|
" is not equal to the number "
|
|
" is not equal to the number "
|
|
|
"of all kernels", __func__);
|
|
"of all kernels", __func__);
|
|
|
- if(_ghf_isLogValid(TmpLog)) {
|
|
|
|
|
|
|
+ if(_ghf_isLog_Valid(TmpLog)) {
|
|
|
_ghf_logWS_Msg(*pwSet, pcLogMsg);
|
|
_ghf_logWS_Msg(*pwSet, pcLogMsg);
|
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
_ghf_wipeLog(&pwSet->Log); }
|
|
|
pwSet->Log=TmpLog;
|
|
pwSet->Log=TmpLog;
|
|
@@ -398,7 +400,7 @@ int32_t _ghf_genrWS( _GHT_WRKSET* const pwSet,
|
|
|
_ghf_wipeLog(&pwSet->Log);
|
|
_ghf_wipeLog(&pwSet->Log);
|
|
|
pwSet->Log=TmpLog;
|
|
pwSet->Log=TmpLog;
|
|
|
}
|
|
}
|
|
|
- if(_ghf_isLogValid(TmpLog)) {
|
|
|
|
|
|
|
+ if(_ghf_isLog_Valid(TmpLog)) {
|
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
|
"%u kernels registered", cluNofKernels);
|
|
"%u kernels registered", cluNofKernels);
|
|
|
_ghf_logWS_Msg(*pwSet, pcLogMsg);
|
|
_ghf_logWS_Msg(*pwSet, pcLogMsg);
|
|
@@ -542,7 +544,7 @@ int32_t _ghf_wipeWS(_GHT_WRKSET* const pwSet) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int32_t _ghf_isWS_LogValid(const _GHT_WRKSET wSet) {
|
|
int32_t _ghf_isWS_LogValid(const _GHT_WRKSET wSet) {
|
|
|
- return(_ghf_isLogValid(wSet.Log));
|
|
|
|
|
|
|
+ return(_ghf_isLog_Valid(wSet.Log));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int32_t _ghf_recalcWS_WIWG(_GHT_WRKSET* const pwSet,
|
|
int32_t _ghf_recalcWS_WIWG(_GHT_WRKSET* const pwSet,
|
|
@@ -889,6 +891,61 @@ int32_t _ghf_wdcSetWS_KerErrToZero(_GHT_WRKSET wSet) {
|
|
|
return(_GHM_OK);
|
|
return(_GHM_OK);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+_GHT_DEVLIST_DESC _ghf_declDevLstDesc(void) {
|
|
|
|
|
+ _GHT_DEVLIST_DESC dld={ .pcluIdxs=NULL, .pcWC=NULL };
|
|
|
|
|
+ return(dld);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+int32_t _ghf_isDevLstDesc_Valid(const _GHT_DEVLIST_DESC DevLstDesc) {
|
|
|
|
|
+ if(DevLstDesc.pcluIdxs && DevLstDesc.pcWC) return(0);
|
|
|
|
|
+ if(DevLstDesc.pcluIdxs && DevLstDesc.pcluIdxs[0]==(cl_uint)(-1)) return(0);
|
|
|
|
|
+ if(DevLstDesc.pcWC && !DevLstDesc.pcWC) return(0);
|
|
|
|
|
+ return(1);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+int32_t _ghf_addDevIdxToDevLstDesc( _GHT_DEVLIST_DESC* const pDevLstDesc,
|
|
|
|
|
+ const cl_uint cluIdx) {
|
|
|
|
|
+ if(!pDevLstDesc->pcluIdxs) {
|
|
|
|
|
+ pDevLstDesc->pcluIdxs=malloc(sizeof(cl_uint));
|
|
|
|
|
+ if(!pDevLstDesc->pcluIdxs) return(_GHM_HOST_MEMALLOC_ERROR);
|
|
|
|
|
+ pDevLstDesc->pcluIdxs[0]=(cl_uint)(-1);
|
|
|
|
|
+ }
|
|
|
|
|
+ _ghf_freeHostZ(&pDevLstDesc->pcWC);
|
|
|
|
|
+ {
|
|
|
|
|
+ uint64_t i=0ul;
|
|
|
|
|
+ cl_uint* pTmp=NULL;
|
|
|
|
|
+ /* TODO: make faster */
|
|
|
|
|
+ for(i=0ul; pDevLstDesc->pcluIdxs[i]!=(cl_uint)(-1); i++ )
|
|
|
|
|
+ if(pDevLstDesc->pcluIdxs[i]==cluIdx) return(_GHM_OK);
|
|
|
|
|
+ pTmp=realloc(pDevLstDesc->pcluIdxs,i+1);
|
|
|
|
|
+ if(!pTmp) return(_GHM_HOST_MEMALLOC_ERROR);
|
|
|
|
|
+ pDevLstDesc->pcluIdxs=pTmp;
|
|
|
|
|
+ pDevLstDesc->pcluIdxs[i]=cluIdx;
|
|
|
|
|
+ pDevLstDesc->pcluIdxs[i+1]=(cl_uint)(-1);
|
|
|
|
|
+ }
|
|
|
|
|
+ return(_GHM_OK);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+int32_t _ghf_setDevLstDesc_DevNameWC(_GHT_DEVLIST_DESC* const pDevLstDesc,
|
|
|
|
|
+ const char* const pcWC) {
|
|
|
|
|
+ char* pTmp=NULL;
|
|
|
|
|
+ uint64_t i=0;
|
|
|
|
|
+ while(pcWC[i]) i++;
|
|
|
|
|
+ pTmp=realloc(pDevLstDesc->pcWC,i+1ul);
|
|
|
|
|
+ if(!pTmp) return(_GHM_HOST_MEMALLOC_ERROR);
|
|
|
|
|
+ pDevLstDesc->pcWC=pTmp;
|
|
|
|
|
+ strncpy(pDevLstDesc->pcWC,pcWC,i);
|
|
|
|
|
+ pDevLstDesc->pcWC[i]='\0';
|
|
|
|
|
+ _ghf_freeHostZ(&pDevLstDesc->pcluIdxs);
|
|
|
|
|
+ return(_GHM_OK);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+int32_t _ghf_wipeDevLstDesc( _GHT_DEVLIST_DESC* const pDevLstDesc) {
|
|
|
|
|
+ _ghf_freeHostZ(&pDevLstDesc->pcluIdxs);
|
|
|
|
|
+ _ghf_freeHostZ(&pDevLstDesc->pcWC);
|
|
|
|
|
+ return(0);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
_GHT_AWSS _ghf_declAWSs(const _GHE_LOGLVL LogLvl,
|
|
_GHT_AWSS _ghf_declAWSs(const _GHE_LOGLVL LogLvl,
|
|
|
const _GHE_BUILD_LOG_MODE BuildLogMode) {
|
|
const _GHE_BUILD_LOG_MODE BuildLogMode) {
|
|
|
_GHT_AWSS AWSs={ .pWSet=NULL, .u64NofWSs=0ul, .Log=_ghf_declLog(),
|
|
_GHT_AWSS AWSs={ .pWSet=NULL, .u64NofWSs=0ul, .Log=_ghf_declLog(),
|
|
@@ -898,12 +955,15 @@ _GHT_AWSS _ghf_declAWSs(const _GHE_LOGLVL LogLvl,
|
|
|
return(AWSs);
|
|
return(AWSs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-int32_t _ghf_genrAWSs( _GHT_AWSS* const pAWSs,
|
|
|
|
|
- const _GHT_LOG Log,
|
|
|
|
|
- const void* const pvCLProgramSources,
|
|
|
|
|
- const _GHE_SRCTYPE SourceType,
|
|
|
|
|
- const char* const OCLBuildOpts
|
|
|
|
|
-#if defined(__OCLH_BUILDER_FLAG) || defined(__OCLH_COMPILER_ONLY_FLAG) || defined(__OCLH_LINKER_ONLY_FLAG)
|
|
|
|
|
|
|
+int32_t _ghf_genrAWSs( _GHT_AWSS* const pAWSs,
|
|
|
|
|
+ const _GHT_LOG Log,
|
|
|
|
|
+ const _GHT_DEVLIST_DESC DevLstDesc,
|
|
|
|
|
+ const void* const pvCLProgramSources,
|
|
|
|
|
+ const _GHE_SRCTYPE SourceType,
|
|
|
|
|
+ const char* const OCLBuildOpts
|
|
|
|
|
+#if defined(__OCLH_BUILDER_FLAG) || \
|
|
|
|
|
+ defined(__OCLH_COMPILER_ONLY_FLAG) || \
|
|
|
|
|
+ defined(__OCLH_LINKER_ONLY_FLAG)
|
|
|
, char* const pcOutputPrefix
|
|
, char* const pcOutputPrefix
|
|
|
#endif /* defined(__OCLH_BUILDER_FLAG) ||
|
|
#endif /* defined(__OCLH_BUILDER_FLAG) ||
|
|
|
defined(__OCLH_COMPILER_ONLY_FLAG) ||
|
|
defined(__OCLH_COMPILER_ONLY_FLAG) ||
|
|
@@ -913,7 +973,10 @@ int32_t _ghf_genrAWSs( _GHT_AWSS* const pAWSs,
|
|
|
_GHT_WRKSET tmpWS=_ghf_declWS();
|
|
_GHT_WRKSET tmpWS=_ghf_declWS();
|
|
|
cl_device_id* DevLst=NULL;
|
|
cl_device_id* DevLst=NULL;
|
|
|
int32_t err=0;
|
|
int32_t err=0;
|
|
|
- if(!_ghf_isLogValid(Log)) return(_GHM_INCONSISTED_LOG_ERROR);
|
|
|
|
|
|
|
+ _GHT_DEVLIST_DESC TmpDevLstDesc=_ghf_declDevLstDesc();
|
|
|
|
|
+ if(!_ghf_isLog_Valid(Log)) return(_GHM_INCONSISTED_LOG_ERROR);
|
|
|
|
|
+ if(!_ghf_isDevLstDesc_Valid(DevLstDesc))
|
|
|
|
|
+ return(_GHM_INCONSISTED_DEV_DESCRIPTION_ERROR);
|
|
|
pAWSs->Log=Log;
|
|
pAWSs->Log=Log;
|
|
|
tmpWS.Log=Log; tmpWS.pwSetAddr=&tmpWS;
|
|
tmpWS.Log=Log; tmpWS.pwSetAddr=&tmpWS;
|
|
|
_ghf_wipeAWSs(pAWSs);
|
|
_ghf_wipeAWSs(pAWSs);
|
|
@@ -946,6 +1009,10 @@ int32_t _ghf_genrAWSs( _GHT_AWSS* const pAWSs,
|
|
|
"+++++++ Device 0x%lx description +++++++",
|
|
"+++++++ Device 0x%lx description +++++++",
|
|
|
(uint64_t)DevLst[i]);
|
|
(uint64_t)DevLst[i]);
|
|
|
_ghf_logWS_Msg(tmpWS, pcLogMsg);
|
|
_ghf_logWS_Msg(tmpWS, pcLogMsg);
|
|
|
|
|
+ snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
|
|
|
+ "dev_0x%04lx | Device index: %u",
|
|
|
|
|
+ __GHM_U64STRIPTO2B(DevLst[i]),i);
|
|
|
|
|
+ _ghf_logWS_Msg(tmpWS, pcLogMsg);
|
|
|
_ghf_logWS_DevInfo(tmpWS,DevLst[i],pAWSs->LogLevel);
|
|
_ghf_logWS_DevInfo(tmpWS,DevLst[i],pAWSs->LogLevel);
|
|
|
snprintf(pcLogMsg,_GHM_MAXLEN_OF_LOGMSG,
|
|
snprintf(pcLogMsg,_GHM_MAXLEN_OF_LOGMSG,
|
|
|
"------- End of device 0x%lx description -------",
|
|
"------- End of device 0x%lx description -------",
|
|
@@ -954,21 +1021,56 @@ int32_t _ghf_genrAWSs( _GHT_AWSS* const pAWSs,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
{
|
|
{
|
|
|
- cl_uint i=0u;
|
|
|
|
|
- cl_uint cluNofDevs=0u;
|
|
|
|
|
|
|
+ cl_uint i=0u,
|
|
|
|
|
+ cluNofDevs=0u,
|
|
|
|
|
+ cluNofWS=0u;
|
|
|
|
|
+ err=0;
|
|
|
while(DevLst[cluNofDevs]) cluNofDevs++;
|
|
while(DevLst[cluNofDevs]) cluNofDevs++;
|
|
|
|
|
+ if(!DevLstDesc.pcluIdxs && !DevLstDesc.pcWC) { cluNofWS=cluNofDevs; }
|
|
|
|
|
+ else {
|
|
|
|
|
+ if(DevLstDesc.pcluIdxs) {
|
|
|
|
|
+ cl_uint j=0u;
|
|
|
|
|
+ while(DevLstDesc.pcluIdxs[j]!=(cl_uint)(-1)) {
|
|
|
|
|
+ if(DevLstDesc.pcluIdxs[j]<cluNofDevs) { cluNofWS++; }
|
|
|
|
|
+ j++;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else { /* подразумевается валидное описание устройств */
|
|
|
|
|
+ cl_uint j=0u;
|
|
|
|
|
+ while(DevLst[j]) {
|
|
|
|
|
+ if(__ghf_cmpCharPtrAndWC(
|
|
|
|
|
+ _ghf_getDevInf_charptr(DevLst[j],CL_DEVICE_NAME,
|
|
|
|
|
+ &tmpWS.APIErr),
|
|
|
|
|
+ DevLstDesc.pcWC, __GHE_CASE_SENSITIVE)) {
|
|
|
|
|
+ err=_ghf_addDevIdxToDevLstDesc(&TmpDevLstDesc,j);
|
|
|
|
|
+ if(err) {
|
|
|
|
|
+ _ghf_wipeDevLstDesc(&TmpDevLstDesc);
|
|
|
|
|
+ _ghf_wipeAWSs(pAWSs);
|
|
|
|
|
+ _ghf_wipeDevList(&DevLst);
|
|
|
|
|
+ _ghf_wipeWS(&tmpWS);
|
|
|
|
|
+ return(err);
|
|
|
|
|
+ }
|
|
|
|
|
+ cluNofWS++;
|
|
|
|
|
+ }
|
|
|
|
|
+ j++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
err=0;
|
|
err=0;
|
|
|
pAWSs->u64NofWSs=0;
|
|
pAWSs->u64NofWSs=0;
|
|
|
- pAWSs->pWSet=malloc(sizeof(_GHT_WRKSET)*cluNofDevs);
|
|
|
|
|
|
|
+ pAWSs->pWSet=malloc(sizeof(_GHT_WRKSET)*cluNofWS);
|
|
|
if(!pAWSs->pWSet) {
|
|
if(!pAWSs->pWSet) {
|
|
|
|
|
+ _ghf_wipeDevLstDesc(&TmpDevLstDesc);
|
|
|
_ghf_wipeAWSs(pAWSs);
|
|
_ghf_wipeAWSs(pAWSs);
|
|
|
_ghf_wipeDevList(&DevLst);
|
|
_ghf_wipeDevList(&DevLst);
|
|
|
_ghf_wipeWS(&tmpWS);
|
|
_ghf_wipeWS(&tmpWS);
|
|
|
return(_GHM_HOST_MEMALLOC_ERROR);
|
|
return(_GHM_HOST_MEMALLOC_ERROR);
|
|
|
}
|
|
}
|
|
|
- for(i=0u; i<cluNofDevs; i++) {
|
|
|
|
|
|
|
+ for(i=0u; i<cluNofWS; i++) {
|
|
|
pAWSs->pWSet[pAWSs->u64NofWSs]=_ghf_declWS();
|
|
pAWSs->pWSet[pAWSs->u64NofWSs]=_ghf_declWS();
|
|
|
- err=_ghf_genrWS(&pAWSs->pWSet[pAWSs->u64NofWSs], Log, 0, DevLst[i],
|
|
|
|
|
|
|
+ err=_ghf_genrWS(&pAWSs->pWSet[pAWSs->u64NofWSs], Log, 0,
|
|
|
|
|
+ (TmpDevLstDesc.pcluIdxs)?
|
|
|
|
|
+ DevLst[TmpDevLstDesc.pcluIdxs[i]]:
|
|
|
|
|
+ DevLst[DevLstDesc.pcluIdxs[i]],
|
|
|
pvCLProgramSources, SourceType, OCLBuildOpts,
|
|
pvCLProgramSources, SourceType, OCLBuildOpts,
|
|
|
pAWSs->LogLevel, pAWSs->BuildLogMode
|
|
pAWSs->LogLevel, pAWSs->BuildLogMode
|
|
|
#if defined(__OCLH_BUILDER_FLAG) || defined(__OCLH_COMPILER_ONLY_FLAG) || defined(__OCLH_LINKER_ONLY_FLAG)
|
|
#if defined(__OCLH_BUILDER_FLAG) || defined(__OCLH_COMPILER_ONLY_FLAG) || defined(__OCLH_LINKER_ONLY_FLAG)
|
|
@@ -981,12 +1083,14 @@ int32_t _ghf_genrAWSs( _GHT_AWSS* const pAWSs,
|
|
|
else pAWSs->u64NofWSs++;
|
|
else pAWSs->u64NofWSs++;
|
|
|
}
|
|
}
|
|
|
if(!pAWSs->u64NofWSs) {
|
|
if(!pAWSs->u64NofWSs) {
|
|
|
|
|
+ _ghf_wipeDevLstDesc(&TmpDevLstDesc);
|
|
|
_ghf_wipeAWSs(pAWSs);
|
|
_ghf_wipeAWSs(pAWSs);
|
|
|
_ghf_wipeDevList(&DevLst);
|
|
_ghf_wipeDevList(&DevLst);
|
|
|
_ghf_wipeWS(&tmpWS);
|
|
_ghf_wipeWS(&tmpWS);
|
|
|
return(err);
|
|
return(err);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ _ghf_wipeDevLstDesc(&TmpDevLstDesc);
|
|
|
_ghf_wipeDevList(&DevLst);
|
|
_ghf_wipeDevList(&DevLst);
|
|
|
if(pAWSs->LogLevel>=_GHE_LOG_ALL) {
|
|
if(pAWSs->LogLevel>=_GHE_LOG_ALL) {
|
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
snprintf(pcLogMsg, _GHM_MAXLEN_OF_LOGMSG,
|
|
@@ -1127,8 +1231,6 @@ int32_t _ghf_wipeDevList(cl_device_id** const ppDevLst) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
int32_t __ghf_setWS_TextProgramId(_GHT_WRKSET wSet,
|
|
int32_t __ghf_setWS_TextProgramId(_GHT_WRKSET wSet,
|
|
|
char* const pcDst,
|
|
char* const pcDst,
|
|
|
char* const pcOutputPrefix) {
|
|
char* const pcOutputPrefix) {
|