public abstract class Struct.Data
extends java.lang.Object
Constructor and Description |
---|
Data() |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getBuffer()
Gets the buffer where this struct data is stored.
|
protected java.nio.ByteBuffer |
getBuffer(Datatype type,
int field)
Gets the buffer of a field.
|
protected java.nio.ByteBuffer |
getBuffer(Datatype type,
int field,
int index)
Gets the buffer data at the specified position of a buffer array.
|
protected byte |
getByte(int field)
Gets the byte value of a field.
|
protected byte |
getByte(int field,
int index)
Gets the byte value at the specified position of a byte array.
|
protected char |
getChar(int field)
Gets the char value of a field.
|
protected char |
getChar(int field,
int index)
Gets the char value at the specified position of a char array.
|
protected <S extends Struct,D extends Struct.Data> |
getData(S struct,
int field) |
protected <S extends Struct,D extends Struct.Data> |
getData(S struct,
int field,
int index) |
protected double |
getDouble(int field)
Gets the double value of a field.
|
protected double |
getDouble(int field,
int index)
Gets the double value at the specified position of a double array.
|
protected float |
getFloat(int field)
Gets the float value of a field.
|
protected float |
getFloat(int field,
int index)
Gets the float value at the specified position of a float array.
|
protected int |
getInt(int field)
Gets the int value of a field.
|
protected int |
getInt(int field,
int index)
Gets the int value at the specified position of an int array.
|
protected long |
getLong(int field)
Gets the long value of a field.
|
protected long |
getLong(int field,
int index)
Gets the long value at the specified position of a long array.
|
protected short |
getShort(int field)
Gets the short value of a field.
|
protected short |
getShort(int field,
int index)
Gets the short value at the specified position of a short array.
|
protected void |
putByte(int field,
byte v)
Puts a byte value in a field.
|
protected void |
putByte(int field,
int index,
byte v)
Puts a byte value at the specified position of a byte array.
|
protected void |
putChar(int field,
char v)
Puts a char value in a field.
|
protected void |
putChar(int field,
int index,
char v)
Puts a char value at the specified position of a char array.
|
protected void |
putDouble(int field,
double v)
Puts a double value in a field.
|
protected void |
putDouble(int field,
int index,
double v)
Puts a double value at the specified position of a double array.
|
protected void |
putFloat(int field,
float v)
Puts a float value in a field.
|
protected void |
putFloat(int field,
int index,
float v)
Puts a float value at the specified position of a float array.
|
protected void |
putInt(int field,
int v)
Puts an int value in a field.
|
protected void |
putInt(int field,
int index,
int v)
Puts an int value at the specified position of an int array.
|
protected void |
putLong(int field,
int index,
long v)
Puts a long value at the specified position of a long array.
|
protected void |
putLong(int field,
long v)
Puts a long value in a field.
|
protected void |
putShort(int field,
int index,
short v)
Puts a short value at the specified position of a short array.
|
protected void |
putShort(int field,
short v)
Puts a short value in a field.
|
public final java.nio.ByteBuffer getBuffer()
The buffer can be used in send
/recv
operations.
protected final byte getByte(int field)
field
- Offset of the field.protected final byte getByte(int field, int index)
field
- Offset of the byte array.index
- Index of the byte in the array.protected final void putByte(int field, byte v)
field
- Offset of the field.v
- Byte value.protected final void putByte(int field, int index, byte v)
field
- Offset of the byte array.index
- Index of the byte in the array.v
- Byte value.protected final char getChar(int field)
field
- Offset of the field.protected final char getChar(int field, int index)
field
- Offset of the char array.index
- Index of the char in the array.protected final void putChar(int field, char v)
field
- Offset of the field.v
- Char value.protected final void putChar(int field, int index, char v)
field
- Offset of the char array.index
- Index of the char in the array.v
- Char value.protected final short getShort(int field)
field
- Offset of the field.protected final short getShort(int field, int index)
field
- Offset of the short array.index
- Index of the short in the array.protected final void putShort(int field, short v)
field
- Offset of the field.v
- Short value.protected final void putShort(int field, int index, short v)
field
- Offset of the short array.index
- Index of the short in the array.v
- Short value.protected final int getInt(int field)
field
- Offset of the field.protected final int getInt(int field, int index)
field
- Offset of the int array.index
- Index of the int in the array.protected final void putInt(int field, int v)
field
- Offset of the field.v
- Int value.protected final void putInt(int field, int index, int v)
field
- Offset of the int array.index
- Index of the int in the array.v
- Int value.protected final long getLong(int field)
field
- Offset of the field.protected final long getLong(int field, int index)
field
- Offset of the long array.index
- Index of the long in the array.protected final void putLong(int field, long v)
field
- Offset of the field.v
- Long value.protected final void putLong(int field, int index, long v)
field
- Offset of the long array.index
- Index of the long in the array.v
- Long value.protected final float getFloat(int field)
field
- Offset of the field.protected final float getFloat(int field, int index)
field
- Offset of the float array.index
- Index of the float in the array.protected final void putFloat(int field, float v)
field
- Offset of the field.v
- Float value.protected final void putFloat(int field, int index, float v)
field
- Offset of the float array.index
- Index of the float in the array.v
- Float value.protected final double getDouble(int field)
field
- Offset of the field.protected final double getDouble(int field, int index)
field
- Offset of the double array.index
- Index of the double in the array.protected final void putDouble(int field, double v)
field
- Offset of the field.v
- Double value.protected final void putDouble(int field, int index, double v)
field
- Offset of the double array.index
- Index of the double in the array.v
- Double value.protected final <S extends Struct,D extends Struct.Data> D getData(S struct, int field)
protected final <S extends Struct,D extends Struct.Data> D getData(S struct, int field, int index)
protected final java.nio.ByteBuffer getBuffer(Datatype type, int field)
The buffer can be used in send
/recv
operations.
type
- Data type of the buffer.field
- Offset of the field.protected final java.nio.ByteBuffer getBuffer(Datatype type, int field, int index) throws MPIException
The buffer can be used in send
/recv
operations.
type
- Data type of the buffer.field
- Offset of the buffer array.index
- Index of the buffer in the array.MPIException
- Signals that an MPI error of some sort has occurred.