コード例 #1
0
 public static void AllAnyBallotTests(GThread thread, float[] data)
 {
     thread.SyncThreadsCount(true);
     thread.All(true);
     thread.Any(true);
     thread.Ballot(true);
 }
コード例 #2
0
ファイル: Ballot.cs プロジェクト: JustasB/cudafy
        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;
        }
コード例 #3
0
ファイル: Ballot.cs プロジェクト: uzbekdev1/CUDAfy.NET
        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;
            }
        }
コード例 #4
0
        public static void AllAnyBallotTests(GThread thread, float[] data)
        {
            thread.SyncThreadsCount(true);
            thread.All(true);
            thread.Any(true);
            thread.Ballot(true);

        }