GPUOcelot
Classes | Public Types | Public Member Functions

ir::ExternalFunctionSet Class Reference

Holds a collection of external functions. More...

#include <ExternalFunctionSet.h>

List of all members.

Classes

class  ExternalFunction

Public Types

typedef std::map< std::string,
ExternalFunction
FunctionSet

Public Member Functions

 ExternalFunctionSet ()
 Establish a link with llvm.
 ~ExternalFunctionSet ()
void add (const std::string &name, void *pointer)
 Add a new external function that is callable from PTX kernels.
void remove (const std::string &name)
 Remove a function by name.
ExternalFunctionfind (const std::string &name) const
 Get a callable external function or 0 if it doesn't exist.

Detailed Description

Holds a collection of external functions.

The idea here is to allow arbitrary PTX functions to call into external functions. The major issue is that we need a portable way of passing parameters for different calling conventions. The selected way of doing this is using LLVM to jit-compile a layer for performing the call. This is done on both the emulator and the LLVM jit. For other targets, we either use host RPCs or rely on the lower layer to provide an implementation of built-in functions.


Member Typedef Documentation


Constructor & Destructor Documentation

ir::ExternalFunctionSet::ExternalFunctionSet ( )

Establish a link with llvm.

ir::ExternalFunctionSet::~ExternalFunctionSet ( )

Teardown the link with llvm


Member Function Documentation

void ir::ExternalFunctionSet::add ( const std::string &  name,
void *  pointer 
)

Add a new external function that is callable from PTX kernels.

ExternalFunctionSet::ExternalFunction * ir::ExternalFunctionSet::find ( const std::string &  name) const

Get a callable external function or 0 if it doesn't exist.

void ir::ExternalFunctionSet::remove ( const std::string &  name)

Remove a function by name.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines