LCOV - code coverage report
Current view: top level - elsa/core/transforms - FFTPolicy.h (source / functions) Hit Total Coverage
Test: coverage-all.lcov Lines: 0 12 0.0 %
Date: 2024-12-21 07:37:52 Functions: 0 2 0.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <cstdint>
       4             : 
       5             : namespace elsa
       6             : {
       7             :     /// FFTPolicy controls the choice of the fft backend.
       8             :     /// AUTO -> the implementation may choose any backend;
       9             :     /// DEVICE -> the cuFFT implementation must be used. An error is generated if this is not
      10             :     /// possible;
      11             :     /// HOST -> the Eigen based host sided implementation must be chosen.
      12             :     enum class FFTPolicy : uint8_t {
      13             :         AUTO,
      14             :         DEVICE,
      15             :         HOST,
      16             :     };
      17             : } // namespace elsa
      18             : 
      19             : #if __has_include("spdlog/fmt/fmt.h")
      20             : #include "spdlog/fmt/fmt.h"
      21             : 
      22             : template <>
      23             : struct fmt::formatter<elsa::FFTPolicy> {
      24           0 :     auto parse(format_parse_context& ctx) { return ctx.begin(); }
      25             : 
      26             :     template <typename FormatContext>
      27             :     auto format(const elsa::FFTPolicy& p, FormatContext& ctx) const
      28           0 :     {
      29           0 :         if (p == elsa::FFTPolicy::AUTO) {
      30           0 :             return fmt::format_to(ctx.out(), "AUTO");
      31           0 :         } else if (p == elsa::FFTPolicy::DEVICE) {
      32           0 :             return fmt::format_to(ctx.out(), "DEVICE");
      33           0 :         } else if (p == elsa::FFTPolicy::HOST) {
      34           0 :             return fmt::format_to(ctx.out(), "HOST");
      35           0 :         } else {
      36           0 :             return fmt::format_to(ctx.out(), "UNKNOWN VALUE");
      37           0 :         }
      38           0 :     }
      39             : };
      40             : #endif

Generated by: LCOV version 1.14