public class JCudaKernels extends Object
copyUpperToLowerTriangleDense<<1,1,32,32>>(jcudaDenseMatrixPtr, dim, dim*dim)
, the user has to call:
kernels.launchKernel("copyUpperToLowerTriangleDense", new ExecutionConfig(1,1,32,32), jcudaDenseMatrixPtr, dim, dim*dim)
Constructor and Description |
---|
JCudaKernels()
Loads the kernels in the file ptxFileName.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkResult(int cuResult) |
void |
launchKernel(String name,
ExecutionConfig config,
Object... arguments)
Setups the kernel parameters and launches the kernel using cuLaunchKernel API.
|
void |
shutdown()
Performs cleanup actions such as unloading the module
|
public JCudaKernels() throws DMLRuntimeException
DMLRuntimeException
- if DMLRuntimeException occurspublic void shutdown()
public void launchKernel(String name, ExecutionConfig config, Object... arguments) throws DMLRuntimeException
name
- name of the kernelconfig
- execution configurationarguments
- can be of type Pointer, long, double, float and intDMLRuntimeException
- if DMLRuntimeException occurspublic static void checkResult(int cuResult) throws DMLRuntimeException
DMLRuntimeException
Copyright © 2017 The Apache Software Foundation. All rights reserved.