OWL
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
owl::Module Struct Reference

#include <Module.h>

Inheritance diagram for owl::Module:
owl::RegisteredObject owl::ContextObject owl::Object

Classes

struct  DeviceData
 

Public Types

typedef std::shared_ptr< ModuleSP
 
- Public Types inherited from owl::ContextObject
typedef std::shared_ptr< ContextObjectSP
 
- Public Types inherited from owl::Object
typedef std::shared_ptr< ObjectSP
 

Public Member Functions

 Module (Context *context, const std::string &ptxCode)
 
 Module (Context *context, const std::vector< uint8_t > &IR)
 
virtual ~Module ()
 
std::string toString () const override
 
DeviceDatagetDD (const DeviceContext::SP &device) const
 
RegisteredObject::DeviceData::SP createOn (const DeviceContext::SP &device) override
 
- Public Member Functions inherited from owl::RegisteredObject
 RegisteredObject (Context *const context, ObjectRegistry &registry)
 
- Public Member Functions inherited from owl::ContextObject
 ContextObject (Context *const context)
 
std::string toString () const override
 
- Public Member Functions inherited from owl::Object
 Object ()
 
virtual std::string toString () const
 
virtual DeviceData::SP createOn (const std::shared_ptr< DeviceContext > &device)
 
void createDeviceData (const std::vector< std::shared_ptr< DeviceContext > > &devices)
 
template<typename T >
std::shared_ptr< T > as ()
 

Public Attributes

bool useIR = false
 
const std::string ptxCode
 
const std::vector< uint8_t > optixIRCode
 
- Public Attributes inherited from owl::RegisteredObject
int ID
 
ObjectRegistryregistry
 
- Public Attributes inherited from owl::ContextObject
Context *const context
 
- Public Attributes inherited from owl::Object
const size_t uniqueID
 
std::vector< DeviceData::SP > deviceData
 

Additional Inherited Members

- Static Public Attributes inherited from owl::Object
static std::atomic< uint64_t > nextAvailableID
 

Detailed Description

captures the concept of a module that contains one or more programs.

Constructor & Destructor Documentation

◆ Module() [1/2]

owl::Module::Module ( Context context,
const std::string &  ptxCode 
)

constructor - ptxCode contains the prec-ompiled ptx code with the compiled functions

◆ Module() [2/2]

owl::Module::Module ( Context context,
const std::vector< uint8_t > &  IR 
)

constructor - IR contains the pre-compiled optix IR

constructor - IR contains the precompiled Optix IR code

◆ ~Module()

owl::Module::~Module ( )
virtual

destructor, to release data if required

Member Function Documentation

◆ createOn()

RegisteredObject::DeviceData::SP owl::Module::createOn ( const DeviceContext::SP &  device)
override

create this object's device-specific data for the device

◆ getDD()

Module::DeviceData & owl::Module::getDD ( const DeviceContext::SP &  device) const
inline

get reference to given device-specific data for this object

◆ toString()

std::string owl::Module::toString ( ) const
overridevirtual

pretty-printer, for printf-debugging

Reimplemented from owl::Object.

Member Data Documentation

◆ optixIRCode

const std::vector<uint8_t> owl::Module::optixIRCode

the precompiled OptiX IR supplied by the user

◆ ptxCode

const std::string owl::Module::ptxCode

the precompiled PTX code supplied by the user

◆ useIR

bool owl::Module::useIR = false

a flag tracking if we're using OptiX IR or PTX. For now, assuming PTX as default.


The documentation for this struct was generated from the following files: