|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jocl.struct.PointerStruct
public class PointerStruct
A class that offers a functionality similar to the 'Pointer' class of JOCL for the experimental 'struct' support.
| Constructor Summary | |
|---|---|
PointerStruct()
|
|
| Method Summary | ||
|---|---|---|
static org.jocl.Pointer |
to(Struct... structs)
Creates a new Pointer to the given Structures. |
|
static
|
to(T... values)
Creates a new Pointer to the given vector type values. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PointerStruct()
| Method Detail |
|---|
public static <T extends org.jocl.struct.CLTypes.cl_vector_type> org.jocl.Pointer to(T... values)
Buffers#allocateBuffer(cl_vector_type...) /
Buffers#readFromBuffer(ByteBuffer, cl_vector_type...) /
Buffers#writeToBuffer(ByteBuffer, cl_vector_type...)
methods:
ByteBuffer buffer = CLTypes.allocateBuffer(values);
Buffers.writeToBuffer(buffer, values);
passToKernel(Pointer.to(buffer));
Buffers.readFromBuffer(buffer, values);
values - The vector type values
java.lang.NullPointerException - If the given values
array is null, has a length of 0, or contains null elementspublic static org.jocl.Pointer to(Struct... structs)
Buffers.allocateBuffer(Struct...) /
Buffers.readFromBuffer(ByteBuffer, Struct...) /
Buffers.writeToBuffer(ByteBuffer, Struct...)
methods:
ByteBuffer buffer = Struct.allocateBuffer(structs);
Buffers.writeToBuffer(buffer, values);
passToKernel(Pointer.to(buffer));
Buffers.readFromBuffer(buffer, structs);
structs - The structures that the pointer will point to
java.lang.IllegalArgumentException - If the given array
is null, has a length of 0 or contains null objects
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||