code: def make_declare(loop_orders, dtypes, sub):
      """
      Produce code to declare all necessary variables.
  
      """
      decl = ""
      for i, (loop_order, dtype) in enumerate(zip(loop_orders, dtypes)):
          var = sub[
              "lv%i" % i
          ]  # input name corresponding to ith loop variable
          # we declare an iteration variable
          # and an integer for the number of dimensions
          decl += (
              """
          %(dtype)s* %(var)s_iter;
          """
              % locals()
          )
          for j, value in enumerate(loop_order):
              if value != "x":
                  # If the dimension is not broadcasted, we declare
                  # the number of elements in that dimension,
                  # the stride in that dimension,
                  # and the jump from an iteration to the next
                  decl += (
                      """
                  npy_intp %(var)s_n%(value)i;
                  ssize_t %(var)s_stride%(value)i;
                  int %(var)s_jump%(value)i_%(j)i;
                  """
                      % locals()
                  )
              else:
                  # if the dimension is broadcasted, we only need
                  # the jump (arbitrary length and stride = 0)
                  decl += (
                      """
                  int %(var)s_jump%(value)s_%(j)i;
                  """
                      % locals()
                  )
  
      return decl
  
file_path: Theano/theano/tensor/elemwise_cgen.py
imports: from __future__ import absolute_import, print_function, division
  from six.moves import xrange
  import theano
label_desc: Use image node_id 1 for calling a global function with example usage: make_declare(loop_orders, dtypes, sub) and returns: decl