Bullet Collision Detection & Physics Library
btGpuUtilsSharedDefs.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
3 Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
4 
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10 
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15 
16 // Shared definitions for GPU-based utilities
17 
19 // Keep this file free from Bullet headers
20 // it is included into both CUDA and CPU code
21 // file with definitions of BT_GPU_xxx should be included first
23 
24 
25 #ifndef BTGPUUTILSDHAREDDEFS_H
26 #define BTGPUUTILSDHAREDDEFS_H
27 
28 
29 extern "C"
30 {
31 
32 
33 //Round a / b to nearest higher integer value
34 int BT_GPU_PREF(iDivUp)(int a, int b);
35 
36 // compute grid and thread block size for a given number of elements
37 void BT_GPU_PREF(computeGridSize)(int n, int blockSize, int &numBlocks, int &numThreads);
38 
39 void BT_GPU_PREF(allocateArray)(void** devPtr, unsigned int size);
40 void BT_GPU_PREF(freeArray)(void* devPtr);
41 void BT_GPU_PREF(copyArrayFromDevice)(void* host, const void* device, unsigned int size);
42 void BT_GPU_PREF(copyArrayToDevice)(void* device, const void* host, unsigned int size);
43 void BT_GPU_PREF(registerGLBufferObject(unsigned int vbo));
44 void* BT_GPU_PREF(mapGLBufferObject(unsigned int vbo));
45 void BT_GPU_PREF(unmapGLBufferObject(unsigned int vbo));
46 
47 
48 } // extern "C"
49 
50 
51 #endif // BTGPUUTILSDHAREDDEFS_H
52 
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:51
void BT_GPU_PREF(registerGLBufferObject(unsigned int vbo))
void BT_GPU_PREF() copyArrayFromDevice(void *host, const void *device, unsigned int size)
void BT_GPU_PREF() allocateArray(void **devPtr, unsigned int size)
int BT_GPU_PREF() iDivUp(int a, int b)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
void BT_GPU_PREF() freeArray(void *devPtr)
void BT_GPU_PREF() computeGridSize(int n, int blockSize, int &numBlocks, int &numThreads)
void BT_GPU_PREF() copyArrayToDevice(void *device, const void *host, unsigned int size)