|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jocl.struct.Buffers
public class Buffers
A class containing methods for allocating buffers, and for reading and writing Struct and CLTypes.* objects from and to buffers.
| Method Summary | ||
|---|---|---|
static java.nio.ByteBuffer |
allocateBuffer(java.nio.ByteOrder byteOrder,
Struct... structs)
Allocates a new ByteBuffer that has a size and alignment that is sufficient to buffer the given objects, and has the given byte order. |
|
static
|
allocateBuffer(java.nio.ByteOrder byteOrder,
T... elements)
Allocates a new ByteBuffer that has a size and alignment that is sufficient to buffer the given objects, and has the given byte order. |
|
static java.nio.ByteBuffer |
allocateBuffer(Struct... structs)
Allocates a new ByteBuffer that has a size and alignment that is sufficient to buffer the given objects. |
|
static
|
allocateBuffer(T... elements)
Allocates a new ByteBuffer that has a size and alignment that is sufficient to buffer the given objects. |
|
static void |
readFromBuffer(java.nio.ByteBuffer sourceBuffer,
Struct... structs)
Reads the given objects from the given source buffer. |
|
static
|
readFromBuffer(java.nio.ByteBuffer sourceBuffer,
T... elements)
Reads the given objects from the given source buffer. |
|
static void |
writeToBuffer(java.nio.ByteBuffer targetBuffer,
Struct... structs)
Writes the given objects to the given target buffer. |
|
static
|
writeToBuffer(java.nio.ByteBuffer targetBuffer,
T... elements)
Writes the given objects to the given target buffer. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.nio.ByteBuffer allocateBuffer(Struct... structs)
structs - The objects for which the buffer should
be allocated
public static java.nio.ByteBuffer allocateBuffer(java.nio.ByteOrder byteOrder,
Struct... structs)
byteOrder - The byte order for the buffer.structs - The objects for which the buffer should
be allocated
public static void writeToBuffer(java.nio.ByteBuffer targetBuffer,
Struct... structs)
targetBuffer - The buffer to write tostructs - The objects to write
java.lang.IllegalArgumentException - If the given objects array
is null, has a length of 0 or contains 'null' elements,
or if the given buffer is null or has not enough bytes
remaining to write the given objects to it.
public static void readFromBuffer(java.nio.ByteBuffer sourceBuffer,
Struct... structs)
sourceBuffer - The buffer to read fromstructs - The objects to read
java.lang.IllegalArgumentException - If the given objects array
is null, has a length of 0 or contains 'null' elements,
or if the given buffer is null or has not enough bytes
remaining to read the given objects from it.public static <T extends org.jocl.struct.CLTypes.cl_vector_type> java.nio.ByteBuffer allocateBuffer(T... elements)
elements - The objects for which the buffer should
be allocated
public static <T extends org.jocl.struct.CLTypes.cl_vector_type> java.nio.ByteBuffer allocateBuffer(java.nio.ByteOrder byteOrder,
T... elements)
byteOrder - The byte order for the buffer.elements - The objects for which the buffer should
be allocated
public static <T extends org.jocl.struct.CLTypes.cl_vector_type> void writeToBuffer(java.nio.ByteBuffer targetBuffer,
T... elements)
targetBuffer - The buffer to write toelements - The objects to write
java.lang.IllegalArgumentException - If the given objects array
is null, has a length of 0 or contains 'null' elements,
or if the given buffer is null or has not enough bytes
remaining to write the given objects to it.
public static <T extends org.jocl.struct.CLTypes.cl_vector_type> void readFromBuffer(java.nio.ByteBuffer sourceBuffer,
T... elements)
sourceBuffer - The buffer to read fromelements - The objects to read
java.lang.IllegalArgumentException - If the given objects array
is null, has a length of 0 or contains 'null' elements,
or if the given buffer is null or has not enough bytes
remaining to read the given objects from it.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||