OpenVDB: LLVMType< T > Struct Template Reference

OpenVDB 9.1.0

Static Public Member Functions | List of all members
LLVMType< T > Struct Template Reference

LLVM type mapping from pod types. More...

`#include <openvdb_ax/codegen/Types.h>`

Inheritance diagram for LLVMType< T >:

## Static Public Member Functions
static llvm::Type * | get (llvm::LLVMContext &C)
| Return an LLVM type which represents T. More...
static llvm::Constant * | get (llvm::LLVMContext &C, const T V)
| Return an LLVM constant Value which represents T value. More...
static llvm::Constant * | get (llvm::LLVMContext &C, const T *const V)
| Return an LLVM constant which holds an uintptr_t, representing the current address of the given value. More...

## Detailed Description

template<typename T>
struct openvdb::v9_1::ax::codegen::LLVMType< T >

LLVM type mapping from pod types.

Note
  LLVM Types do not store information about the value sign, only meta information about the primitive type (i.e. float, int, pointer) and the precision width. LLVMType<uint64_t>::get(C) will provide the same type as LLVMType<int64_t>::get(C), however sign is taken into account during construction of LLVM constants.
  LLVMType classes are importantly used to provided automatic external function mapping. Note that references are not supported, pointers should be used instead.
  Provide your own custom class mapping by specializing the below.

## Member Function Documentation

## ◆ get() [1/3]

static llvm::Type * get | ( | llvm::LLVMContext & | C | ) |
| inlinestatic

Return an LLVM type which represents T.

Parameters

  C | The LLVMContext to request the Type from.

## ◆ get() [2/3]

static llvm::Constant * get | ( | llvm::LLVMContext & | C,
|  | const T *const | V
| ) |  |
| inlinestatic

Return an LLVM constant which holds an uintptr_t, representing the current address of the given value.

Parameters

  C | The LLVMContext
  V | The address of a given type to convert to an LLVM constant

## ◆ get() [3/3]

static llvm::Constant * get | ( | llvm::LLVMContext & | C,
|  | const T | V
| ) |  |
| inlinestatic

Return an LLVM constant Value which represents T value.

Parameters

  C | The LLVMContext
  V | The value to convert to an LLVM constant

Returns
  If successful, returns a pointer to an LLVM constant which holds the value T.