Skip to content

Commit

Permalink
MRA: Logic error in detecting the first thread
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Sep 18, 2024
1 parent 70e9680 commit 53f2b80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/madness/mra-device/kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ GLOBALSCOPE void fcoeffs_kernel1(
T thresh)
{
int blockid = blockIdx.x;
bool is_t0 = !!(threadIdx.x + threadIdx.y + threadIdx.z);
bool is_t0 = 0 == (threadIdx.x + threadIdx.y + threadIdx.z);
const std::size_t K2NDIM = std::pow(K, NDIM);
const std::size_t TWOK2NDIM = std::pow(2*K, NDIM);
/* reconstruct tensor views from pointers
Expand Down Expand Up @@ -391,7 +391,7 @@ GLOBALSCOPE void compress_kernel(
const std::array<const T*, Key<NDIM>::num_children()> in_ptrs,
std::size_t K)
{
const bool is_t0 = !!(threadIdx.x + threadIdx.y + threadIdx.z);
const bool is_t0 = 0 == (threadIdx.x + threadIdx.y + threadIdx.z);
int blockid = blockIdx.x;
{ // Collect child coeffs and leaf info
/* construct tensors */
Expand Down Expand Up @@ -476,7 +476,7 @@ GLOBALSCOPE void reconstruct_kernel(
std::array<T*, (1<<NDIM) > r_arr,
std::size_t K)
{
const bool is_t0 = !!(threadIdx.x + threadIdx.y + threadIdx.z);
const bool is_t0 = 0 == (threadIdx.x + threadIdx.y + threadIdx.z);
const size_t K2NDIM = std::pow( K,NDIM);
const size_t TWOK2NDIM = std::pow(2*K,NDIM);
SHARED TensorView<T, NDIM> node, s, workspace, from_parent;
Expand Down

0 comments on commit 53f2b80

Please sign in to comment.