todo
More...
#include <openvdb_ax/codegen/FunctionTypes.h>
|
| FunctionGroup (const char *name, const char *doc, const FunctionList &list) |
|
| ~FunctionGroup ()=default |
|
const Function * | match (const std::vector< llvm::Type * > &types, llvm::LLVMContext &C, Function::SignatureMatch *type=nullptr) const |
| Given a vector of llvm types, automatically returns the best possible function declaration from the stored function list. The 'best' declaration is determined by the provided types compatibility to each functions signature. More...
|
|
llvm::Value * | execute (const std::vector< llvm::Value * > &args, llvm::IRBuilder<> &B) const |
| Given a vector of llvm values, find the best possible function signature, generate and execute the function body. Returns the return value of the function (nullptr if void). The behaviour is undefined if a valid match does not exist. For such cases, call the second version of FunctionGroup::execute. More...
|
|
const Function * | execute (const std::vector< llvm::Value * > &args, llvm::IRBuilder<> &B, llvm::Value *&result) const |
| Given a vector of llvm values, find the best possible function signature, generate and execute the function body. Returns the Function that was selected and executed or a nullptr if no valid match was found. Sets the result variable to the return value of the function (nullptr if void). If no match is found, the result variable if left unset. More...
|
|
const FunctionList & | list () const |
| Accessor to the underlying function signature list. More...
|
|
const char * | name () const |
|
const char * | doc () const |
|
const char* doc |
( |
| ) |
const |
|
inline |
llvm::Value* execute |
( |
const std::vector< llvm::Value * > & |
args, |
|
|
llvm::IRBuilder<> & |
B |
|
) |
| const |
Given a vector of llvm values, find the best possible function signature, generate and execute the function body. Returns the return value of the function (nullptr if void). The behaviour is undefined if a valid match does not exist. For such cases, call the second version of FunctionGroup::execute.
- Note
- This function will throw if no valid return is provided by the matched declaration implementation.
- Parameters
-
args | A vector of values representing the function arguments |
B | The current llvm IRBuilder |
const Function* execute |
( |
const std::vector< llvm::Value * > & |
args, |
|
|
llvm::IRBuilder<> & |
B, |
|
|
llvm::Value *& |
result |
|
) |
| const |
Given a vector of llvm values, find the best possible function signature, generate and execute the function body. Returns the Function that was selected and executed or a nullptr if no valid match was found. Sets the result variable to the return value of the function (nullptr if void). If no match is found, the result variable if left unset.
- Note
- This function will throw if no valid return is provided by the matched declaration implementation.
- Parameters
-
args | A vector of values representing the function arguments |
B | The current llvm IRBuilder |
result | The result to set. nullptr on void return. |
- Returns
- The matched function. nullptr if no match was found
Accessor to the underlying function signature list.
Given a vector of llvm types, automatically returns the best possible function declaration from the stored function list. The 'best' declaration is determined by the provided types compatibility to each functions signature.
- Note
- If multiple implicit matches are found, the first match is returned.
-
Returns a nullptr if no compatible match was found or if the function list is empty. A compatible match is defined as an Explicit or Implicit match.
- Parameters
-
types | A vector of types representing the function argument types |
C | The llvm context |
type | If provided, type is set to the type of match that occurred |
const char* name |
( |
| ) |
const |
|
inline |