public interface Allocator
Modifier and Type | Method and Description |
---|---|
AllocationPoint |
allocateMemory(DataBuffer buffer,
AllocationShape requiredMemory,
AllocationStatus location,
boolean initialize)
This method allocates required chunk of memory in specific location
PLEASE NOTE: Do not use this method, unless you're 100% sure what you're doing
|
AllocationPoint |
allocateMemory(DataBuffer buffer,
AllocationShape requiredMemory,
boolean initialize)
This method allocates required chunk of memory
|
void |
applyConfiguration(Configuration configuration)
Consume and apply configuration passed in as argument
|
AllocationPoint |
getAllocationPoint(DataBuffer buffer) |
AllocationPoint |
getAllocationPoint(INDArray array) |
Configuration |
getConfiguration()
Returns current Allocator configuration
|
DataBuffer |
getConstantBuffer(double[] array) |
DataBuffer |
getConstantBuffer(float[] array) |
DataBuffer |
getConstantBuffer(int[] array) |
ContextPool |
getContextPool() |
ExternalContext |
getDeviceContext()
This method returns CudaContext for current thread
|
Integer |
getDeviceId()
This method returns deviceId for current thread
All values >= 0 are considered valid device IDs, all values < 0 are considered stubs.
|
org.bytedeco.javacpp.Pointer |
getDeviceIdPointer()
Returns
getDeviceId() wrapped as a Pointer . |
FlowController |
getFlowController() |
org.bytedeco.javacpp.Pointer |
getHostPointer(DataBuffer buffer)
This method returns actual host pointer valid for current object
|
org.bytedeco.javacpp.Pointer |
getHostPointer(INDArray array)
This method returns actual host pointer valid for current object
|
MemoryHandler |
getMemoryHandler() |
org.bytedeco.javacpp.Pointer |
getPointer(DataBuffer buffer,
AllocationShape shape,
boolean isView,
CudaContext context)
This method returns actual device pointer valid for specified shape of current object
|
org.bytedeco.javacpp.Pointer |
getPointer(DataBuffer buffer,
CudaContext context)
This method returns actual device pointer valid for current object
|
org.bytedeco.javacpp.Pointer |
getPointer(INDArray array,
CudaContext context)
This method returns actual device pointer valid for specified INDArray
|
void |
memcpy(DataBuffer dstBuffer,
DataBuffer srcBuffer) |
void |
memcpyAsync(DataBuffer dstBuffer,
org.bytedeco.javacpp.Pointer srcPointer,
long length,
long dstOffset) |
void |
memcpyBlocking(DataBuffer dstBuffer,
org.bytedeco.javacpp.Pointer srcPointer,
long length,
long dstOffset) |
void |
memcpyDevice(DataBuffer dstBuffer,
org.bytedeco.javacpp.Pointer srcPointer,
long length,
long dstOffset,
CudaContext context) |
void |
memcpySpecial(DataBuffer dstBuffer,
org.bytedeco.javacpp.Pointer srcPointer,
long length,
long dstOffset) |
DataBuffer |
moveToConstant(DataBuffer dataBuffer) |
void |
registerAction(CudaContext context,
INDArray result,
INDArray... operands) |
void |
setMemoryHandler(MemoryHandler memoryHandler)
This methods specifies Mover implementation to be used internally
|
void |
synchronizeHostData(DataBuffer buffer)
This method should be calls to make sure that data on host side is actualized
|
void |
synchronizeHostData(INDArray array)
This method should be callsd to make sure that data on host side is actualized
|
void |
tickDeviceWrite(INDArray array) |
void |
tickHostWrite(DataBuffer buffer) |
void |
tickHostWrite(INDArray array) |
void applyConfiguration(Configuration configuration)
configuration
- configuration bean to be appliedExternalContext getDeviceContext()
void setMemoryHandler(MemoryHandler memoryHandler)
memoryHandler
- Configuration getConfiguration()
org.bytedeco.javacpp.Pointer getPointer(DataBuffer buffer, CudaContext context)
buffer
- org.bytedeco.javacpp.Pointer getHostPointer(DataBuffer buffer)
buffer
- org.bytedeco.javacpp.Pointer getHostPointer(INDArray array)
array
- org.bytedeco.javacpp.Pointer getPointer(DataBuffer buffer, AllocationShape shape, boolean isView, CudaContext context)
buffer
- shape
- org.bytedeco.javacpp.Pointer getPointer(INDArray array, CudaContext context)
void synchronizeHostData(INDArray array)
array
- void synchronizeHostData(DataBuffer buffer)
buffer
- Integer getDeviceId()
org.bytedeco.javacpp.Pointer getDeviceIdPointer()
getDeviceId()
wrapped as a Pointer
.AllocationPoint allocateMemory(DataBuffer buffer, AllocationShape requiredMemory, boolean initialize)
requiredMemory
- AllocationPoint allocateMemory(DataBuffer buffer, AllocationShape requiredMemory, AllocationStatus location, boolean initialize)
requiredMemory
- location
- void memcpyBlocking(DataBuffer dstBuffer, org.bytedeco.javacpp.Pointer srcPointer, long length, long dstOffset)
void memcpyAsync(DataBuffer dstBuffer, org.bytedeco.javacpp.Pointer srcPointer, long length, long dstOffset)
void memcpySpecial(DataBuffer dstBuffer, org.bytedeco.javacpp.Pointer srcPointer, long length, long dstOffset)
void memcpyDevice(DataBuffer dstBuffer, org.bytedeco.javacpp.Pointer srcPointer, long length, long dstOffset, CudaContext context)
void memcpy(DataBuffer dstBuffer, DataBuffer srcBuffer)
void tickHostWrite(DataBuffer buffer)
void tickHostWrite(INDArray array)
void tickDeviceWrite(INDArray array)
AllocationPoint getAllocationPoint(INDArray array)
AllocationPoint getAllocationPoint(DataBuffer buffer)
void registerAction(CudaContext context, INDArray result, INDArray... operands)
FlowController getFlowController()
ContextPool getContextPool()
DataBuffer getConstantBuffer(int[] array)
DataBuffer getConstantBuffer(float[] array)
DataBuffer getConstantBuffer(double[] array)
DataBuffer moveToConstant(DataBuffer dataBuffer)
MemoryHandler getMemoryHandler()
Copyright © 2016. All Rights Reserved.