Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F376183
sequence.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
sequence.hpp
View Options
//===-- rosa/support/sequence.hpp -------------------------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file rosa/support/sequence.hpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2017
///
/// \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
...
>
;
};
///@}
}
// End namespace rosa
#endif
// ROSA_SUPPORT_SEQUENCE_HPP
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Jun 8, 8:25 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
150520
Default Alt Text
sequence.hpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment