本文整理汇总了C++中IS_VALID函数的典型用法代码示例。如果您正苦于以下问题:C++ IS_VALID函数的具体用法?C++ IS_VALID怎么用?C++ IS_VALID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IS_VALID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hsa_amd_profiling_get_dispatch_time
hsa_status_t HSA_API
hsa_amd_profiling_get_dispatch_time(hsa_agent_t agent_handle,
hsa_signal_t hsa_signal,
hsa_amd_profiling_dispatch_time_t* time) {
IS_OPEN();
IS_BAD_PTR(time);
core::Agent* agent = core::Agent::Convert(agent_handle);
IS_VALID(agent);
core::Signal* signal = core::Signal::Convert(hsa_signal);
IS_VALID(signal);
if (agent->device_type() != core::Agent::kAmdGpuDevice) {
return HSA_STATUS_ERROR_INVALID_AGENT;
}
amd::GpuAgentInt* gpu_agent = static_cast<amd::GpuAgentInt*>(agent);
gpu_agent->TranslateTime(signal, *time);
return HSA_STATUS_SUCCESS;
}
示例2: SQLNativeSql
SQLRETURN SQL_API SQLNativeSql(SQLHDBC ConnectionHandle,
SQLCHAR * InStatementText,
SQLINTEGER TextLength1,
SQLCHAR * OutStatementText,
SQLINTEGER BufferLength,
SQLINTEGER * TextLength2Ptr)
{
hDbc_T *dbc = (hDbc_T *) ConnectionHandle;
SQLRETURN status = SQL_SUCCESS;
if (ENABLE_TRACE) {
ood_log_message(dbc, __FILE__, __LINE__, TRACE_FUNCTION_ENTRY,
(SQLHANDLE) dbc, 0, "");
}
ood_clear_diag((hgeneric *) dbc);
THREAD_MUTEX_LOCK(dbc);
THREAD_MUTEX_UNLOCK(dbc);
if (ENABLE_TRACE) {
ood_log_message(dbc, __FILE__, __LINE__, TRACE_FUNCTION_EXIT,
(SQLHANDLE) NULL, status, "");
}
fprintf(stderr, "called stubbed function line %d file %s\n", __LINE__,
__FILE__);
assert(IS_VALID(dbc));
return SQL_SUCCESS;
}
示例3: free_pcdata
void free_pcdata(PC_DATA *pcdata)
{
int alias;
if (!IS_VALID(pcdata))
return;
free_string(pcdata->pwd);
free_string(pcdata->bamfin);
free_string(pcdata->bamfout);
free_string(pcdata->invisin);
free_string(pcdata->invisout);
free_string(pcdata->who_descr);
free_string(pcdata->title);
free_buf(pcdata->buffer);
for (alias = 0; alias < MAX_ALIAS; alias++)
{
free_string(pcdata->alias[alias]);
free_string(pcdata->alias_sub[alias]);
}
for (alias = 0; alias < MAX_FORGET; alias++)
{
free_string(pcdata->forget[alias]);
}
for (alias = 0; alias < MAX_DUPES; alias++)
{
free_string(pcdata->dupes[alias]);
}
INVALIDATE(pcdata);
pcdata->next = pcdata_free;
pcdata_free = pcdata;
return;
}
示例4: free_obj
void free_obj( OBJ_DATA *obj )
{
AFFECT_DATA *paf, *paf_next;
EXTRA_DESCR_DATA *ed, *ed_next;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
if ( !IS_VALID(obj) )
return;
for ( paf = obj->affected; paf != NULL; paf = paf_next )
{
paf_next = paf->next;
free_affect( paf );
}
obj->affected = NULL;
for ( ed = obj->extra_descr; ed != NULL; ed = ed_next )
{
ed_next = ed->next;
free_extra_descr( ed );
}
obj->extra_descr = NULL;
free_string( obj->name );
free_string( obj->description );
free_string( obj->short_descr );
free_string( obj->owner );
INVALIDATE( obj );
obj->next = obj_free;
obj_free = obj;
}
示例5: hsa_amd_coherency_set_type
hsa_status_t HSA_API hsa_amd_coherency_set_type(hsa_agent_t agent_handle,
hsa_amd_coherency_type_t type) {
IS_OPEN();
core::Agent* agent = core::Agent::Convert(agent_handle);
IS_VALID(agent);
if (type < HSA_AMD_COHERENCY_TYPE_COHERENT ||
type > HSA_AMD_COHERENCY_TYPE_NONCOHERENT) {
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
}
if (agent->device_type() != core::Agent::kAmdGpuDevice) {
return HSA_STATUS_ERROR_INVALID_AGENT;
}
amd::GpuAgent* gpu_agent = static_cast<amd::GpuAgent*>(agent);
if (!gpu_agent->current_coherency_type(type)) {
return HSA_STATUS_ERROR;
}
return HSA_STATUS_SUCCESS;
}
示例6: free_pcdata
void free_pcdata(PC_DATA *pcdata)
{
int alias;
if (!IS_VALID(pcdata))
return;
free_string(pcdata->pwd);
free_string(pcdata->bamfin);
free_string(pcdata->bamfout);
free_string(pcdata->roomin);
free_string(pcdata->roomout);
free_string(pcdata->wiziin); /* Ferg-wizicust */
free_string(pcdata->wiziout); /* Ferg-wizicust */
free_string(pcdata->title);
free_buf(pcdata->buffer);
for (alias = 0; alias < MAX_ALIAS; alias++)
{
free_string(pcdata->alias[alias]);
free_string(pcdata->alias_sub[alias]);
}
INVALIDATE(pcdata);
pcdata->next = pcdata_free;
pcdata_free = pcdata;
return;
}
示例7: free_storer_data
void free_storer_data( ARTEFACT_STORER *storer )
{
if ( !IS_VALID( storer ) ) return ;
INVALIDATE( storer );
storer->next = storer_free;
storer_free = storer;
}
示例8: free_pcdata
void free_pcdata(PC_DATA *pcdata)
{
int alias;
GRANT_DATA *gran,*gran_next;
if (!IS_VALID(pcdata))
return;
free_string(pcdata->pwd);
free_string(pcdata->bamfin);
free_string(pcdata->bamfout);
free_string(pcdata->title);
free_buf(pcdata->buffer);
for (gran = pcdata->granted; gran != NULL; gran = gran_next)
{
gran_next = gran->next;
free_string(gran->name);
free_mem(gran,sizeof(*gran));
}
for (alias = 0; alias < MAX_ALIAS; alias++)
{
free_string(pcdata->alias[alias]);
free_string(pcdata->alias_sub[alias]);
}
INVALIDATE(pcdata);
pcdata->next = pcdata_free;
pcdata_free = pcdata;
return;
}
示例9: free_sleep_data
void free_sleep_data(SLEEP_DATA *sd)
{
if (!IS_VALID(sd))
return;
INVALIDATE(sd);
sd->next = sd_free;
sd_free = sd;
}
示例10: free_mprog
void free_mprog(MPROG_LIST *mp)
{
if (!IS_VALID(mp))
return;
INVALIDATE(mp);
mp->next = mprog_free;
mprog_free = mp;
}
示例11: hsa_ext_set_profiling
hsa_status_t HSA_API hsa_ext_set_profiling(hsa_queue_t* queue, int enable) {
core::Queue* cmd_queue = core::Queue::Convert(queue);
IS_VALID(cmd_queue);
cmd_queue->amd_queue_.enable_profiling = (enable != 0);
return HSA_STATUS_SUCCESS;
}
示例12: free_rprog
void free_rprog(PROG_LIST *rp)
{
if (!IS_VALID(rp))
return;
INVALIDATE(rp);
rp->next = rprog_free;
rprog_free = rp;
}
示例13: free_oprog
void free_oprog(PROG_LIST *op)
{
if (!IS_VALID(op))
return;
INVALIDATE(op);
op->next = oprog_free;
oprog_free = op;
}
示例14: free_room_weave
void free_room_weave(AFFECT_DATA *wd)
{
if (!IS_VALID(wd))
return;
INVALIDATE(wd);
wd->next = room_weave_free;
room_weave_free = wd;
}
示例15: free_residue
void free_residue(RESIDUE_DATA *rd)
{
if (!IS_VALID(rd))
return;
INVALIDATE(rd);
rd->next = residue_free;
residue_free = rd;
}