Defines | Functions | Variables

btSoftBodySolver_OpenCLSIMDAware.cpp File Reference

#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
#include "vectormath/vmInclude.h"
#include <stdio.h>
#include "btSoftBodySolver_OpenCLSIMDAware.h"
#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
#include "BulletSoftBody/btSoftBody.h"
#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
#include <limits.h>
#include "OpenCLC10/UpdatePositionsFromVelocities.cl"
#include "OpenCLC10/SolvePositionsSIMDBatched.cl"
#include "OpenCLC10/UpdateNodes.cl"
#include "OpenCLC10/UpdatePositions.cl"
#include "OpenCLC10/UpdateConstants.cl"
#include "OpenCLC10/Integrate.cl"
#include "OpenCLC10/ApplyForces.cl"
#include "OpenCLC10/UpdateFixedVertexPositions.cl"
#include "OpenCLC10/UpdateNormals.cl"
#include "OpenCLC10/VSolveLinks.cl"
#include "OpenCLC10/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl"
#include "OpenCLC10/OutputToVertexArray.cl"
Include dependency graph for btSoftBodySolver_OpenCLSIMDAware.cpp:

Go to the source code of this file.

Defines

#define WAVEFRONT_SIZE   32
#define WAVEFRONT_BLOCK_MULTIPLIER   2
#define GROUP_SIZE   (WAVEFRONT_SIZE*WAVEFRONT_BLOCK_MULTIPLIER)
#define LINKS_PER_SIMD_LANE   16
#define MSTRINGIFY(A)   #A

Functions

static const char m_wavefrontSize (WAVEFRONT_SIZE)
static const char m_linksPerWorkItem (LINKS_PER_SIMD_LANE)
static const char m_maxBatchesWithinWave (0)
static const char m_maxLinksPerWavefront (m_wavefrontSize *m_linksPerWorkItem)
static const char m_numWavefronts (0)
static const char m_maxVertex (0)
static const char m_clNumBatchesAndVerticesWithinWaves (queue, ctx,&m_numBatchesAndVerticesWithinWaves, true)
static const char m_clWavefrontVerticesGlobalAddresses (queue, ctx,&m_wavefrontVerticesGlobalAddresses, true)
static const char m_clLinkVerticesLocalAddresses (queue, ctx,&m_linkVerticesLocalAddresses, true)
static const char m_clLinkStrength (queue, ctx,&m_linkStrength, false)
static const char m_clLinksMassLSC (queue, ctx,&m_linksMassLSC, false)
static const char m_clLinksRestLengthSquared (queue, ctx,&m_linksRestLengthSquared, false)
static const char m_clLinksRestLength (queue, ctx,&m_linksRestLength, false)
static const char m_clLinksMaterialLinearStiffnessCoefficient (queue, ctx,&m_linksMaterialLinearStiffnessCoefficient, false)
static Vectormath::Aos::Vector3 toVector3 (const btVector3 &vec)
static Vectormath::Aos::Transform3 toTransform3 (const btTransform &transform)
static void generateBatchesOfWavefronts (btAlignedObjectArray< btAlignedObjectArray< int > > &linksForWavefronts, btSoftBodyLinkData &linkData, int numVertices, btAlignedObjectArray< btAlignedObjectArray< int > > &wavefrontBatches)
template<typename T >
static void removeFromVector (btAlignedObjectArray< T > &vectorToUpdate, int indexToRemove)
template<typename T >
static void insertAtIndex (btAlignedObjectArray< T > &vectorToUpdate, int index, T element)
 Insert element into vectorToUpdate at index index.
template<typename T >
static void insertUniqueAndOrderedIntoVector (btAlignedObjectArray< T > &vectorToUpdate, T element)
 Insert into btAlignedObjectArray assuming the array is ordered and maintaining both ordering and uniqueness.
static void generateLinksPerVertex (int numVertices, btSoftBodyLinkData &linkData, btAlignedObjectArray< int > &listOfLinksPerVertex, btAlignedObjectArray< int > &numLinksPerVertex, int &maxLinks)
static void computeBatchingIntoWavefronts (btSoftBodyLinkData &linkData, int wavefrontSize, int linksPerWorkItem, int maxLinksPerWavefront, btAlignedObjectArray< btAlignedObjectArray< int > > &linksForWavefronts, btAlignedObjectArray< btAlignedObjectArray< btAlignedObjectArray< int > > > &batchesWithinWaves, btAlignedObjectArray< btAlignedObjectArray< int > > &verticesForWavefronts)

Variables

static const size_t workGroupSize = GROUP_SIZE
static const char * UpdatePositionsFromVelocitiesCLString

Define Documentation

#define GROUP_SIZE   (WAVEFRONT_SIZE*WAVEFRONT_BLOCK_MULTIPLIER)

