Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions src/core/util/arts_omp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,6 @@ void arts_omp_set_num_threads(int i [[maybe_unused]]) {
#endif
}

//! Wrapper for omp_get_nested
/*!
This wrapper works with and without OMP support.

\return 1 or 0, depending on if nested parallel execution is enabled or not.
*/
int arts_omp_get_nested() {
#ifdef _OPENMP
int nested = omp_get_nested();
#else
int nested = 0;
#endif

return nested;
}

//! Wrapper for omp_set_nested
/*!
This wrapper works with and without OMP support.

\param i Turn on nested parallelism with 1, turn off with 0.
*/
void arts_omp_set_nested(int i [[maybe_unused]]) {
#ifdef _OPENMP
omp_set_nested(i);
#else
// Nothing to do here.
#endif
}

//! Wrapper for omp_set_dynamic
/*!
This wrapper works with and without OMP support.
Expand Down
4 changes: 0 additions & 4 deletions src/core/util/arts_omp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ bool arts_omp_in_parallel();

int arts_omp_get_thread_num();

int arts_omp_get_nested();

void arts_omp_set_num_threads(int i);

void arts_omp_set_nested(int i);

void arts_omp_set_dynamic(int i);

bool arts_omp_parallel(unsigned long long n = -1, bool additional_condition = true);
Expand Down
12 changes: 12 additions & 0 deletions src/tests/scattering/test_utils.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ template <typename A, typename B> Numeric max_rel_error(const A& a, const B& b)
return max;
}

#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#elif defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wimplicit-int-float-conversion"
Comment thread
riclarsson marked this conversation as resolved.
#endif

/** Functional filling of tensor.
*
* Applies a given function mapping element coordinates to tensor
Expand Down Expand Up @@ -226,6 +234,10 @@ template <Index axis, matpack::any_md Tensor> void fill_along_axis(Tensor& t) {
generate(t, get_coord);
}

#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic pop
#endif

/** Fill tensor with increasing values along axis.
*
* Fills a tensor with values so that each element contains
Expand Down
Loading