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 |
destroy()
The actual destroy method
|
static void |
free(CublasPointer... pointers) |
JCudaBuffer |
getBuffer() |
org.bytedeco.javacpp.Pointer |
getDevicePointer() |
org.bytedeco.javacpp.Pointer |
getHostPointer() |
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 |
setHostPointer(org.bytedeco.javacpp.Pointer hostPointer) |
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 AutoCloseable
Exception
public void destroy()
public JCudaBuffer getBuffer()
public org.bytedeco.javacpp.Pointer getDevicePointer()
public org.bytedeco.javacpp.Pointer getHostPointer()
public void setHostPointer(org.bytedeco.javacpp.Pointer hostPointer)
public boolean isResultPointer()
public void setResultPointer(boolean resultPointer)
public static void free(CublasPointer... pointers)
Copyright © 2016. All Rights Reserved.