Skip to content

Commit

Permalink
More type adjustment
Browse files Browse the repository at this point in the history
Signed-off-by: Engin Kayraklioglu <[email protected]>
  • Loading branch information
e-kayrakli committed Jan 14, 2023
1 parent ff1e663 commit 05e18a3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions other_codes/chplGPU/modules/queens_GPU_call_device_search.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ module queens_GPU_call_device_search{

//writeln("starting loop");
foreach idx in 0..#gpu_load {
var flag = 0: uint;
var bit_test = 0: uint;
var flag = 0: uint(32);
var bit_test = 0: uint(32);
/*var board: [0..31] int(8);*/
var board: c_array(int(8), 32);

var depth;
var depth: int(32);

var N_l = size;
var qtd_solucoes_thread = 0: uint(64);
Expand All @@ -64,25 +64,25 @@ module queens_GPU_call_device_search{
for i in 0..<N_l do // what happens if I use promotion here?
board[i] = _EMPTY_;

flag = root_prefixes[idx:uint(64)].control;
flag = root_prefixes[idx].control;

for i in 0..<depthGlobal do
board[i] = root_prefixes[idx:uint(64)].board[i];
board[i] = root_prefixes[idx].board[i];

depth=depthGlobal;

do{
board[depth] += 1;
bit_test = 0;
bit_test |= 1<<board[depth];
bit_test |= 1:int(32)<<board[depth];

if(board[depth] == N_l){
board[depth] = _EMPTY_;
//if(block_ub > upper) block_ub = upper;
}else if (!(flag & bit_test ) && GPU_queens_stillLegal(board, depth)){

tree_size += 1;
flag |= (1<<board[depth]);
flag |= (1:int(32)<<board[depth]);

depth += 1;

Expand All @@ -92,7 +92,7 @@ module queens_GPU_call_device_search{
}else continue;

depth -= 1;
flag &= ~(1<<board[depth]);
flag &= ~(1:int(32)<<board[depth]);

}while(depth >= depthGlobal); //FIM DO DFS_BNB

Expand Down

0 comments on commit 05e18a3

Please sign in to comment.