public class RPCSession extends Object
| Modifier and Type | Method and Description |
|---|---|
Device |
cl()
Construct remote OpenCL device.
|
Device |
cl(int devId)
Construct remote OpenCL device.
|
Device |
cpu()
Construct remote CPU device.
|
Device |
cpu(int devId)
Construct remote CPU device.
|
Device |
cuda()
Construct remote CUDA GPU device.
|
Device |
cuda(int devId)
Construct remote CUDA GPU device.
|
Device |
device(int devType)
Construct a remote device.
|
Device |
device(int devType,
int devId)
Construct a remote device.
|
Device |
device(String devType)
Construct a remote device.
|
Device |
device(String devType,
int devId)
Construct a remote device.
|
byte[] |
download(String path)
Download file from remote temp folder.
|
Function |
getFunction(String name)
Get function from the session.
|
Module |
loadModule(String path)
Load a remote module, the file need to be uploaded first.
|
Device |
metal()
Construct remote Metal device.
|
Device |
metal(int devId)
Construct remote Metal device.
|
void |
upload(byte[] data,
String target)
Upload binary to remote runtime temp folder.
|
void |
upload(File data)
Upload file to remote runtime temp folder.
|
void |
upload(File data,
String target)
Upload file to remote runtime temp folder.
|
Device |
vulkan()
Construct remote OpenCL device.
|
Device |
vulkan(int devId)
Construct remote OpenCL device.
|
public Function getFunction(String name)
name - The name of the function.public Device device(String devType, int devId)
devType - device type.devId - device id.public Device device(String devType)
devType - device type.public Device device(int devType, int devId)
devType - device type.devId - device id.public Device device(int devType)
devType - device type.public Device cpu(int devId)
devId - device id.public Device cpu()
public Device cuda(int devId)
devId - device id.public Device cuda()
public Device cl(int devId)
devId - device id.public Device cl()
public Device vulkan(int devId)
devId - device id.public Device vulkan()
public Device metal(int devId)
devId - device id.public Device metal()
public void upload(byte[] data,
String target)
data - The binary in local to upload.target - The path in remote, cannot be null.public void upload(File data, String target) throws IOException
data - The file in local to upload.target - The path in remote.IOException - for network failure.public void upload(File data) throws IOException
data - The file in local to upload.IOException - for network failure.public byte[] download(String path)
path - The relative location to remote temp folder.Copyright © 2024. All rights reserved.