numba_dpex.core.utils.cgutils_extra¶
Overview¶
|
Insert declaration for a opencl builtin function. |
|
Returns the LLVM Value corresponding to a Numba type. |
|
Returns an LLVM pointer type for a give LLVM type object. |
|
Allocates a new LLVM Value storing a |
|
Returns an LLVM Constant storing a 64 bit representation for zero. |
|
Returns an LLVM Constant storing a 64 bit representation for one. |
Classes¶
Functions¶
- declare_function(context, builder, name, sig, cargs, mangler=mangle_c)¶
Insert declaration for a opencl builtin function. Uses the Itanium mangler.
- Parameters:
context (target context)
builder (llvm builder)
name (str) – symbol name
sig (signature) – function signature of the symbol being declared
cargs (sequence of str) – C type names for the arguments
mangler (a mangler function) – function to use to mangle the symbol
- get_llvm_type(context, type)¶
Returns the LLVM Value corresponding to a Numba type.
- Parameters:
context – The LLVM context or the execution state of the current IR
generator.
type – A Numba type object.
- Returns: An Python object wrapping an LLVM Value corresponding to the
specified Numba type.
- get_llvm_ptr_type(type)¶
Returns an LLVM pointer type for a give LLVM type object.
- Parameters:
type – An LLVM type for which we need the corresponding pointer type.
Returns: An LLVM pointer type object corresponding to the input LLVM type.
- create_null_ptr(builder, context)¶
Allocates a new LLVM Value storing a
void*
and returns the Value to caller.- Parameters:
builder – The LLVM IR builder to be used for code generation.
context – The LLVM IR builder context.
Returns: An LLVM value storing a null pointer
- get_zero(context)¶
Returns an LLVM Constant storing a 64 bit representation for zero.
- Parameters:
context – The LLVM IR builder context.
Returns: An LLVM Constant Value storing zero.
- get_one(context)¶
Returns an LLVM Constant storing a 64 bit representation for one.
- Parameters:
context – The LLVM IR builder context.
Returns: An LLVM Constant Value storing one.