public RetainedVec(RetainedVec storage) { if (VecTypeHelper <T> .RuntimeTypeId != storage.Vec.RuntimeTypeId) { VecThrowHelper.ThrowVecTypeMismatchException(); } Storage = storage; }
internal Vector(VectorStorage vectorStorage) { var vtidx = VecTypeHelper <T> .RuntimeVecInfo.RuntimeTypeId; if (vtidx != vectorStorage.Vec._runtimeTypeId) { VecThrowHelper.ThrowVecTypeMismatchException(); } _vectorStorage = vectorStorage; }
//[MethodImpl(MethodImplOptions.AggressiveInlining)] //public Vector<T> As<T>() //{ // return _vectorStorage.GetVector<T>(); //} public object this[int index] { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { if (unchecked ((uint)index) >= unchecked ((uint)VecStorage.Vec.Length)) { VecThrowHelper.ThrowIndexOutOfRangeException(); } return(VecStorage.Vec.DangerousGet(index)); } }