コード例 #1
0
ファイル: GpuVector.cs プロジェクト: maalik0786/brightwire
        public void AddInPlace(IVector vector, float coefficient1 = 1, float coefficient2 = 1)
        {
            Debug.Assert(IsValid && vector.IsValid);
            var other = (GpuVector)vector;

            Debug.Assert(other.Count == Count);
            _cuda.AddInPlace(Memory, other.Memory, Count, coefficient1, coefficient2);
        }
コード例 #2
0
ファイル: GpuMatrix.cs プロジェクト: maalik0786/brightwire
        public void AddInPlace(IMatrix matrix, float coefficient1 = 1, float coefficient2 = 1)
        {
            Debug.Assert(IsValid && matrix.IsValid);
            var other = (GpuMatrix)matrix;

            Debug.Assert(other.RowCount == RowCount && other.ColumnCount == ColumnCount);
            _cuda.AddInPlace(Memory, other.Memory, RowCount * ColumnCount, coefficient1, coefficient2);
        }