Class CL
java.lang.Object
javaforce.cl.CL
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static CLstatic CLlongcreateReadBuffer(int size) longcreateReadWriteBuffer(int size) longcreateWriteBuffer(int size) booleanexecute(long kernel, int count) booleanfreeBuffer(long buffer) booleanfreeKernel(long kernel) static booleaninit()longstatic voidbooleanreadBuffer(long buffer, byte[] data) booleanreadBuffer(long buffer, float[] data) booleansetArg(long kernel, int idx, byte[] value) booleansetArg(long kernel, int idx, long value) booleanwriteBuffer(long buffer, byte[] data) booleanwriteBuffer(long buffer, float[] data)
-
Field Details
-
TYPE_DEFAULT
public static final int TYPE_DEFAULT- See Also:
-
TYPE_CPU
public static final int TYPE_CPU- See Also:
-
TYPE_GPU
public static final int TYPE_GPU- See Also:
-
TYPE_ACCELERATOR
public static final int TYPE_ACCELERATOR- See Also:
-
-
Method Details
-
init
public static boolean init() -
create
-
create
-
kernel
-
createReadBuffer
public long createReadBuffer(int size) -
createWriteBuffer
public long createWriteBuffer(int size) -
createReadWriteBuffer
public long createReadWriteBuffer(int size) -
setArg
public boolean setArg(long kernel, int idx, byte[] value) -
setArg
public boolean setArg(long kernel, int idx, long value) -
writeBuffer
public boolean writeBuffer(long buffer, byte[] data) -
writeBuffer
public boolean writeBuffer(long buffer, float[] data) -
execute
public boolean execute(long kernel, int count) -
readBuffer
public boolean readBuffer(long buffer, byte[] data) -
readBuffer
public boolean readBuffer(long buffer, float[] data) -
freeKernel
public boolean freeKernel(long kernel) -
freeBuffer
public boolean freeBuffer(long buffer) -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
main
-