public VectorOps(MyWorkingNode caller, VectorOperation operations, MyMemoryBlock<float> tempBlock) { m_caller = caller; m_operations = operations; m_temp = tempBlock; MatOperation mat_ops = MatOperation.None; if (m_operations.HasFlag(VectorOperation.Rotate)) { Debug.Assert(tempBlock.Count >= 4, "Temporary memory block has to be large at least 4 items when using Rotate operation"); mat_ops |= MatOperation.Multiplication; } if (m_operations.HasFlag(VectorOperation.Angle)) mat_ops |= MatOperation.DotProd; if (m_operations.HasFlag(VectorOperation.DirectedAngle)) { mat_ops |= MatOperation.Multiplication | MatOperation.DotProd; m_operations |= VectorOperation.Angle | VectorOperation.Rotate; } m_matOperation = new MyMatrixAutoOps(caller, mat_ops); }
public override void Init(int nGPU) { //mat_opCublas = new MyMatrixCublasOps(Owner);// | Matrix.MatOperation.MaxIndex, Owner.A); mat_operation = new MyMatrixAutoOps(Owner, Owner.Operation, Owner.A); // it may need A for setting up kernel size! }
public override void Init(int nGPU) { mat_operation = new MyMatrixAutoOps(Owner, Owner.Operation, Owner.A); // it may need A for setting up kernel size! }