Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
TissueForge::cuda::AngleConfig Struct Reference

CUDA runtime control interface for Tissue Forge angles. More...

#include <tfAngleConfig.h>

Static Public Member Functions

static bool onDevice ()
 Check whether the angles are currently on a device.
 
static int getDevice ()
 Get the id of the device designated for running angles.
 
static HRESULT toDevice ()
 Send angles to device. If angles are already on device, then the call is ignored.
 
static HRESULT fromDevice ()
 Pull engine from device. If engine is not on a device, then the call is ignored.
 
static HRESULT setBlocks (unsigned int numBlocks)
 Set the number of blocks of the CUDA configuration for a CUDA device.
 
static HRESULT setThreads (unsigned int numThreads)
 Set the number of threads of the CUDA configuration for a CUDA device.
 
static HRESULT refreshAngle (AngleHandle *bh)
 Update a angle on a CUDA device.
 
static HRESULT refreshAngles (std::vector< AngleHandle * > angles)
 Update angles on a CUDA device.
 
static HRESULT refresh ()
 Update all angles on a CUDA device.
 

Detailed Description

CUDA runtime control interface for Tissue Forge angles.

This object provides control for configuring angle calculations on CUDA devices.

At any time during a simulation, supported angle calculations can be sent to a particular CUDA device, or brought back to the CPU when deployed on a CUDA device. CUDA dynamic parallelism can also be specified before deploying angle calculations to a CUDA device. Future Tissue Forge versions will support deployment on multiple devices.

Member Function Documentation

◆ fromDevice()

static HRESULT TissueForge::cuda::AngleConfig::fromDevice ( )
static

Pull engine from device. If engine is not on a device, then the call is ignored.

Returns
HRESULT

◆ getDevice()

static int TissueForge::cuda::AngleConfig::getDevice ( )
static

Get the id of the device designated for running angles.

Returns
int

◆ onDevice()

static bool TissueForge::cuda::AngleConfig::onDevice ( )
static

Check whether the angles are currently on a device.

Returns
true
false

◆ refresh()

static HRESULT TissueForge::cuda::AngleConfig::refresh ( )
static

Update all angles on a CUDA device.

Useful for notifying the device that angles have changed.

If engine is not on a device, then the call is ignored.

Returns
HRESULT

◆ refreshAngle()

static HRESULT TissueForge::cuda::AngleConfig::refreshAngle ( AngleHandle * bh)
static

Update a angle on a CUDA device.

Useful for notifying the device that a angle has changed.

If engine is not on a device, then the call is ignored.

Parameters
bhangle to update
Returns
HRESULT

◆ refreshAngles()

static HRESULT TissueForge::cuda::AngleConfig::refreshAngles ( std::vector< AngleHandle * > angles)
static

Update angles on a CUDA device.

Useful for notifying the device that angles have changed.

If engine is not on a device, then the call is ignored.

Parameters
anglesangles to update
Returns
HRESULT

◆ setBlocks()

static HRESULT TissueForge::cuda::AngleConfig::setBlocks ( unsigned int numBlocks)
static

Set the number of blocks of the CUDA configuration for a CUDA device.

Throws an error if called when the angles are already deployed to a CUDA device.

Parameters
numBlocksnumber of blocks
Returns
HRESULT

◆ setThreads()

static HRESULT TissueForge::cuda::AngleConfig::setThreads ( unsigned int numThreads)
static

Set the number of threads of the CUDA configuration for a CUDA device.

Throws an error if called when angles are already deployed to a CUDA device.

Parameters
numThreadsnumber of threads
Returns
HRESULT

◆ toDevice()

static HRESULT TissueForge::cuda::AngleConfig::toDevice ( )
static

Send angles to device. If angles are already on device, then the call is ignored.

Returns
HRESULT

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