code: def shift():
      code = (
          shift_element()
          + r"""
  __global__ void shift(
      float *a, float *b, float *c, bool value, int sizea, int b_rows, int b_cols)
  {
      int i = blockIdx.x * blockDim.x + threadIdx.x;
  
      if (i < sizea) {
          float bi;
          if (b_rows > 1 && b_cols > 1) {
              bi = b[i];
          } else if (b_rows > 1 && b_cols == 1) {
              int step = sizea/b_rows;
              bi = b[i/step];
          } else if (b_rows == 1 && b_cols > 1) {
              bi = b[i % b_cols];
          } else if (b_rows == 1 && b_cols == 1) {
              bi = b[0];
          }
  
          c[i] = shift_element(a[i], bi, value);
      }
  }
  """
      )
  
      module = SourceModule(code)
      kernel = module.get_function("shift")
      sig = "3P 4I"
      kernel.prepare(sig)
      return kernel
  
file_path: neon/neon/backends/kernels/cuda/binary.py
imports: from pycuda.compiler import SourceModule
  from pycuda.tools import context_dependent_memoize
label_desc: Use image node_id 6 for calling a global function with example usage: shift() and returns: kernel