From 8bc7955f5d95521f7c932b9551a3b71a62117630 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 16 Jul 2026 21:49:56 +0200 Subject: Fixed stupid issue regarding device code --- modules/core/c++/particle/aabb.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/core/c++/particle') diff --git a/modules/core/c++/particle/aabb.hpp b/modules/core/c++/particle/aabb.hpp index 983fd97..da39ec2 100644 --- a/modules/core/c++/particle/aabb.hpp +++ b/modules/core/c++/particle/aabb.hpp @@ -23,23 +23,24 @@ public: >; public: template - static constexpr saw::error_or> calculate(const saw::data& p_grp, const saw::data>& i, const saw::data>& meta){ + static constexpr saw::error_or> calculate(const saw::data& p_grp, const saw::data>& index, const saw::data>& meta){ static_assert(PC > 0u, "Can't calculate from no particles"); - if(not (i.at({0u}).get() < PC) ){ + if(not (index.at({{0u}}).get() < PC) ){ + std::cerr.flush(); return saw::make_error("Too large i in particle_aabb"); } saw::data aabb; auto& parts = p_grp.template get<"particles">(); - auto& pi = parts.at(i); + auto& pi = parts.at(index); auto& pirb = pi.template get<"rigid_body">(); auto& pirb_pos = pirb.template get<"position">(); auto& a = aabb.template get<"a">(); auto& b = aabb.template get<"b">(); - const saw::data>& rad_d = p_grp.template get<"collision">().at(i).template get<"radius">(); + const saw::data>& rad_d = p_grp.template get<"collision">().at({{0u}}).template get<"radius">(); saw::data> lower; saw::data> upper; @@ -52,7 +53,6 @@ public: } return aabb; - } }; -- cgit v1.2.3