本文整理汇总了Java中water.util.UnsafeUtils.get8方法的典型用法代码示例。如果您正苦于以下问题:Java UnsafeUtils.get8方法的具体用法?Java UnsafeUtils.get8怎么用?Java UnsafeUtils.get8使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类water.util.UnsafeUtils
的用法示例。
在下文中一共展示了UnsafeUtils.get8方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public C2SChunk read_impl(AutoBuffer bb) {
_mem = bb.bufClose();
_start = -1; _cidx = -1;
set_len((_mem.length-_OFF)>>1);
_scale= UnsafeUtils.get8d(_mem,0);
_bias = UnsafeUtils.get8 (_mem,8);
return this;
}
示例2: read_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public C1SChunk read_impl(AutoBuffer bb) {
_mem = bb.bufClose();
_start = -1; _cidx = -1;
set_len(_mem.length-_OFF);
_scale= UnsafeUtils.get8d(_mem,0);
_bias = UnsafeUtils.get8 (_mem,8);
return this;
}
示例3: read_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public C4SChunk read_impl(AutoBuffer bb) {
_mem = bb.bufClose();
_start = -1; _cidx = -1;
set_len((_mem.length-_OFF)>>2);
_scale= UnsafeUtils.get8d(_mem,0);
_bias = UnsafeUtils.get8 (_mem,8);
return this;
}
示例4: read_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public C0LChunk read_impl(AutoBuffer bb) {
_mem = bb.bufClose();
_start = -1; _cidx = -1;
_con = UnsafeUtils.get8(_mem,0);
set_len(UnsafeUtils.get4(_mem,8));
return this;
}
示例5: inflate_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public NewChunk inflate_impl(NewChunk nc) {
nc.set_len(nc.set_sparseLen(0));
for( int i=0; i< _len; i++ ) {
long lo = UnsafeUtils.get8(_mem,(i<<4) );
long hi = UnsafeUtils.get8(_mem,(i << 4) + 8);
nc.addUUID(lo, hi);
}
return nc;
}
示例6: getIValue
import water.util.UnsafeUtils; //导入方法依赖的package包/类
protected final long getIValue(int off){
switch(_valsz){
case 1: return _mem[off+ _ridsz]&0xFF;
case 2: return UnsafeUtils.get2(_mem, off + _ridsz);
case 4: return UnsafeUtils.get4(_mem, off + _ridsz);
case 8: return UnsafeUtils.get8(_mem, off + _ridsz);
default: throw H2O.fail();
}
}
示例7: atomic
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public Value atomic( Value val ) {
byte[] bits1 = val.memOrLoad();
long l1 = UnsafeUtils.get8(bits1, 0);
long l2 = UnsafeUtils.get8(bits1,8);
l1 += 2;
l2 += 2;
byte[] bits2 = new byte[16];
UnsafeUtils.set8(bits2,0,l1);
UnsafeUtils.set8(bits2,8,l2);
return new Value(_key,bits2);
}
示例8: initFromBytes
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public final void initFromBytes () {
_start = -1; _cidx = -1;
set_len((_mem.length-_OFF) >> getSzLog());
_bias = UnsafeUtils.get8 (_mem,0);
int x = UnsafeUtils.get4(_mem,8);
int szLog = UnsafeUtils.get4(_mem,12);
_isDecimal = szLog < 0;
_scale = PrettyPrint.pow10(1,_isDecimal?-x:x);
}
示例9: getDoubles
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override public double [] getDoubles(double [] vals, int from, int to, double NA){
for(int i = from; i < to; i++) {
long x = UnsafeUtils.get8(_mem, 8*i);
vals[i-from] = (x == _NA)?NA:x;
}
return vals;
}
示例10: getVal
import water.util.UnsafeUtils; //导入方法依赖的package包/类
private long getVal(int x){
switch(_val_sz){
case 0: return 1;
case 2: return UnsafeUtils.get2(_mem,x+2);
case 4: return UnsafeUtils.get4(_mem,x+4);
case 8: return UnsafeUtils.get8(_mem,x+4);
default: throw H2O.unimpl();
}
}
示例11: at8_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override protected final long at8_impl( int i ) {
long res = UnsafeUtils.get8(_mem,i<<3);
if( res == _NA ) throw new IllegalArgumentException("at8_abs but value is missing");
return res;
}
示例12: atd_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override protected final double atd_impl( int i ) {
long res = UnsafeUtils.get8(_mem,i<<3);
return res == _NA?Double.NaN:res;
}
示例13: at16l_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override protected long at16l_impl(int idx) {
long lo = UnsafeUtils.get8(_mem,(idx<<4) );
long hi = UnsafeUtils.get8(_mem,(idx<<4)+8);
if( lo==_LO_NA && hi==_HI_NA ) throw new IllegalArgumentException("at16 but value is missing");
return lo;
}
示例14: at16h_impl
import water.util.UnsafeUtils; //导入方法依赖的package包/类
@Override protected long at16h_impl(int idx) {
long lo = UnsafeUtils.get8(_mem,(idx<<4) );
long hi = UnsafeUtils.get8(_mem,(idx<<4)+8);
if( lo==_LO_NA && hi==_HI_NA ) throw new IllegalArgumentException("at16 but value is missing");
return hi;
}
示例15: processRow
import water.util.UnsafeUtils; //导入方法依赖的package包/类
private final void processRow(int r, ChunkVisitor v){
long l = UnsafeUtils.get8(_mem,(r<<3));
if(l == _NA) v.addNAs(1);
else v.addValue(l);
}