Skip to content

Commit

Permalink
fix nthreads
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael McCrackan committed Oct 22, 2024
1 parent 57cf289 commit e9ad26c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/array_ops.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ T _calculate_median(const T* data, const int n)
template <typename T>
void _detrend(T* data, const int ndets, const int nsamps, const int row_stride,
const std::string & method, const int linear_ncount,
const int nthreads=1)
const int nthreads)
{
if (method == "mean") {
#pragma omp parallel for num_threads(nthreads)
Expand Down Expand Up @@ -1129,7 +1129,7 @@ void _detrend_buffer(bp::object & tod, const std::string & method,

// We want _detrend to accept C++ types so it can be used internally
// for Welch psd calculations, hence the hierarchical function calls
_detrend<T>(tod_data, ndets, nsamps, row_stride, method, linear_ncount);
_detrend<T>(tod_data, ndets, nsamps, row_stride, method, linear_ncount, nthreads);
}

void detrend(bp::object & tod, const std::string & method, const int linear_ncount)
Expand Down

0 comments on commit e9ad26c

Please sign in to comment.