class_docstr: May be used during code generation time to be queried for
  shape/strides/suboffsets attributes, or to perform indexing or slicing.
class_docstr_tok: ["May","be","used","during","code","generation","time","to","be","queried","for","shape\/strides\/suboffsets","attributes",",","or","to","perform","indexing","or","slicing","."]
docstr: Generate a single expression that indexes the memory view slice
  in each dimension.
docstr_tok: ["Generate","a","single","expression","that","indexes","the","memory","view","slice","in","each","dimension","."]
code: def _generate_buffer_lookup_code(self, code, axes, cast_result=True):
      """
      Generate a single expression that indexes the memory view slice
      in each dimension.
      """
      bufp = self.buf_ptr
      type_decl = self.type.dtype.empty_declaration_code()
  
      for dim, index, access, packing in axes:
          shape = "%s.shape[%d]" % (self.cname, dim)
          stride = "%s.strides[%d]" % (self.cname, dim)
          suboffset = "%s.suboffsets[%d]" % (self.cname, dim)
  
          flag = get_memoryview_flag(access, packing)
  
          if flag in ("generic", "generic_contiguous"):
              # Note: we cannot do cast tricks to avoid stride multiplication
              #       for generic_contiguous, as we may have to do (dtype *)
              #       or (dtype **) arithmetic, we won't know which unless
              #       we check suboffsets
              code.globalstate.use_utility_code(
                  memviewslice_index_helpers
              )
              bufp = "__pyx_memviewslice_index_full(%s, %s, %s, %s)" % (
                  bufp,
                  index,
                  stride,
                  suboffset,
              )
  
          elif flag == "indirect":
              bufp = "(%s + %s * %s)" % (bufp, index, stride)
              bufp = "(*((char **) %s) + %s)" % (bufp, suboffset)
  
          elif flag == "indirect_contiguous":
              # Note: we do char ** arithmetic
              bufp = "(*((char **) %s + %s) + %s)" % (
                  bufp,
                  index,
                  suboffset,
              )
  
          elif flag == "strided":
              bufp = "(%s + %s * %s)" % (bufp, index, stride)
  
          else:
              assert flag == "contiguous", flag
              bufp = "((char *) (((%s *) %s) + %s))" % (
                  type_decl,
                  bufp,
                  index,
              )
  
          bufp = "( /* dim=%d */ %s )" % (dim, bufp)
  
      if cast_result:
          return "((%s *) %s)" % (type_decl, bufp)
  
      return bufp
  
imports: from __future__ import absolute_import
  from .Errors import CompileError, error
  from .None import ExprNodes
  from .ExprNodes import IntNode, NameNode, AttributeNode
  from .None import Options
  from .Code import UtilityCode, TempitaUtilityCode
  from .UtilityCode import CythonUtilityCode
  from .None import Buffer
  from .None import PyrexTypes
  from .None import ModuleNode
label_desc: Use image node_id 6 for calling the MemoryViewSliceBufferEntry obj's underlying member method code with example usage: obj._generate_buffer_lookup_code(code, axes, cast_result) and returns: bufp, unknown