public class CublasPointer extends Object implements AutoCloseable
| Constructor and Description |
|---|
CublasPointer(INDArray array,
CudaContext context)
Creates a CublasPointer for a given INDArray.
|
CublasPointer(JCudaBuffer buffer,
CudaContext context)
Creates a CublasPointer
for a given JCudaBuffer
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
frees the underlying
device memory allocated for this pointer
|
void |
copyToHost()
copies the result to the host buffer
|
void |
destroy()
The actual destroy method
|
static void |
free(CublasPointer... pointers) |
JCudaBuffer |
getBuffer() |
Pointer |
getDevicePointer() |
boolean |
isResultPointer()
Whether this is a result pointer or not
A result pointer means that this
pointer should not automatically be freed
but instead wait for results to accumulate
so they can be returned from
the gpu first
|
void |
setResultPointer(boolean resultPointer)
Sets whether this is a result pointer or not
A result pointer means that this
pointer should not automatically be freed
but instead wait for results to accumulate
so they can be returned from
the gpu first
|
String |
toString() |
public CublasPointer(JCudaBuffer buffer, CudaContext context)
buffer - public CublasPointer(INDArray array, CudaContext context)
array - public void close()
throws Exception
close in interface AutoCloseableExceptionpublic void destroy()
public JCudaBuffer getBuffer()
public Pointer getDevicePointer()
public void copyToHost()
public boolean isResultPointer()
public void setResultPointer(boolean resultPointer)
public static void free(CublasPointer... pointers)
Copyright © 2015. All Rights Reserved.