Skip to content

Commit

Permalink
Updates from review
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffburdick committed Jul 26, 2023
1 parent 4fa287d commit 16870ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/spectrogram.cu
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
viz::contour(time, freqs, Sxx);
#else
printf("Not outputting plot since visualizations disabled\n");
#endif
#endif
}

}

cudaEventRecord(stop, stream);
Expand Down
12 changes: 6 additions & 6 deletions include/matx/operators/isclose.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ namespace matx
op1_(op1), op2_(op2), rtol_(static_cast<inner_type>(rtol)), atol_(static_cast<inner_type>(atol))
{
static_assert(op1.Rank() == op2.Rank(), "Operator ranks must match in isclose()");
for (int32_t i = 0; i < op2.Rank(); i++) {
MATX_ASSERT_STR(op1.Size(i) == op2.Size(i), matxInvalidDim,
"Size of each dimension must match in isclose()");
}
ASSERT_COMPATIBLE_OP_SIZES(op1);
ASSERT_COMPATIBLE_OP_SIZES(op2);
}

template <typename... Is>
Expand All @@ -71,12 +69,14 @@ namespace matx

static __MATX_INLINE__ constexpr __MATX_HOST__ __MATX_DEVICE__ int32_t Rank()
{
return remove_cvref_t<Op1>::Rank();
return detail::matx_max(detail::get_rank<Op1>(), detail::get_rank<Op2>());
}

constexpr __MATX_INLINE__ __MATX_HOST__ __MATX_DEVICE__ index_t Size(int dim) const
{
return op1_.Size(dim);
index_t size1 = detail::get_expanded_size<Rank()>(op1_, dim);
index_t size2 = detail::get_expanded_size<Rank()>(op2_, dim);
return detail::matx_max(size1,size2);
}

private:
Expand Down

0 comments on commit 16870ff

Please sign in to comment.