# loki.backend.cudagen module

cudagen(ir, **kwargs)

  Generate standardized CUDA code from one or many IR objects/trees.

class CudaCodegen(depth=0, indent=' ', linewidth=90, **kwargs)

  Bases: `CppCodegen`

  Tree visitor to generate standardized CUDA code from IR.

  standard_imports = ['stdio.h', 'stdbool.h', 'float.h', 'math.h', 'cuda.h', 'cuda_runtime.h']
  visit_CallStatement(o, **kwargs)
    Format call statement as

      <name>(<args>)

class CudaCodeMapper(intrinsic_type_mapper, *args, **kwargs)

  Bases: `CppCodeMapper`

  A `StringifyMapper`-derived visitor for Pymbolic expression trees that converts an expression to a string adhering to standardized CUDA.