public static void AllAnyBallotTests(GThread thread, float[] data)
 {
     thread.SyncThreadsCount(true);
     thread.All(true);
     thread.Any(true);
     thread.Ballot(true);
 }
        public static void SyncThreadCountKernel(GThread thread, int[] input, int[] output)
        {
            var tid = thread.threadIdx.x;

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

            if (tid == 0)
                output[0] = count;
        }
Example #3
0
        public static void SyncThreadCountKernel(GThread thread, int[] input, int[] output)
        {
            var tid = thread.threadIdx.x;

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

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

        }