public class SharedShortMatrix extends SharedAbstractMatrix<SharedShortMatrix>
cube
Constructor and Description |
---|
SharedShortMatrix(int rows,
int cols)
Constructs a rows-by-cols shared short matrix.
|
Modifier and Type | Method and Description |
---|---|
short[][] |
array()
Returns the short array that backs this matrix.
|
short |
get(int i,
int j)
Absolute get method
Reads the short at the given index.
|
void |
get(short[][] array)
Absolute bulk get method.
|
void |
get(short[][] array,
int x,
int y)
Absolute bulk get method.
|
ShortBuffer[] |
map()
Maps the shared memory cube of this shared memory matrix.
|
void |
put(int i,
int j,
short value)
Absolute put method.
|
void |
put(short[][] array)
Absolute bulk put method.
|
void |
put(short[][] array,
int x,
int y)
Absolute bulk put method.
|
int |
unit()
Returns the unit size (in bytes) of this shared matrix.
|
alloc, cube, free
numCols, numColsWithAttributes, numMetaCols, numMetaRows, numPaddingCols, numPaddingRows, numRows, numRowsWithAttributes, setColAttributes, setRowAttributes
public SharedShortMatrix(int rows, int cols)
rows
- Number of rows.cols
- Number of colums.public ShortBuffer[] map()
map
in class SharedAbstractMatrix<SharedShortMatrix>
public short[][] array()
public short get(int i, int j)
i
- The row index from which the short will be read.j
- The column index from which the short will be read.public void get(short[][] array, int x, int y)
array
- The short array at the given index.x
- The row index from which the short array will be read.y
- The column index from which the short array will be read.public void get(short[][] array)
array
- The short array.public void put(int i, int j, short value)
i
- The row index at which the short will be written.j
- The column index at which the short will be written.value
- The short to be written.public void put(short[][] array, int x, int y)
array
- The short array to be written.x
- The row index at which the short array will be written.y
- The column index at which the short array will be written.public void put(short[][] array)
array
- The short array to be written.public int unit()
Copyright © 2018–2020 InAccel. All rights reserved.