Research Article

Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem

Algorithm 10

Calculation of conflicts with the coarse-grained scheme in GPU.
Input:
Output:
(1) global thread id in Kernel;
(2) ;
(3)for  =  + 1; <N; ++ ;/∗ for index after Xi ∗/
(4)do
(5);
(6)ifthen
(7)  atomicAdd (conflicts);
(8)end
(9)end