Added btCudaBroadphase, some early research & development work to accelerate Bullet using CUDA
Re-uses the NVidia particle demo.
This commit is contained in:
57
Extras/CUDA/particleSystem.cuh
Normal file
57
Extras/CUDA/particleSystem.cuh
Normal file
@@ -0,0 +1,57 @@
|
||||
extern "C"
|
||||
{
|
||||
void cudaInit(int argc, char **argv);
|
||||
|
||||
void allocateArray(void **devPtr, int size);
|
||||
void freeArray(void *devPtr);
|
||||
|
||||
void threadSync();
|
||||
|
||||
void copyArrayFromDevice(void* host, const void* device, unsigned int vbo, int size);
|
||||
void copyArrayToDevice(void* device, const void* host, int offset, int size);
|
||||
void registerGLBufferObject(unsigned int vbo);
|
||||
void unregisterGLBufferObject(unsigned int vbo);
|
||||
|
||||
void setParameters(SimParams *hostParams);
|
||||
|
||||
void
|
||||
integrateSystem(uint vboOldPos, uint vboNewPos,
|
||||
float* oldVel, float* newVel,
|
||||
float deltaTime,
|
||||
int numBodies);
|
||||
|
||||
void
|
||||
updateGrid(uint vboPos,
|
||||
uint* gridCounters,
|
||||
uint* gridCells,
|
||||
uint numBodies,
|
||||
uint numCells);
|
||||
|
||||
void
|
||||
calcHash(uint vboPos,
|
||||
uint* particleHash,
|
||||
int numBodies);
|
||||
|
||||
void
|
||||
reorderDataAndFindCellStart(uint* particleHash,
|
||||
uint vboOldPos,
|
||||
float* oldVel,
|
||||
float* sortedPos,
|
||||
float* sortedVel,
|
||||
uint* cellStart,
|
||||
uint numBodies,
|
||||
uint numCells);
|
||||
|
||||
void
|
||||
collide(uint vboOldPos, uint vboNewPos,
|
||||
float* sortedPos, float* sortedVel,
|
||||
float* oldVel, float* newVel,
|
||||
uint* gridCounters,
|
||||
uint* gridCells,
|
||||
uint* particleHash,
|
||||
uint* cellStart,
|
||||
uint numBodies,
|
||||
uint numCells,
|
||||
uint maxParticlesPerCell);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user