public interface MemoryStrategy
Modifier and Type | Method and Description |
---|---|
Object |
alloc(DataBuffer buffer,
int stride,
int offset,
int length)
Allocate memory for the given buffer
|
Object |
copyToHost(DataBuffer copy,
int offset)
Copy data to native or gpu
|
void |
free(DataBuffer buffer,
int offset,
int length)
Free the buffer wrt the
allocation strategy
|
Object copyToHost(DataBuffer copy, int offset)
copy
- the buffer to copyObject alloc(DataBuffer buffer, int stride, int offset, int length)
buffer
- the buffer to allocate forstride
- the strideoffset
- the offset used for the buffer
on allocationlength
- lengthvoid free(DataBuffer buffer, int offset, int length)
buffer
- the buffer to freeoffset
- the offset to freelength
- the length to freeCopyright © 2015. All Rights Reserved.