code: def get_minmax_kernel(what, dtype):
      if dtype == np.float64:
          reduce_expr = "f%s(a,b)" % what
      elif dtype == np.float32:
          reduce_expr = "f%sf(a,b)" % what
      elif dtype.kind in "iu":
          reduce_expr = "%s(a,b)" % what
      else:
          raise TypeError("unsupported dtype specified")
  
      return ReductionKernel(
          dtype,
          neutral=get_minmax_neutral(what, dtype),
          reduce_expr=f"{reduce_expr}",
          arguments="const %(tp)s *in"
          % {
              "tp": dtype_to_ctype(dtype),
          },
          preamble="#define MY_INFINITY (1./0)",
      )
  
file_path: pycuda/pycuda/reduction.py
imports: from pycuda.tools import context_dependent_memoize
  from pycuda.tools import dtype_to_ctype
  import numpy
label_desc: Use image node_id 10 for calling a global function with example usage: get_minmax_kernel(what, dtype) and returns: ReductionKernel