Package javaforce.cl
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) booleanexecute2(long kernel, int count1, int count2) booleanexecute3(long kernel, int count1, int count2, int count3) booleanexecute4(long kernel, int count1, int count2, int count3, int count4) 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, int 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, int 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) -
execute2
public boolean execute2(long kernel, int count1, int count2) -
execute3
public boolean execute3(long kernel, int count1, int count2, int count3) -
execute4
public boolean execute4(long kernel, int count1, int count2, int count3, int count4) -
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
-