public class AfAparapiUtils extends Object
Constructor and Description |
---|
AfAparapiUtils()
The constructor prepares the keys, the map containing the devices and a map
with a kernel instance for each device.
|
Modifier and Type | Method and Description |
---|---|
long |
execute(double cx1,
double cy1,
double cx2,
double cy2,
int w,
int h,
int maxIterations)
call the kernel execution and track elapsed time
|
String |
getBestDeviceKey()
Getter for the field
bestDeviceKey . |
com.aparapi.device.Device |
getDevice()
Getter for the field
device . |
String[] |
getDeviceKeys()
Getter for the field
deviceKeys . |
String |
getDeviceName()
Getter for the field
deviceName . |
AfKernel |
getKernel()
Getter for the field
kernel . |
String |
getLocalSizes()
getLocalSizes.
|
com.aparapi.Range |
getRange()
Getter for the field
range . |
int[][] |
getResult()
getResult.
|
void |
init(String deviceKey,
int W,
int H)
calls the init with a default localSize.
|
void |
init(String deviceKey,
int W,
int H,
int localSize0,
int localSize1)
Prepares the range and reads device description, based on the device and
image size the range can be reused many times, so we need to instantiate the
range only when device changes or image size changes
|
public AfAparapiUtils()
public void init(String deviceKey, int W, int H)
deviceKey
- a String
object.W
- a int.H
- a int.public void init(String deviceKey, int W, int H, int localSize0, int localSize1)
deviceKey
- a String
object.W
- a int.H
- a int.localSize0
- a int.localSize1
- a int.public long execute(double cx1, double cy1, double cx2, double cy2, int w, int h, int maxIterations)
cx1
- a double.cy1
- a double.cx2
- a double.cy2
- a double.w
- a int.h
- a int.maxIterations
- a int.public String[] getDeviceKeys()
Getter for the field deviceKeys
.
String
objects.public String getDeviceName()
Getter for the field deviceName
.
String
object.public String getBestDeviceKey()
Getter for the field bestDeviceKey
.
public com.aparapi.device.Device getDevice()
Getter for the field device
.
public AfKernel getKernel()
Getter for the field kernel
.
public com.aparapi.Range getRange()
Getter for the field range
.
public int[][] getResult()
getResult.
int
objects.Copyright © 2021 Syncleus. All rights reserved.