interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / tests / cabi / golden / nvmlDeviceGetCount_v2.c

14 lines · 572 bytes Raw Blame History
1__attribute__((visibility("default"))) nvmlReturn_t nvmlDeviceGetCount_v2(unsigned int *deviceCount){
2 uint64_t o_f[4]={999},o_d=1;int o_ok=0;
3 if(pthread_mutex_lock(&FxLock))return (nvmlReturn_t)999;
4 o_f[2]=deviceCount!=NULL;
5 if(!omega_fx_count(&o_d,o_f,4,FxState,8)&&!o_d&&o_in2(o_f[0])&&!(o_f[1]&~UINT64_C(1))){
6 o_ok=1;
7 if(o_f[1]&UINT64_C(1)&&(!deviceCount||o_f[3]>UINT32_MAX))o_ok=0;
8 }
9 if(o_ok){
10 if(o_f[1]&UINT64_C(1))*deviceCount=(unsigned int)o_f[3];
11 }
12 pthread_mutex_unlock(&FxLock);
13 return o_ok?(nvmlReturn_t)o_f[0]:(nvmlReturn_t)999;
14}