.. _program_listing_file_src_interpolator2_recip.tpp: Program Listing for File interpolator2_recip.tpp ================================================ |exhale_lsh| :ref:`Return to documentation for file ` (``src/interpolator2_recip.tpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* This file is part of brille. Copyright © 2020 Greg Tucker brille is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. brille is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with brille. If not, see . */ template bool Interpolator::rip_recip( bArray& x, const PointSymmetry& ptsym, const std::vector& r, const std::vector& invR, const int nthreads ) const { profile_update("Start Interpolator::rip_recip method"); omp_set_num_threads( (nthreads>0) ? nthreads : omp_get_max_threads() ); auto no = this->count_scalars_vectors_matrices(); if (!std::any_of(no.begin()+1, no.end(), [](ind_t n){return n>0;})) return false; T tmp_v[3], tmp_m[9]; const ind_t b_{this->branches()}, s_{this->branch_span()}; std::array ident = {1,0,0, 0,1,0, 0,0,1}; // OpenMP < v3.0 (VS uses v2.0) requires signed indexes for omp parallel long long xsize = brille::utils::u2s(x.size(0)); #if defined(__GNUC__) && !defined(__llvm__) && __GNUC__ < 9 // otherwise gcc complains that const b_ is *already* shared #pragma omp parallel for default(none) shared(x,ptsym,r,invR) private(tmp_v,tmp_m) firstprivate(ident,no,xsize) schedule(static) #else #pragma omp parallel for default(none) shared(b_,s_,x,ptsym,r,invR) private(tmp_v,tmp_m) firstprivate(ident,no,xsize) schedule(static) #endif for (long long si=0; si(si); T * xi = x.ptr(i); if (!brille::approx::matrix(3, ident.data(), ptsym.get(r[i]).data())){ for (ind_t b=0; b