From fe899c3a589d8be00d369fe61a92454c88ebd178 Mon Sep 17 00:00:00 2001 From: Fahri Ali Rahman Date: Sat, 30 Mar 2024 02:19:36 +0700 Subject: [PATCH] fix for cuda --- include/nmtools/array/functional/functor.hpp | 5 ++++- include/nmtools/platform/cuda.hpp | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/nmtools/array/functional/functor.hpp b/include/nmtools/array/functional/functor.hpp index 701b13aa0..8e17d321f 100644 --- a/include/nmtools/array/functional/functor.hpp +++ b/include/nmtools/array/functional/functor.hpp @@ -86,7 +86,7 @@ namespace nmtools::functional , "the return of apply function is invalid!" ); } return result; - } + } // apply_function /** * @brief Type constructor to compose functors. @@ -149,6 +149,7 @@ namespace nmtools::functional }; // functor_composition_t template typename tuple, typename...functors_t> + nmtools_func_attribute functor_composition_t(const tuple&) -> functor_composition_t>; /** @@ -249,6 +250,7 @@ namespace nmtools::functional }; // functor_t template + nmtools_func_attribute functor_t(const F) -> functor_t; template typename left_tp, typename...left_functors_t, typename left_operands_t @@ -412,6 +414,7 @@ namespace nmtools::functional }; // apply_function_t> template + nmtools_func_attribute // host device apply_function_t(const F&) -> apply_function_t; template diff --git a/include/nmtools/platform/cuda.hpp b/include/nmtools/platform/cuda.hpp index a888789d4..97731bc8b 100644 --- a/include/nmtools/platform/cuda.hpp +++ b/include/nmtools/platform/cuda.hpp @@ -1,5 +1,5 @@ -#ifndef NMTOOLS_PLATFOM_CUDA_HPP -#define NMTOOLS_PLATFOM_CUDA_HPP +#ifndef NMTOOLS_PLATFORM_CUDA_HPP +#define NMTOOLS_PLATFORM_CUDA_HPP #define nmtools_func_attribute __host__ __device__ @@ -19,4 +19,4 @@ #define NMTOOLS_DISABLE_STL #endif -#endif // NMTOOLS_PLATFOM_CUDA_HPP \ No newline at end of file +#endif // NMTOOLS_PLATFORM_CUDA_HPP \ No newline at end of file