Inheritance: ByteBuffer
Esempio n. 1
0
 public static LongBuffer Wrap(long[] data)
 {
     LongBuffer buf = new LongBuffer(new byte[data.Length * 8], 0, data.Length * 8);
     for (int i = 0; i < data.Length; i++)
     {
         buf.PutLong(data[i]);
     }
     return buf;
 }
Esempio n. 2
0
 public MersenneTwisterData()
 {
     // index a value in 'state'
     // the array for the state vector
     ByteBuffer buff = ByteBuffer.AllocateDirect(MT_N * 8);
     buff.Order(ByteBuffer.NativeOrder());
     state = buff.AsLongBuffer();
     state.Clear();
     state.Position(0);
     state.Limit(MT_N);
 }
Esempio n. 3
0
 public virtual void Compact()
 {
     if (TJS.IsLowMemory)
     {
         mSourcePosArray = null;
     }
 }
Esempio n. 4
0
        public LongBuffer AsLongBuffer()
        {
            LongBuffer buf = new LongBuffer();
            buf.buffer = new byte[this.buffer.Length];
            this.buffer.CopyTo(buf.buffer, 0);

            buf.c = this.c;
            buf.capacity = this.capacity;
            buf.index = this.index;
            buf.limit = this.limit;
            buf.mark = this.mark;
            buf.offset = this.offset;
            buf.order = this.order;
            return buf;
        }
Esempio n. 5
0
        public InterCodeObject(ScriptBlock block, string name, int type, short[] code, Variant
            [] da, int varcount, int verrescount, int maxframe, int argcount, int arraybase,
            int colbase, bool srcsorted, LongBuffer srcpos, int[] superpointer)
            : base(GetContextHashSize
			(type))
        {
            //super.mCallFinalize = false;
            mBlock = block;
            //mBlock.add( this );
            mName = name;
            mContextType = type;
            mCode = code;
            mDataArray = da;
            mMaxVariableCount = varcount;
            mVariableReserveCount = verrescount;
            mMaxFrameCount = maxframe;
            mFuncDeclArgCount = argcount;
            mFuncDeclUnnamedArgArrayBase = arraybase;
            mFuncDeclCollapseBase = colbase;
            //mSourcePosArraySorted = srcsorted;
            mSourcePosArray = srcpos;
            mSuperClassGetterPointer = superpointer;
        }