Added btCudaBroadphase, some early research & development work to accelerate Bullet using CUDA

Re-uses the NVidia particle demo.
This commit is contained in:
erwin.coumans
2008-09-04 23:24:11 +00:00
parent d8a5bf2c9c
commit aef74321d7
25 changed files with 6570 additions and 0 deletions

View 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);
}