Beispiel #1
0
        public GpuVector(CudaProvider cuda, IDeviceMemoryPtr data, bool isOwner)
        {
            _cuda  = cuda;
            Memory = data;
            cuda.Register(this);
#if DEBUG
            if (_id == _badAlloc)
            {
                Debugger.Break();
            }
#endif
        }
Beispiel #2
0
        public GpuMatrix(CudaProvider cuda, int rows, int columns, IDeviceMemoryPtr data, bool isOwner)
        {
            Debug.Assert(rows * columns == data.Size);
            _cuda       = cuda;
            RowCount    = rows;
            ColumnCount = columns;
            Memory      = data;
            cuda.Register(this);
#if DEBUG
            if (_id == _badAlloc)
            {
                Debugger.Break();
            }
#endif
        }
Beispiel #3
0
        public Gpu3DTensor(CudaProvider provider, int rows, int columns, int depth,
                           IDeviceMemoryPtr data, bool isOwner)
        {
            Debug.Assert(rows * columns * depth == data.Size);
            _cuda      = provider;
            _rows      = rows;
            _columns   = columns;
            _depth     = depth;
            Memory     = data;
            _blockSize = rows * columns;
            provider.Register(this);
#if DEBUG
            if (_id == _badAlloc)
            {
                Debugger.Break();
            }
#endif
        }