Classes | Public Member Functions | Public Attributes

btSoftBodyLinkDataDX11SIMDAware Class Reference

#include <btSoftBodySolverLinkData_DX11SIMDAware.h>

Inheritance diagram for btSoftBodyLinkDataDX11SIMDAware:
Inheritance graph
[legend]
Collaboration diagram for btSoftBodyLinkDataDX11SIMDAware:
Collaboration graph
[legend]

List of all members.

Classes

struct  BatchPair
struct  NumBatchesVerticesPair

Public Member Functions

 btSoftBodyLinkDataDX11SIMDAware (ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext)
virtual ~btSoftBodyLinkDataDX11SIMDAware ()
virtual void createLinks (int numLinks)
 Allocate enough space in all link-related arrays to fit numLinks links.
virtual void setLinkAt (const LinkDescription &link, int linkIndex)
 Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks.
virtual bool onAccelerator ()
 Return true if data is on the accelerator.
virtual bool moveToAccelerator ()
 Move data from host memory to the accelerator.
virtual bool moveFromAccelerator ()
 Move data from host memory from the accelerator.
void generateBatches ()
 Generate (and later update) the batching for the entire link set.
int getMaxVerticesPerWavefront ()
int getWavefrontSize ()
int getLinksPerWorkItem ()
int getMaxLinksPerWavefront ()
int getMaxBatchesPerWavefront ()
int getNumWavefronts ()
NumBatchesVerticesPair getNumBatchesAndVerticesWithinWavefront (int wavefront)
int getVertexGlobalAddresses (int vertexIndex)
LinkNodePair getVertexPairLocalAddresses (int linkIndex)
 Get post-batching local addresses of the vertex pair for a link assuming all vertices used by a wavefront are loaded locally.

Public Attributes

bool m_onGPU
ID3D11Device * m_d3dDevice
ID3D11DeviceContext * m_d3dDeviceContext
const int m_wavefrontSize
const int m_linksPerWorkItem
const int m_maxLinksPerWavefront
int m_maxBatchesWithinWave
int m_maxVerticesWithinWave
int m_numWavefronts
int m_maxVertex
btAlignedObjectArray< int > m_linksPerWavefront
btAlignedObjectArray
< NumBatchesVerticesPair
m_numBatchesAndVerticesWithinWaves
btDX11Buffer
< NumBatchesVerticesPair
m_dx11NumBatchesAndVerticesWithinWaves
btAlignedObjectArray< int > m_wavefrontVerticesGlobalAddresses
btDX11Buffer< int > m_dx11WavefrontVerticesGlobalAddresses
btAlignedObjectArray
< LinkNodePair
m_linkVerticesLocalAddresses
btDX11Buffer< LinkNodePairm_dx11LinkVerticesLocalAddresses
btDX11Buffer< float > m_dx11LinkStrength
btDX11Buffer< float > m_dx11LinksMassLSC
btDX11Buffer< float > m_dx11LinksRestLengthSquared
btDX11Buffer< float > m_dx11LinksRestLength
btDX11Buffer< float > m_dx11LinksMaterialLinearStiffnessCoefficient
btAlignedObjectArray< int > m_linkAddresses
 Link addressing information for each cloth.
btAlignedObjectArray< BatchPairm_wavefrontBatchStartLengths
 Start and length values for computation batches over link data.

Detailed Description

Definition at line 26 of file btSoftBodySolverLinkData_DX11SIMDAware.h.


Constructor & Destructor Documentation

btSoftBodyLinkDataDX11SIMDAware::btSoftBodyLinkDataDX11SIMDAware ( ID3D11Device *  d3dDevice,
ID3D11DeviceContext *  d3dDeviceContext 
)
btSoftBodyLinkDataDX11SIMDAware::~btSoftBodyLinkDataDX11SIMDAware (  )  [virtual]

Definition at line 86 of file btSoftBodySolver_DX11SIMDAware.cpp.


Member Function Documentation

