GPUOcelot
Public Types | Public Member Functions | Public Attributes

executive::EmulatorDevice::Module Class Reference

A class for holding the state associated with a module. More...

#include <EmulatorDevice.h>

Inheritance diagram for executive::EmulatorDevice::Module:
Inheritance graph
[legend]
Collaboration diagram for executive::EmulatorDevice::Module:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::unordered_map
< std::string, void * > 
GlobalMap
 This is a map from a global name to a pointer.
typedef std::unordered_map
< std::string,
ExecutableKernel * > 
KernelMap
 A map from a kernel name to its translation.
typedef std::vector
< MemoryAllocation * > 
AllocationVector
 A vector of memory allocations.
typedef ir::Module::TextureMap TextureMap
 A map from texture names to references.

Public Member Functions

 Module (const ir::Module *m=0, Device *d=0)
 Construct this based on a module.
 Module (const Module &m)
 Copy constructor.
virtual ~Module ()
 Clean up all translated kernels.
AllocationVector loadGlobals ()
 Load all of the globals for this module.
virtual ExecutableKernelgetKernel (const std::string &name)
 Get a specific kernel or 0.
ir::TexturegetTexture (const std::string &name)
 Get a handle to a specific texture or 0.

Public Attributes

const ir::Moduleir
 The ir representation of a module.
Devicedevice
 The emulator.
GlobalMap globals
 The set of global allocations in the module.
KernelMap kernels
 The set of translated kernels.
TextureMap textures
 A duplicate copy of textures.

Detailed Description

A class for holding the state associated with a module.


Member Typedef Documentation

A vector of memory allocations.

typedef std::unordered_map<std::string, void*> executive::EmulatorDevice::Module::GlobalMap

This is a map from a global name to a pointer.

typedef std::unordered_map<std::string, ExecutableKernel*> executive::EmulatorDevice::Module::KernelMap

A map from a kernel name to its translation.

A map from texture names to references.


Constructor & Destructor Documentation

executive::EmulatorDevice::Module::Module ( const ir::Module m = 0,
Device d = 0 
)

Construct this based on a module.

executive::EmulatorDevice::Module::Module ( const Module m)

Copy constructor.

executive::EmulatorDevice::Module::~Module ( ) [virtual]

Clean up all translated kernels.


Member Function Documentation

ExecutableKernel * executive::EmulatorDevice::Module::getKernel ( const std::string &  name) [virtual]

Get a specific kernel or 0.

ir::Texture * executive::EmulatorDevice::Module::getTexture ( const std::string &  name)

Get a handle to a specific texture or 0.

EmulatorDevice::Module::AllocationVector executive::EmulatorDevice::Module::loadGlobals ( )

Load all of the globals for this module.


Member Data Documentation

The emulator.

The set of global allocations in the module.

The ir representation of a module.

The set of translated kernels.

A duplicate copy of textures.


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