def _build_element_wise_ufunc_wrapper(cres, signature):
 ctx = cres.target_context
 library = cres.library
 fname = cres.fndesc.llvm_func_name
 env = None
 if cres.objectmode:
  env = cres.environment
  assert (env is not None)
  ll_intp = cres.target_context.get_value_type(types.intp)
  ll_pyobj = cres.target_context.get_value_type(types.pyobject)
  envptr = lc.Constant.int(ll_intp, id(env)).inttoptr(ll_pyobj)
 else:
  envptr = None
 ptr = build_ufunc_wrapper(library, ctx, fname, signature, cres.objectmode, envptr, env)
 dtypenums = [as_dtype(a).num for a in signature.args]
 dtypenums.append(as_dtype(signature.return_type).num)
 return (dtypenums, ptr, env)

def _build_element_wise_ufunc_wrapper ( cres , signature ) : ctx = cres . target_context library = cres . library fname = cres . fndesc . llvm_func_name env = None if cres . objectmode : env = cres . environment assert ( env is not None ) ll_intp = cres . target_context . get_value_type ( types . intp ) ll_pyobj = cres . target_context . get_value_type ( types . pyobject ) envptr = lc . Constant . int ( ll_intp , id ( env ) ) . inttoptr ( ll_pyobj ) else : envptr = None ptr = build_ufunc_wrapper ( library , ctx , fname , signature , cres . objectmode , envptr , env ) dtypenums = [ as_dtype ( a ) . num for a in signature . args ] dtypenums . append ( as_dtype ( signature . return_type ) . num ) return ( dtypenums , ptr , env )
build a wrapper for the ufunc loop entry point given by the compilation result object .