void btSoftBodyLinkDataDX11SIMDAware::createLinks ( int  numLinks  )  [virtual]

Allocate enough space in all link-related arrays to fit numLinks links.

Reimplemented from btSoftBodyLinkData.

Definition at line 96 of file btSoftBodySolver_DX11SIMDAware.cpp.

void btSoftBodyLinkDataDX11SIMDAware::generateBatches (  ) 

Generate (and later update) the batching for the entire link set.

This redoes a lot of work because it batches the entire set when each cloth is inserted. In theory we could delay it until just before we need the cloth. It's a one-off overhead, though, so that is a later optimisation.

Definition at line 885 of file btSoftBodySolver_DX11SIMDAware.cpp.

int btSoftBodyLinkDataDX11SIMDAware::getLinksPerWorkItem (  )  [inline]

Definition at line 132 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

int btSoftBodyLinkDataDX11SIMDAware::getMaxBatchesPerWavefront (  )  [inline]

Definition at line 142 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

int btSoftBodyLinkDataDX11SIMDAware::getMaxLinksPerWavefront (  )  [inline]

Definition at line 137 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

int btSoftBodyLinkDataDX11SIMDAware::getMaxVerticesPerWavefront (  )  [inline]

Definition at line 122 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

NumBatchesVerticesPair btSoftBodyLinkDataDX11SIMDAware::getNumBatchesAndVerticesWithinWavefront ( int  wavefront  )  [inline]

Definition at line 152 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

int btSoftBodyLinkDataDX11SIMDAware::getNumWavefronts (  )  [inline]

Definition at line 147 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

int btSoftBodyLinkDataDX11SIMDAware::getVertexGlobalAddresses ( int  vertexIndex  )  [inline]

Definition at line 157 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

LinkNodePair btSoftBodyLinkDataDX11SIMDAware::getVertexPairLocalAddresses ( int  linkIndex  )  [inline]

Get post-batching local addresses of the vertex pair for a link assuming all vertices used by a wavefront are loaded locally.

Definition at line 165 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

int btSoftBodyLinkDataDX11SIMDAware::getWavefrontSize (  )  [inline]

Definition at line 127 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

bool btSoftBodyLinkDataDX11SIMDAware::moveFromAccelerator (  )  [virtual]

Move data from host memory from the accelerator.

The CPU version will always return that it has moved it.

Reimplemented from btSoftBodyLinkData.

Definition at line 144 of file btSoftBodySolver_DX11SIMDAware.cpp.

bool btSoftBodyLinkDataDX11SIMDAware::moveToAccelerator (  )  [virtual]

Move data from host memory to the accelerator.

The CPU version will always return that it has moved it.

Reimplemented from btSoftBodyLinkData.

Definition at line 125 of file btSoftBodySolver_DX11SIMDAware.cpp.

bool btSoftBodyLinkDataDX11SIMDAware::onAccelerator (  )  [virtual]

Return true if data is on the accelerator.

The CPU version of this class will return true here because the CPU is the same as the accelerator.

Reimplemented from btSoftBodyLinkData.

Definition at line 120 of file btSoftBodySolver_DX11SIMDAware.cpp.

void btSoftBodyLinkDataDX11SIMDAware::setLinkAt ( const LinkDescription link,
int  linkIndex 
) [virtual]

Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks.

Reimplemented from btSoftBodyLinkData.

Definition at line 107 of file btSoftBodySolver_DX11SIMDAware.cpp.


Member Data Documentation

Definition at line 30 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 31 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 61 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 64 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 63 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 62 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 60 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 59 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 51 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 57 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Link addressing information for each cloth.

Allows link locations to be computed independently of data batching.

Definition at line 88 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 49 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 34 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 58 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 36 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 35 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 40 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 37 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 50 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 38 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 29 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Start and length values for computation batches over link data.

Definition at line 93 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 33 of file btSoftBodySolverLinkData_DX11SIMDAware.h.

Definition at line 56 of file btSoftBodySolverLinkData_DX11SIMDAware.h.


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