Inheritance: ByteBuffer
コード例 #1
0
ファイル: LongBuffer.cs プロジェクト: fantasydr/krkr-cs
 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;
 }
コード例 #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);
 }
コード例 #3
0
ファイル: InterCodeObject.cs プロジェクト: fantasydr/krkr-cs
 public virtual void Compact()
 {
     if (TJS.IsLowMemory)
     {
         mSourcePosArray = null;
     }
 }
コード例 #4
0
ファイル: ByteBuffer.cs プロジェクト: fantasydr/krkr-cs
        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;
        }
コード例 #5
0
ファイル: InterCodeObject.cs プロジェクト: fantasydr/krkr-cs
        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;
        }