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

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

Generated by: LCOV version 1.14