Example #1
0
    public void GpuWithTemporaryBuffers()
    {
        using ReadOnlyBuffer <float> x  = GraphicsDevice.Default.AllocateReadOnlyBuffer(X !);
        using ReadOnlyBuffer <float> w  = GraphicsDevice.Default.AllocateReadOnlyBuffer(W !);
        using ReadOnlyBuffer <float> b  = GraphicsDevice.Default.AllocateReadOnlyBuffer(B !);
        using ReadWriteBuffer <float> y = GraphicsDevice.Default.AllocateReadWriteBuffer <float>(Y !.Length);

        BlasHelpers.FullyConnectedForwardGpu(GraphicsDevice.Default, C, N, M, P, x, w, b, y);

        y.CopyTo(Y);
    }
Example #2
0
 public void GpuWithNoTemporaryBuffers()
 {
     BlasHelpers.FullyConnectedForwardGpu(GraphicsDevice.Default, C, N, M, P, BufferX !, BufferW !, BufferB !, BufferY !);
 }