code: def get_subset_minmax_kernel(what, dtype, dtype_subset):
      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}",
          map_expr="in[lookup_tbl[i]]",
          arguments="const %(tp_lut)s *lookup_tbl, "
          "const %(tp)s *in"
          % {
              "tp": dtype_to_ctype(dtype),
              "tp_lut": dtype_to_ctype(dtype_subset),
          },
          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 11 for calling a global function with example usage: get_subset_minmax_kernel(what, dtype, dtype_subset) and returns: ReductionKernel