Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Engin Kayraklioglu <[email protected]>
  • Loading branch information
e-kayrakli committed Mar 20, 2023
1 parent 97428c9 commit fb4a70b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
11 changes: 2 additions & 9 deletions other_codes/chplGPU/modules/queens_GPU_call_device_search.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ module queens_GPU_call_device_search{

config const CPUGPUVerbose: bool = false;

proc getAligned(x: c_ptr, param alignment=32) {
var xAsInt = x:int;
xAsInt += alignment-(xAsInt%alignment);

return __primitive("cast", x.type, xAsInt);
}

proc queens_GPU_call_device_search(const num_gpus: c_int, const size: uint(16), const depthPreFixos: c_int,
ref local_active_set: [] queens_node, const initial_num_prefixes: uint(64)): (uint(64), uint(64)) {

Expand Down Expand Up @@ -57,7 +50,7 @@ module queens_GPU_call_device_search{
//writeln("starting loop");
foreach idx in 0..#gpu_load {
var flag = 0: uint(32);
// alignment didn't help
// alignment doesn't seem to help
var board: c_array(int(8), 64);

var depth: int(32);
Expand Down Expand Up @@ -86,7 +79,7 @@ module queens_GPU_call_device_search{
//if(block_ub > upper) block_ub = upper;
depth -= 1;
flag &= ~(1:int(32)<<board[depth]);
} else if (!(flag & mask ) && GPU_queens_stillLegal(board, depth)){
} else if (!(flag & mask ) && GPU_queens_stillLegal(board, depth)){

tree_size += 1;
flag |= mask;
Expand Down
6 changes: 0 additions & 6 deletions other_codes/cudaOnly/singleGPUQueens.cu
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ __global__ void BP_queens_root_dfs(int N, unsigned int nPrefixes, int initial_de

board[depth]++;
const int mask = 1<<board[depth];
//bit_test = 0;
//bit_test |= (1<<board[depth]);

if(board[depth] == N_l){
board[depth] = _EMPTY_;
Expand All @@ -130,10 +128,6 @@ __global__ void BP_queens_root_dfs(int N, unsigned int nPrefixes, int initial_de
flag &= ~mask;
}
}

//depth--;
//flag &= ~(1<<board[depth]);

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

sols[idx] = qtd_sols_thread ;
Expand Down

0 comments on commit fb4a70b

Please sign in to comment.