public class CudaDirectProvider extends Object implements MemoryProvider
Modifier and Type | Field and Description |
---|---|
protected static long |
DEVICE_RESERVED_SPACE |
protected NativeOps |
nativeOps |
Constructor and Description |
---|
CudaDirectProvider() |
Modifier and Type | Method and Description |
---|---|
void |
free(AllocationPoint point)
This method frees specific chunk of memory, described by AllocationPoint passed in
|
PointersPair |
malloc(AllocationShape shape,
AllocationPoint point,
AllocationStatus location)
This method provides PointersPair to memory chunk specified by AllocationShape
|
boolean |
pingDeviceForFreeMemory(Integer deviceId,
long requiredMemory)
This method checks specified device for specified amount of memory
|
protected static final long DEVICE_RESERVED_SPACE
protected NativeOps nativeOps
public PointersPair malloc(AllocationShape shape, AllocationPoint point, AllocationStatus location)
malloc
in interface MemoryProvider
shape
- shape of desired memory chunkpoint
- target AllocationPoint structurelocation
- either HOST or DEVICEpublic void free(AllocationPoint point)
free
in interface MemoryProvider
point
- public boolean pingDeviceForFreeMemory(Integer deviceId, long requiredMemory)
pingDeviceForFreeMemory
in interface MemoryProvider
deviceId
- requiredMemory
- Copyright © 2016. All Rights Reserved.