public override void Set3ByteInt(long index, int offset, int value) { long address = address(index, offset); UnsafeUtil.putShort(address, ( short )value); UnsafeUtil.putByte(address + Short.BYTES, ( sbyte )(( int )(( uint )value >> (sizeof(short) * 8)))); }
public override void Set5ByteLong(long index, int offset, long value) { long address = address(index, offset); PutInt(address, ( int )value); UnsafeUtil.putByte(address + Integer.BYTES, ( sbyte )(( long )(( ulong )value >> 32))); }
public override void Set(long index, sbyte[] value) { long address = address(index, 0); for (int i = 0; i < itemSize; i++, address++) { UnsafeUtil.putByte(address, value[i]); } }
public override void Clear() { if (IsByteUniform(_defaultValue)) { UnsafeUtil.setMemory(Address, LengthConflict * itemSize, _defaultValue[0]); } else { long intermediary = UnsafeUtil.allocateMemory(itemSize, AllocationTracker); for (int i = 0; i < _defaultValue.Length; i++) { UnsafeUtil.putByte(intermediary + i, _defaultValue[i]); } for (long i = 0, adr = Address; i < LengthConflict; i++, adr += itemSize) { UnsafeUtil.copyMemory(intermediary, adr, itemSize); } UnsafeUtil.free(intermediary, itemSize, AllocationTracker); } }
private void PutByte(long p, sbyte value) { UnsafeUtil.putByte(p, value); }
public override void SetByte(long index, int offset, sbyte value) { UnsafeUtil.putByte(Address(index, offset), value); }