def load_module_image(context, image):
 logsz = os.environ.get('NUMBAPRO_CUDA_LOG_SIZE', 1024)
 jitinfo = (c_char * logsz)()
 jiterrors = (c_char * logsz)()
 options = {enums.CU_JIT_INFO_LOG_BUFFER: addressof(jitinfo), enums.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES: c_void_p(logsz), enums.CU_JIT_ERROR_LOG_BUFFER: addressof(jiterrors), enums.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES: c_void_p(logsz), enums.CU_JIT_LOG_VERBOSE: c_void_p(VERBOSE_JIT_LOG)}
 option_keys = (drvapi.cu_jit_option * len(options))(*options.keys())
 option_vals = (c_void_p * len(options))(*options.values())
 handle = drvapi.cu_module()
 try:
  driver.cuModuleLoadDataEx(byref(handle), image, len(options), option_keys, option_vals)
 except CudaAPIError as e:
  msg = ('cuModuleLoadDataEx error:\n%s' % jiterrors.value.decode('utf8'))
  raise CudaAPIError(e.code, msg)
 info_log = jitinfo.value
 return Module(weakref.proxy(context), handle, info_log, _module_finalizer(context, handle))

def load_module_image ( context , image ) : logsz = os . environ . get ( 'NUMBAPRO_CUDA_LOG_SIZE' , 1024 ) jitinfo = ( c_char * logsz ) ( ) jiterrors = ( c_char * logsz ) ( ) options = { enums . CU_JIT_INFO_LOG_BUFFER : addressof ( jitinfo ) , enums . CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES : c_void_p ( logsz ) , enums . CU_JIT_ERROR_LOG_BUFFER : addressof ( jiterrors ) , enums . CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES : c_void_p ( logsz ) , enums . CU_JIT_LOG_VERBOSE : c_void_p ( VERBOSE_JIT_LOG ) } option_keys = ( drvapi . cu_jit_option * len ( options ) ) ( * options . keys ( ) ) option_vals = ( c_void_p * len ( options ) ) ( * options . values ( ) ) handle = drvapi . cu_module ( ) try : driver . cuModuleLoadDataEx ( byref ( handle ) , image , len ( options ) , option_keys , option_vals ) except CudaAPIError as e : msg = ( 'cuModuleLoadDataEx error:\n%s' % jiterrors . value . decode ( 'utf8' ) ) raise CudaAPIError ( e . code , msg ) info_log = jitinfo . value return Module ( weakref . proxy ( context ) , handle , info_log , _module_finalizer ( context , handle ) )
image must be a pointer .