Пример #1
0
        public void GetBranch_01()
        {
            var slicer = new Slicer(new SIMDRuler());
            var actual = slicer.CreateRowBranch(1);

            Assert.IsNotNull(actual);
            Assert.IsNotNull(actual.Keys);
            Assert.AreEqual(16, actual.Keys.Length);
            Assert.AreEqual(1, actual.NoOfBuckets);
        }
Пример #2
0
        public void GetBranch_05()
        {
            var BRANCH_VALUES = new ushort[]
            {
                11, 12, 13, 14, 15
            };

            const int MAX_VALUES = 5;
            var       slicer     = new Slicer(new SIMDRuler());
            var       actual     = slicer.CreateRowBranch(MAX_VALUES);

            Assert.IsNotNull(actual);
            Assert.IsNotNull(actual.Keys);
            Assert.AreEqual(16, actual.Keys.Length);
            Assert.AreEqual(1, actual.NoOfBuckets);
        }
Пример #3
0
        public void GetBranch_16()
        {
            const int MAX_VALUES    = 16;
            var       BRANCH_VALUES = new ushort[]
            {
                201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
                211, 212, 213, 214, 215, 216,
            };
            var slicer = new Slicer(new SIMDRuler());
            var actual = slicer.CreateRowBranch(MAX_VALUES);

            Assert.IsNotNull(actual);
            Assert.IsNotNull(actual.Keys);
            Assert.AreEqual(16, actual.Keys.Length);
            Assert.AreEqual(1, actual.NoOfBuckets);
        }
Пример #4
0
        public void GetBranch_17()
        {
            const int TWO_BUCKETS_LONG = 32;
            const int MAX_VALUES       = 17;

            ushort[] BRANCH_VALUES = new ushort[]
            {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
                11, 12, 13, 14, 15, 16, 17,
            };
            var slicer = new Slicer(new SIMDRuler());
            var actual = slicer.CreateRowBranch(MAX_VALUES);

            Assert.IsNotNull(actual);
            Assert.IsNotNull(actual.Keys);

            Assert.AreEqual(TWO_BUCKETS_LONG, actual.Keys.Length);
            Assert.AreEqual(2, actual.NoOfBuckets);
        }