Skip to content

Commit

Permalink
utils/Interval: Fix missing GPU specifier macros
Browse files Browse the repository at this point in the history
  • Loading branch information
mirenradia committed Jun 5, 2024
1 parent d06de80 commit 17b7305
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/utils/Interval.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ struct Interval
m_end = a_lastComp;

Check failure on line 22 in Source/utils/Interval.hpp

View workflow job for this annotation

GitHub Actions / clang-tidy & clang-format

Source/utils/Interval.hpp:22:9 [clang-diagnostic-error]

use of undeclared identifier 'm_end'
}

[[nodiscard]] AMREX_GPU_DEVICE AMREX_FORCE_INLINE int begin() const
[[nodiscard]] AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int begin() const

Check warning on line 25 in Source/utils/Interval.hpp

View workflow job for this annotation

GitHub Actions / clang-tidy & clang-format

Source/utils/Interval.hpp:25:7 [clang-diagnostic-ignored-attributes]

'nodiscard' attribute only applies to Objective-C methods, enums, structs, unions, classes, functions, function pointers, and typedefs

Check failure on line 25 in Source/utils/Interval.hpp

View workflow job for this annotation

GitHub Actions / clang-tidy & clang-format

Source/utils/Interval.hpp:25:19 [clang-diagnostic-error]

unknown type name 'AMREX_GPU_HOST_DEVICE'

Check failure on line 25 in Source/utils/Interval.hpp

View workflow job for this annotation

GitHub Actions / clang-tidy & clang-format

Source/utils/Interval.hpp:25:59 [clang-diagnostic-error]

expected ';' at end of declaration list
{
return m_begin;
}

//! return last component number
[[nodiscard]] AMREX_GPU_DEVICE AMREX_FORCE_INLINE int end() const
[[nodiscard]] AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int end() const
{
return m_end;
}

[[nodiscard]] AMREX_GPU_DEVICE AMREX_FORCE_INLINE int size() const
[[nodiscard]] AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int size() const
{
return m_end - m_begin + 1;
}
Expand Down

0 comments on commit 17b7305

Please sign in to comment.