public static void AllAnyBallotTests(GThread thread, float[] data)
 {
     thread.SyncThreadsCount(true);
     thread.All(true);
     thread.Any(true);
     thread.Ballot(true);
 }
Example #2
0
        public static void BallotKernel(GThread thread, int[] input, int[] output)
        {
            var tid = thread.threadIdx.x;
            var wid = thread.threadIdx.x / 32;
            var twid = thread.threadIdx.x % 32;

            int value = input[tid];
            bool predicate = value == 1;
            var ballot = thread.Ballot(predicate);

            if (twid == 0)
                output[wid] = ballot;
        }
Example #3
0
        public static void BallotKernel(GThread thread, int[] input, int[] output)
        {
            var tid  = thread.threadIdx.x;
            var wid  = thread.threadIdx.x / 32;
            var twid = thread.threadIdx.x % 32;

            int  value     = input[tid];
            bool predicate = value == 1;
            var  ballot    = thread.Ballot(predicate);

            if (twid == 0)
            {
                output[wid] = ballot;
            }
        }
        public static void AllAnyBallotTests(GThread thread, float[] data)
        {
            thread.SyncThreadsCount(true);
            thread.All(true);
            thread.Any(true);
            thread.Ballot(true);

        }