jcuda
Class BufferUtils

java.lang.Object
  extended by jcuda.BufferUtils

 class BufferUtils
extends java.lang.Object

Utility methods for handling Buffers (currently not used)


Method Summary
static java.nio.ByteBuffer createByteBuffer(int elements)
          Creates a buffer for the given number of elements
static java.nio.CharBuffer createCharBuffer(int elements)
          Creates a buffer for the given number of elements and native byte ordering
static java.nio.DoubleBuffer createDoubleBuffer(int elements)
          Creates a buffer for the given number of elements and native byte ordering
static java.nio.FloatBuffer createFloatBuffer(int elements)
          Creates a buffer for the given number of elements and native byte ordering
static java.nio.IntBuffer createIntBuffer(int elements)
          Creates a buffer for the given number of elements and native byte ordering
static java.nio.LongBuffer createLongBuffer(int elements)
          Creates a buffer for the given number of elements and native byte ordering
static java.nio.ShortBuffer createShortBuffer(int elements)
          Creates a buffer for the given number of elements and native byte ordering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createByteBuffer

public static java.nio.ByteBuffer createByteBuffer(int elements)
Creates a buffer for the given number of elements

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer

createCharBuffer

public static java.nio.CharBuffer createCharBuffer(int elements)
Creates a buffer for the given number of elements and native byte ordering

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer

createShortBuffer

public static java.nio.ShortBuffer createShortBuffer(int elements)
Creates a buffer for the given number of elements and native byte ordering

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer

createIntBuffer

public static java.nio.IntBuffer createIntBuffer(int elements)
Creates a buffer for the given number of elements and native byte ordering

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer

createFloatBuffer

public static java.nio.FloatBuffer createFloatBuffer(int elements)
Creates a buffer for the given number of elements and native byte ordering

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer

createLongBuffer

public static java.nio.LongBuffer createLongBuffer(int elements)
Creates a buffer for the given number of elements and native byte ordering

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer

createDoubleBuffer

public static java.nio.DoubleBuffer createDoubleBuffer(int elements)
Creates a buffer for the given number of elements and native byte ordering

Parameters:
elements - The number of elements in the buffer
Returns:
The buffer