Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F27036597
sequence.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
sequence.hpp
View Options
//===-- rosa/support/sequence.hpp -------------------------------*- C++ -*-===//
//
// The RoSA Framework
//
// Distributed under the terms and conditions of the Boost Software License 1.0.
// See accompanying file LICENSE.
//
// If you did not receive a copy of the license file, see
// http://www.boost.org/LICENSE_1_0.txt.
//
//===----------------------------------------------------------------------===//
///
/// \file rosa/support/sequence.hpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2017-2019
///
/// \brief Template facilities to statically generate a sequence of numbers.
///
//===----------------------------------------------------------------------===//
#ifndef ROSA_SUPPORT_SEQUENCE_HPP
#define ROSA_SUPPORT_SEQUENCE_HPP
#include
<cstddef>
namespace
rosa
{
/// \defgroup Seq Implementation of rosa::Seq
///
/// Facility to statically generate sequences of numbers.
///
///@{
/// Template with an empty struct to store a sequence of numbers in compile time
/// as template arguments.
///
/// Generate a sequence of numbers from `0` up to (including) `(N - 1)` like
/// \code
/// typename GenSeq<N>::Type
/// \endcode
template
<
size_t
...
>
struct
Seq
{};
/// Sequence generator, the general case when counting down by extending the
/// sequence.
template
<
size_t
N
,
size_t
...
S
>
struct
GenSeq
:
GenSeq
<
N
-
1
,
N
-
1
,
S
...
>
{};
/// Sequence generator, the terminal case when storing the generated sequence
/// into \c Seq.
template
<
size_t
...
S
>
struct
GenSeq
<
0
,
S
...
>
{
using
Type
=
Seq
<
S
...
>
;
};
///@}
/// Convenience template alias for using \c rosa::GenSeq to obtain an instance
/// of \c rosa::Seq.
///
/// \see \c rosa::Seq and \c rosa::GenSeq
template
<
size_t
...
S
>
using
seq_t
=
typename
GenSeq
<
S
...
>::
Type
;
}
// End namespace rosa
#endif
// ROSA_SUPPORT_SEQUENCE_HPP
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Oct 27, 8:04 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
407861
Default Alt Text
sequence.hpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline