LCOV - code coverage report
Current view: top level - elsa/storage/functions - Sqrt.hpp (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 5 5 100.0 %
Date: 2024-05-16 04:22:26 Functions: 5 5 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "CUDADefines.h"
       4             : 
       5             : #include <thrust/complex.h>
       6             : 
       7             : #include <cmath>
       8             : #include <complex>
       9             : 
      10             : namespace elsa::fn
      11             : {
      12             :     namespace detail
      13             :     {
      14             :         struct SqrtFn {
      15             :             template <class T>
      16             :             __host__ __device__ constexpr T operator()(const T& arg) const noexcept
      17         385 :             {
      18         385 :                 using std::sqrt;
      19         385 :                 using thrust::sqrt;
      20             : 
      21         385 :                 return sqrt(arg);
      22         385 :             }
      23             :         };
      24             :     } // namespace detail
      25             : 
      26             :     static constexpr __device__ detail::SqrtFn sqrt;
      27             : } // namespace elsa::fn

Generated by: LCOV version 1.14