public MyMatrixAutoOps(MyWorkingNode callee, MatOperation operations, MyMemoryBlock<float> A = null) { if ((MyMatrixKernelOps.AvailableOperations() & operations) > 0) { MatKerlOps = new MyMatrixKernelOps(callee, operations); } if ((MyMatrixCublasOps.AvailableOperations() & operations) > 0) { MatCublOps = new MyMatrixCublasOps(callee); } if ((MyMatrixCPUOps.AvailableOperations() & operations) > 0) { MatCPUOps = new MyMatrixCPUOps(callee); } }
public MyMatrixAutoOps(MyWorkingNode callee, MatOperation operations, MyMemoryBlock <float> A = null) { if ((MyMatrixKernelOps.AvailableOperations() & operations) > 0) { MatKerlOps = new MyMatrixKernelOps(callee, operations); } if ((MyMatrixCublasOps.AvailableOperations() & operations) > 0) { MatCublOps = new MyMatrixCublasOps(callee); } if ((MyMatrixCPUOps.AvailableOperations() & operations) > 0) { MatCPUOps = new MyMatrixCPUOps(callee); } }
public override void Run(MatOperation operation, MyMemoryBlock <float> A, MyMemoryBlock <float> B, MyMemoryBlock <float> Result) { if ((MyMatrixCublasOps.AvailableOperations() & operation) > 0) { MatCublOps.Run(operation, A, B, Result); } else if ((MyMatrixKernelOps.AvailableOperations() & operation) > 0) { MatKerlOps.Run(operation, A, B, Result); } else if ((MyMatrixCPUOps.AvailableOperations() & operation) > 0) { MatCPUOps.Run(operation, A, B, Result); } else { MyLog.Writer.WriteLine(MyLogLevel.ERROR, "Trying to run undefined MatOps"); } }