-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathCLAPI.java
More file actions
32 lines (27 loc) · 1.23 KB
/
Copy pathCLAPI.java
File metadata and controls
32 lines (27 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package javaforce.api;
import javaforce.ffm.*;
/** OpenCL native API.
*
* @author pquiring
*/
@NativeLibrary("OpenCL")
public interface CLAPI {
public static CLAPI getInstance() {
return CLFFM.getInstance();
}
public long clCreate(String src, int type);
public long clKernel(long ctx, String func);
public long clCreateBuffer(long ctx, int size, int type);
public boolean clSetArg(long ctx, long kernel, int idx, byte[] value, int size);
public boolean clWriteBufferi8(long ctx, long buffer, byte[] value, int size);
public boolean clWriteBufferf32(long ctx, long buffer, float[] value, int size);
public boolean clExecute(long ctx, long kernel, int count);
public boolean clExecute2(long ctx, long kernel, int count1, int count2);
public boolean clExecute3(long ctx, long kernel, int count1, int count2, int count3);
public boolean clExecute4(long ctx, long kernel, int count1, int count2, int count3, int count4);
public boolean clReadBufferi8(long ctx, long buffer, byte[] value, int size);
public boolean clReadBufferf32(long ctx, long buffer, float[] value, int size);
public boolean clFreeKernel(long ctx, long kernel);
public boolean clFreeBuffer(long ctx, long buffer);
public boolean clClose(long ctx);
}