Definition at line 28 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

#define LINKS_PER_SIMD_LANE   16

Definition at line 29 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

#define MSTRINGIFY (   A  )     #A

Definition at line 37 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

#define WAVEFRONT_BLOCK_MULTIPLIER   2

Definition at line 27 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

#define WAVEFRONT_SIZE   32

Definition at line 26 of file btSoftBodySolver_OpenCLSIMDAware.cpp.


Function Documentation

static void computeBatchingIntoWavefronts ( btSoftBodyLinkData linkData,
int  wavefrontSize,
int  linksPerWorkItem,
int  maxLinksPerWavefront,
btAlignedObjectArray< btAlignedObjectArray< int > > &  linksForWavefronts,
btAlignedObjectArray< btAlignedObjectArray< btAlignedObjectArray< int > > > &  batchesWithinWaves,
btAlignedObjectArray< btAlignedObjectArray< int > > &  verticesForWavefronts 
) [static]

Definition at line 759 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

static void generateBatchesOfWavefronts ( btAlignedObjectArray< btAlignedObjectArray< int > > &  linksForWavefronts,
btSoftBodyLinkData linkData,
int  numVertices,
btAlignedObjectArray< btAlignedObjectArray< int > > &  wavefrontBatches 
) [static]

Definition at line 611 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

static void generateLinksPerVertex ( int  numVertices,
btSoftBodyLinkData linkData,
btAlignedObjectArray< int > &  listOfLinksPerVertex,
btAlignedObjectArray< int > &  numLinksPerVertex,
int &  maxLinks 
) [static]

Definition at line 713 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

template<typename T >
static void insertAtIndex ( btAlignedObjectArray< T > &  vectorToUpdate,
int  index,
element 
) [static]

Insert element into vectorToUpdate at index index.

Definition at line 688 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

template<typename T >
static void insertUniqueAndOrderedIntoVector ( btAlignedObjectArray< T > &  vectorToUpdate,
element 
) [static]

Insert into btAlignedObjectArray assuming the array is ordered and maintaining both ordering and uniqueness.

ie it treats vectorToUpdate as an ordered set.

Definition at line 702 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

static const char m_clLinksMassLSC ( queue  ,
ctx  ,
m_linksMassLSC,
false   
)
static const char m_clLinksMaterialLinearStiffnessCoefficient ( queue  ,
ctx  ,
m_linksMaterialLinearStiffnessCoefficient,
false   
)

Definition at line 80 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

static const char m_clLinksRestLength ( queue  ,
ctx  ,
m_linksRestLength,
false   
)
static const char m_clLinksRestLengthSquared ( queue  ,
ctx  ,
m_linksRestLengthSquared,
false   
)
static const char m_clLinkStrength ( queue  ,
ctx  ,
m_linkStrength,
false   
)
static const char m_clLinkVerticesLocalAddresses ( queue  ,
ctx  ,
m_linkVerticesLocalAddresses,
true   
)
static const char m_clNumBatchesAndVerticesWithinWaves ( queue  ,
ctx  ,
m_numBatchesAndVerticesWithinWaves,
true   
)
static const char m_clWavefrontVerticesGlobalAddresses ( queue  ,
ctx  ,
m_wavefrontVerticesGlobalAddresses,
true   
)
static const char m_linksPerWorkItem ( LINKS_PER_SIMD_LANE   ) 
static const char m_maxBatchesWithinWave (  ) 
static const char m_maxLinksPerWavefront ( m_wavefrontSize *  m_linksPerWorkItem  ) 
static const char m_maxVertex (  ) 
static const char m_numWavefronts (  ) 
static const char m_wavefrontSize ( WAVEFRONT_SIZE   )  [static]
template<typename T >
static void removeFromVector ( btAlignedObjectArray< T > &  vectorToUpdate,
int  indexToRemove 
) [static]

Definition at line 674 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

static Vectormath::Aos::Transform3 toTransform3 ( const btTransform transform  )  [static]

Definition at line 600 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

static Vectormath::Aos::Vector3 toVector3 ( const btVector3 vec  )  [static]

Definition at line 88 of file btSoftBodySolver_OpenCLSIMDAware.cpp.


Variable Documentation

Initial value:
"/home/ryan/bullet-svn/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.cpp" 2



btSoftBodyLinkDataOpenCLSIMDAware::btSoftBodyLinkDataOpenCLSIMDAware(cl_command_queue queue,  cl_context ctx) :
        m_cqCommandQue(queue)

Definition at line 38 of file btSoftBodySolver_OpenCLSIMDAware.cpp.

const size_t workGroupSize = GROUP_SIZE [static]

Definition at line 31 of file btSoftBodySolver_OpenCLSIMDAware.cpp.