Package com.alibaba.graphscope.stdcxx
Class FFIByteVector
- java.lang.Object
-
- com.alibaba.fastffi.FFIPointerImpl
-
- com.alibaba.graphscope.stdcxx.FFIByteVector
-
- All Implemented Interfaces:
com.alibaba.fastffi.CXXPointer
,com.alibaba.fastffi.FFIPointer
,com.alibaba.fastffi.FFISettablePointer
,FFIType
,StdVector<Byte>
,Serializable
public class FFIByteVector extends FFIPointerImpl implements StdVector<Byte>
This is a FFIWrapper for std::vector. The code origins from the generated code via FFI and llvm4jni, with hands-on optimization.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.alibaba.graphscope.stdcxx.StdVector
StdVector.Factory<E>
-
-
Field Summary
Fields Modifier and Type Field Description static int
HASH_SHIFT
long
objAddress
long
size
static int
SIZE
-
Fields inherited from class com.alibaba.fastffi.FFIPointerImpl
address
-
-
Constructor Summary
Constructors Constructor Description FFIByteVector(long address)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendVector(long readAbleLimit, FFIByteVector vector)
This function copy another vector's memory after this vector.long
capacity()
void
clear()
long
data()
void
delete()
void
ensure(long offset, int requiredSize)
Ensure there at at least requiredSize after offset.boolean
equals(Object o)
void
finishSetting(long offset)
Byte
get(long arg0)
byte
getRaw(long arg0)
void
getRawBytes(byte[] b, int bOff, long offset, int size)
Read several bytes to a byte array.char
getRawChar(long arg0)
double
getRawDouble(long arg0)
float
getRawFloat(long arg0)
int
getRawInt(long arg0)
long
getRawLong(long arg0)
short
getRawShort(long arg0)
int
hashCode()
static long
nativeCapacity(long var0)
static void
nativeClear(long var0)
static long
nativeCreateFactory0()
static long
nativeData(long var0)
static void
nativeDelete(long var0)
static @com.alibaba.fastffi.CXXReference byte
nativeGet(long var0, long var2)
static void
nativePush_back(long var0, byte var2)
static void
nativeReserve(long var0, long var2)
static void
nativeResize(long var0, long var2)
static void
nativeSet(long var0, long var2, byte var4)
static long
nativeSize(long var0)
void
push_back(Byte arg0)
void
reserve(long arg0)
void
resize(long arg0)
void
resizeWithMoreSpace(long addSpace)
Resize with additional space.void
set(long arg0, Byte arg1)
void
setAddress(long arg0)
void
setRawByte(long arg0, byte arg1)
void
setRawChar(long arg0, char arg1)
void
setRawDouble(long arg0, double arg1)
void
setRawFloat(long arg0, float arg1)
void
setRawInt(long arg0, int arg1)
void
setRawLong(long arg0, long arg1)
void
setRawShort(long arg0, short arg1)
long
size()
String
toString()
void
touch()
update the cached objAddress.-
Methods inherited from class com.alibaba.fastffi.FFIPointerImpl
getAddress
-
-
-
-
Method Detail
-
touch
public void touch()
update the cached objAddress.
-
nativeCapacity
public static long nativeCapacity(long var0)
-
nativeClear
public static void nativeClear(long var0)
-
nativeData
public static long nativeData(long var0)
-
delete
public void delete()
- Specified by:
delete
in interfacecom.alibaba.fastffi.CXXPointer
-
nativeDelete
public static void nativeDelete(long var0)
-
getRaw
public byte getRaw(long arg0)
-
getRawChar
public char getRawChar(long arg0)
-
getRawShort
public short getRawShort(long arg0)
-
getRawInt
public int getRawInt(long arg0)
-
getRawFloat
public float getRawFloat(long arg0)
-
getRawDouble
public double getRawDouble(long arg0)
-
getRawLong
public long getRawLong(long arg0)
-
getRawBytes
public void getRawBytes(byte[] b, int bOff, long offset, int size)
Read several bytes to a byte array.- Parameters:
b
- Receive databOff
- first place to putoffset
- offset in this buffer, from where we read now.size
- how many to read
-
appendVector
public void appendVector(long readAbleLimit, FFIByteVector vector)
This function copy another vector's memory after this vector. Shall be used in InputStream.Check whether there are enough spaces, and then copy [vector.data(), vector.data() + vector.size()] to [readableLimit, readableLimit + vector.size()].
- Parameters:
readAbleLimit
- The start pos of this copy action.vector
- vector to be appended.
-
nativeGet
public static @com.alibaba.fastffi.CXXReference byte nativeGet(long var0, long var2)
-
nativePush_back
public static void nativePush_back(long var0, byte var2)
-
nativeReserve
public static void nativeReserve(long var0, long var2)
-
resizeWithMoreSpace
public void resizeWithMoreSpace(long addSpace)
Resize with additional space.- Parameters:
addSpace
- more space need.
-
nativeResize
public static void nativeResize(long var0, long var2)
-
ensure
public void ensure(long offset, int requiredSize)
Ensure there at at least requiredSize after offset.- Parameters:
offset
- offset to checkrequiredSize
- additional spaced needed.
-
setRawByte
public void setRawByte(long arg0, byte arg1)
-
setRawShort
public void setRawShort(long arg0, short arg1)
-
setRawChar
public void setRawChar(long arg0, char arg1)
-
setRawInt
public void setRawInt(long arg0, int arg1)
-
setRawLong
public void setRawLong(long arg0, long arg1)
-
setRawFloat
public void setRawFloat(long arg0, float arg1)
-
setRawDouble
public void setRawDouble(long arg0, double arg1)
-
finishSetting
public void finishSetting(long offset)
-
nativeSet
public static void nativeSet(long var0, long var2, byte var4)
-
setAddress
public void setAddress(long arg0)
- Specified by:
setAddress
in interfacecom.alibaba.fastffi.FFISettablePointer
-
nativeSize
public static long nativeSize(long var0)
-
nativeCreateFactory0
public static long nativeCreateFactory0()
-
-