public class Device extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
deviceId |
int |
deviceType |
| Constructor and Description |
|---|
Device(int deviceType,
int deviceId) |
Device(String deviceType,
int deviceId) |
| Modifier and Type | Method and Description |
|---|---|
static Device |
cpu() |
static Device |
cpu(int devId)
Construct a CPU device.
|
static Device |
cuda() |
static Device |
cuda(int devId)
Construct a CUDA GPU device.
|
boolean |
equals(Object other) |
boolean |
exist()
Whether this device exists.
|
int |
hashCode() |
static Device |
hexagon() |
static Device |
hexagon(int devId)
Construct a Hexagon device.
|
long |
maxThreadsPerBlock()
Maximum number of threads on each block.
|
static Device |
metal() |
static Device |
metal(int devId)
Construct a metal device.
|
static Device |
opencl() |
static Device |
opencl(int devId)
Construct a OpenCL device.
|
void |
sync()
Synchronize until jobs finished at the device.
|
String |
toString() |
static Device |
vpi() |
static Device |
vpi(int devId)
Construct a VPI simulated device.
|
static Device |
vulkan() |
static Device |
vulkan(int devId)
Construct a Vulkan device.
|
long |
warpSize()
Number of threads that executes in concurrent.
|
public Device(int deviceType,
int deviceId)
public Device(String deviceType, int deviceId)
public static Device cpu(int devId)
devId - The device idpublic static Device cpu()
public static Device cuda(int devId)
devId - The device idpublic static Device cuda()
public static Device opencl(int devId)
devId - The device idpublic static Device opencl()
public static Device vulkan(int devId)
devId - The device idpublic static Device vulkan()
public static Device metal(int devId)
devId - The device idpublic static Device metal()
public static Device vpi(int devId)
devId - The device idpublic static Device vpi()
public static Device hexagon(int devId)
devId - The device idpublic static Device hexagon()
public boolean exist()
public long maxThreadsPerBlock()
public long warpSize()
public void sync()
Copyright © 2022. All rights reserved.