Esempio n. 1
0
        public static void ApplyAbsDerivative(AlignedArray input, AlignedArray output, AlignedArray grad, bool drop)
        {
            Contracts.Assert(Compat(input));
            Contracts.Assert(Compat(output));
            Contracts.Assert(Compat(grad));
            Contracts.Assert(output.Size == input.Size);
            Contracts.Assert(output.Size == grad.Size);

            unsafe
            {
                fixed(float *px = &input.Items[0])
                fixed(float *py = &output.Items[0])
                fixed(float *pg = &grad.Items[0])
                Thunk.ApplyAbsDerivativeX(Ptr(input, px), Ptr(output, py), Ptr(grad, pg), grad.Size, drop);
            }
        }