|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.rsl.konrad.cuda.CUDAUtil
public abstract class CUDAUtil
Field Summary | |
---|---|
static int[] |
gridBlockSize
|
Constructor Summary | |
---|---|
CUDAUtil()
|
Method Summary | |
---|---|
static int |
align(int value,
int alignment)
Returns the given (address) value, adjusted to have the given alignment. |
static jcuda.driver.CUdeviceptr |
allocateSpace(Volume3D vol)
Allocates space on the CUDA device for a Volume3D |
static jcuda.driver.CUdeviceptr |
copyFloatArrayToDevice(float[] array,
jcuda.driver.CUmodule module,
java.lang.String nameInCode)
|
static jcuda.driver.CUdeviceptr |
copyToDeviceMemory(float[] data)
copies a float array to the device and returns a pointer to the memory. |
static jcuda.driver.CUdeviceptr |
copyToDeviceMemory(int[] data)
copies an int array to the device and returns a pointer to the memory. |
static long |
correctMemoryValue(int memory)
|
static void |
fetchFromDevice(Volume3D vol,
jcuda.driver.CUdeviceptr deviceX)
Fetches the volume from the device |
static void |
fetchFromDeviceMemory(float[] data,
jcuda.driver.CUdeviceptr deviceX)
fetches a float data array from the device and frees the memory on the device. |
static jcuda.driver.CUdevice |
getBestDevice()
|
static jcuda.driver.CUdevice |
getSmallestDevice()
|
static int |
iDivUp(int a,
int b)
Integral division, rounding the result to the next highest integer. |
static void |
moveToDevice(Volume3D vol,
jcuda.driver.CUdeviceptr deviceX)
Moves the volume to the device. |
static void |
updateFloatArrayOnDevice(jcuda.driver.CUdeviceptr devptr,
float[] array,
jcuda.driver.CUmodule module)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int[] gridBlockSize
Constructor Detail |
---|
public CUDAUtil()
Method Detail |
---|
public static int align(int value, int alignment)
value
- The address valuealignment
- The desired alignment
public static jcuda.driver.CUdeviceptr copyToDeviceMemory(int[] data)
data
- the int array
public static jcuda.driver.CUdeviceptr copyToDeviceMemory(float[] data)
data
- the float array
public static void fetchFromDeviceMemory(float[] data, jcuda.driver.CUdeviceptr deviceX)
data
- the float array to write todeviceX
- the pointer to the device memorypublic static jcuda.driver.CUdeviceptr allocateSpace(Volume3D vol)
vol
- the volume
public static void moveToDevice(Volume3D vol, jcuda.driver.CUdeviceptr deviceX)
vol
- the volumedeviceX
- the memory pointerpublic static void fetchFromDevice(Volume3D vol, jcuda.driver.CUdeviceptr deviceX)
vol
- the volume objectdeviceX
- the pointer to the memory on the deivce.public static int iDivUp(int a, int b)
a
- Dividendb
- Divisor
public static jcuda.driver.CUdeviceptr copyFloatArrayToDevice(float[] array, jcuda.driver.CUmodule module, java.lang.String nameInCode)
public static void updateFloatArrayOnDevice(jcuda.driver.CUdeviceptr devptr, float[] array, jcuda.driver.CUmodule module)
public static long correctMemoryValue(int memory)
public static jcuda.driver.CUdevice getBestDevice()
public static jcuda.driver.CUdevice getSmallestDevice()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |