aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/ParticleUtils.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-26Fix: CUDA C++17 Builds (ParticleBins) (#2129)Gravatar Axel Huebl 1-1/+1
Seen with CUDA 11.2.0 in C++17 build: ``` nvcc_internal_extended_lambda_implementation: In instantiation of ‘struct __nv_hdl_helper_trait_outer<false, false, const amrex::GpuArray<double, 3>, const amrex::GpuArray<double, 3>, const amrex::Dim3>::__nv_hdl_helper_trait<__nv_dl_tag<amrex::DenseBins<amrex::Particle<0, 0> > (*)(int, const amrex::MFIter&, const amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&), ParticleUtils::findParticlesInEachCell, 1>, amrex::IntVect (ParticleUtils::findParticlesInEachCell(int, const amrex::MFIter&, const ParticleTileType&)::<lambda(const ParticleType&)>::*)(const amrex::Particle<0, 0>&) const noexcept>’: nvcc_internal_extended_lambda_implementation:677:8: required from ‘struct __nv_hdl_helper_trait_outer<false, false, const amrex::GpuArray<double, 3>, const amrex::GpuArray<double, 3>, const amrex::Dim3>::__nv_hdl_helper_trait<__nv_dl_tag<amrex::DenseBins<amrex::Particle<0, 0> > (*)(int, const amrex::MFIter&, const amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&), ParticleUtils::findParticlesInEachCell, 1>, ParticleUtils::findParticlesInEachCell(int, const amrex::MFIter&, const ParticleTileType&)::<lambda(const ParticleType&)> >’ nvcc_internal_extended_lambda_implementation:696:204: required by substitution of ‘template<class Lambda> static decltype (__nv_hdl_helper_trait_outer<false, false, const amrex::GpuArray<double, 3>, const amrex::GpuArray<double, 3>, const amrex::Dim3>::__nv_hdl_helper_trait<__nv_dl_tag<amrex::DenseBins<amrex::Particle<0, 0> > (*)(int, const amrex::MFIter&, const amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&), ParticleUtils::findParticlesInEachCell, 1>, Lambda>::get(lam, args#0, args#1, args#2)) __nv_hdl_create_wrapper_t<false, false, __nv_dl_tag<amrex::DenseBins<amrex::Particle<0, 0> > (*)(int, const amrex::MFIter&, const amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&), ParticleUtils::findParticlesInEachCell, 1>, const amrex::GpuArray<double, 3>, const amrex::GpuArray<double, 3>, const amrex::Dim3>::__nv_hdl_create_wrapper<Lambda>(Lambda&&, amrex::GpuArray<double, 3>, amrex::GpuArray<double, 3>, amrex::Dim3) [with Lambda = ParticleUtils::findParticlesInEachCell(int, const amrex::MFIter&, const ParticleTileType&)::<lambda(const ParticleType&)>]’ /home/axel/src/warpx/Source/Utils/ParticleUtils.cpp:62:17: required from here nvcc_internal_extended_lambda_implementation:677:77: error: ‘operator()’ is not a member of ‘amrex::IntVect (ParticleUtils::findParticlesInEachCell(int, const amrex::MFIter&, const ParticleTileType&)::<lambda(const ParticleType&)>::*)(const amrex::Particle<0, 0>&) const noexcept’ /home/axel/src/warpx/Source/Utils/ParticleUtils.cpp: In function ‘ParticleUtils::ParticleBins ParticleUtils::findParticlesInEachCell(int, const amrex::MFIter&, const ParticleTileType&)’: /home/axel/src/warpx/Source/Utils/ParticleUtils.cpp:62:17: error: no matching function for call to ‘__nv_hdl_create_wrapper_t<false, false, __nv_dl_tag<amrex::DenseBins<amrex::Particle<0, 0> > (*)(int, const amrex::MFIter&, const amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&), ParticleUtils::findParticlesInEachCell, 1>, const amrex::GpuArray<double, 3>, const amrex::GpuArray<double, 3>, const amrex::Dim3>::__nv_hdl_create_wrapper(ParticleUtils::findParticlesInEachCell(int, const amrex::MFIter&, const ParticleTileType&)::<lambda(const ParticleType&)>, const amrex::GpuArray<double, 3>&, const amrex::GpuArray<double, 3>&, const amrex::Dim3&)’ 62 | }); | ^ nvcc_internal_extended_lambda_implementation:696:13: note: candidate: ‘template<class Lambda> static decltype (typename __nv_hdl_helper_trait_outer<IsMutable, HasFuncPtrConv, CaptureArgs ...>::__nv_hdl_helper_trait<Tag, Lambda>::get(lam, __nv_hdl_create_wrapper_t::__nv_hdl_create_wrapper::args ...)) __nv_hdl_create_wrapper_t<IsMutable, HasFuncPtrConv, Tag, CaptureArgs>::__nv_hdl_create_wrapper(Lambda&&, CaptureArgs ...) [with Lambda = Lambda; bool IsMutable = false; bool HasFuncPtrConv = false; Tag = __nv_dl_tag<amrex::DenseBins<amrex::Particle<0, 0> > (*)(int, const amrex::MFIter&, const amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&), ParticleUtils::findParticlesInEachCell, 1>; CaptureArgs = {const amrex::GpuArray<double, 3>, const amrex::GpuArray<double, 3>, const amrex::Dim3}]’ nvcc_internal_extended_lambda_implementation:696:13: note: substitution of deduced template arguments resulted in errors seen above ``` Since this lambda is only needed on device, we can relax the qualifier.
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-0/+15
* initial tests with IWYU * added a couple of forward declarations * used iwyu on more files * progress * used iwyu on more files * progress with iwyu * progress with iwyu * fixed bug * progress with iwyu * progress with IWYU * progress with IWYU * fixed bug * fixed bug * progress with IWYU * progress with IWYU + use forward declarations in WarpX.H * first try with .def files * fix bugs * progress with IWYU * progress with IWYU * progress with iwyu * correct copyright * fixed bug * fixed bugs * fix missing include * fixed bug * fix bug * fix bug introduced during last bugfix * use iwyu on newly added files * add space * fix bug * fix missing include * fix missing include * fix missing include * fixed bugs * fixed bug * attempt at fixing issue with math functions * added missing include * fixed missing include * using _fwd.H * fixed bug * progress with iwyu * update AMReX branch * enforce alphabetic order * progress with iwyu * use right version of amrex * use right version of amrex for tests * fixed bug * fix another bug * fix missing include * fix missing include * fix missing include * updated amrex * initial work to document new include strategy * updated documentation * Fix rst & private includes * Remove accidentially added files * Fix rst code blocks * one more rst block Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-14Implement leveling thinning algorithm (#1283)Gravatar NeilZaim 1-0/+52
* Initial commit (not working) * First working version * Cleaning and adding Doxygen comments * Apply suggestions from code review * Move findParticlesInEachCell to Utils/ParticleUtils Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>