/// <summary> /// Called after this object was de-serialised. /// </summary> public void OnDeserialised() { CudaContext restoredContext = CudaFloat32Handler.GetContextForDeviceId(_cudaContextDeviceId); _cudaContextDeviceId = restoredContext.DeviceId; CudaContext = restoredContext; }
private static void SamplePermute() { IComputationHandler handler = new CudaFloat32Handler(); INDArray array = handler.NDArray(ArrayUtils.Range(1, 30), 5L, 3L, 2L); Console.WriteLine(ArrayUtils.ToString(array, (ADNDArray <float> .ToStringElement)null, 0, true)); array.PermuteSelf(1, 0, 2); Console.WriteLine(ArrayUtils.ToString(array, (ADNDArray <float> .ToStringElement)null, 0, true)); }
public CudaWorker(IOperator @operator, CudaFloat32Handler handler, ThreadPriority priority = ThreadPriority.Highest) : base(@operator, handler, priority) { _cudaHandler = handler; }