예제 #1
0
        public void WriteTest()
        {
            PdArray array = _pd.GetArray("array1");
            int     n     = array.Size;

            float[] input = new float[n];
            for (int i = 0; i < n; i++)
            {
                input [i] = i;
            }
            array.Write(input, 0, n);
        }
예제 #2
0
        public void ReadTest()
        {
            PdArray array = _pd.GetArray("array1");
            int     n     = array.Size;

            float[] input = new float[n];
            for (int i = 0; i < n; i++)
            {
                input [i] = i;
            }
            array.Write(input, 0, n);
            float[] read = array.Read(0, n);
            for (int i = 0; i < n; i++)
            {
                Assert.AreEqual(i, read [i]);
            }
        }