Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:24:14

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 // System include(s).
0012 #include <cstddef>
0013 #include <utility>
0014 
0015 namespace detray::test {
0016 
0017 /// Execute a test functor on the host (later compare with device results)
0018 template <class functor_t, class... Args>
0019 void execute_host_test(std::size_t array_sizes, Args... args) {
0020   // Instantiate the functor.
0021   constexpr functor_t functor;
0022 
0023   // Execute the functor on all elements of the array(s).
0024   for (std::size_t i = 0; i < array_sizes; ++i) {
0025     functor(i, std::forward<Args>(args)...);
0026   }
0027 }
0028 
0029 }  // namespace detray::test