class_docstr: A kernel that takes a number of scalar or vector *arguments* and performs
  an *operation* specified as a snippet of C on these arguments.
  
  :arg arguments: a string formatted as a C argument list.
  :arg operation: a snippet of C that carries out the desired 'map'
      operation.  The current index is available as the variable *i*.
      *operation* may contain the statement ``PYOPENCL_ELWISE_CONTINUE``,
      which will terminate processing for the current element.
  :arg name: the function name as which the kernel is compiled
  :arg options: passed unmodified to :meth:`pyopencl.Program.build`.
  :arg preamble: a piece of C source code that gets inserted outside of the
      function context in the elementwise operation's kernel source code.
  
  .. warning :: Using a ``return`` statement in *operation* will lead to
      incorrect results, as some elements may never get processed. Use
      ``PYOPENCL_ELWISE_CONTINUE`` instead.
  
  .. versionchanged:: 2013.1
  
      Added ``PYOPENCL_ELWISE_CONTINUE``.
  
  .. automethod:: __call__
class_docstr_tok: ["A","kernel","that","takes","a","number","of","scalar","or","vector","*","arguments","*","and","performs","an","*","operation","*","specified","as","a","snippet","of","C","on","these","arguments",".",":","arg","arguments",":","a","string","formatted","as","a","C","argument","list",".",":","arg","operation",":","a","snippet","of","C","that","carries","out","the","desired","'map'","operation",".","The","current","index","is","available","as","the","variable","*","i","*",".","*","operation","*","may","contain","the","statement","``","PYOPENCL_ELWISE_CONTINUE","``",",","which","will","terminate","processing","for","the","current","element",".",":","arg","name",":","the","function","name","as","which","the","kernel","is","compiled",":","arg","options",":","passed","unmodified","to",":","meth",":","`","pyopencl.Program.build","`",".",":","arg","preamble",":","a","piece","of","C","source","code","that","gets","inserted","outside","of","the","function","context","in","the","elementwise","operation","'s","kernel","source","code",".","..","warning",":",":","Using","a","``","return","``","statement","in","*","operation","*","will","lead","to","incorrect","results",",","as","some","elements","may","never","get","processed",".","Use","``","PYOPENCL_ELWISE_CONTINUE","``","instead",".","..","versionchanged",":",":","2013.1","Added","``","PYOPENCL_ELWISE_CONTINUE","``",".","..","automethod",":",":","__call__"]
code: def get_kernel(self, use_range: bool):
      knl, arg_descrs = get_elwise_kernel_and_types(
          self.context,
          self.arguments,
          self.operation,
          name=self.name,
          options=self.options,
          use_range=use_range,
          **self.kwargs,
      )
  
      for arg in arg_descrs:
          if isinstance(arg, VectorArg) and not arg.with_offset:
              from warnings import warn
  
              warn(
                  f"ElementwiseKernel '{self.name}' used with VectorArgs "
                  "that do not have offset support enabled. This usage is "
                  "deprecated. Just pass with_offset=True to VectorArg, "
                  "everything should sort itself out automatically.",
                  DeprecationWarning,
                  stacklevel=2,
              )
  
      if not any(isinstance(arg, VectorArg) for arg in arg_descrs):
          raise RuntimeError(
              "ElementwiseKernel can only be used with functions that have "
              "at least one vector argument"
          )
  
      return knl, arg_descrs
  
imports: import enum
  from typing import Any, List, Optional, Tuple, Union
  import numpy
  import pyopencl
  from pyopencl.tools import context_dependent_memoize
  from pyopencl.tools import dtype_to_ctype, DtypedArgument, VectorArg, ScalarArg, KernelTemplateBase, dtype_to_c_struct
  from pytools import memoize_method
label_desc: Use image node_id 2 for calling the ElementwiseKernel obj's underlying member method code with example usage: obj.get_kernel(use_range) and returns: knl,  arg_descrs