Skip to content

Commit

Permalink
Add some \internal documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Nov 24, 2015
1 parent f99a327 commit 210030d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/interleavedmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ struct InterleavedMemoryReadAccess : public InterleavedMemoryAccessBase<V, I, Re
}
};

///\internal Runtime check (NDEBUG) for asserting unique indexes.
template<typename I> struct CheckIndexesUnique
{
#ifdef NDEBUG
Expand All @@ -137,6 +138,7 @@ template<typename I> struct CheckIndexesUnique
}
#endif
};
///\internal For SuccessiveEntries there can never be a problem.
template<size_t S> struct CheckIndexesUnique<SuccessiveEntries<S> >
{
static Vc_INTRINSIC void test(const SuccessiveEntries<S> &) {}
Expand Down
10 changes: 10 additions & 0 deletions common/loadstoreflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ template<typename Base, typename Default, typename T, typename... LoadStoreFlags
#ifdef Vc_ICC
#pragma warning(disable: 177)
#endif
/**\internal
* Implementation of the load/store flags mechanism. This is internal API. Only some
* concrete aliases are API-relevant types.
*/
template<typename... Flags> struct LoadStoreFlags
{
private:
Expand Down Expand Up @@ -118,6 +122,9 @@ template<typename... Flags> struct LoadStoreFlags
typedef typename std::conditional<!IsPrefetch , void *, void>::type EnableIfNotPrefetch;
};

/**\internal
* Specialization for no flags (i.e aligned, non-streaming, no prefetching)
*/
template<> struct LoadStoreFlags<>
{
constexpr LoadStoreFlags() {}
Expand Down Expand Up @@ -171,10 +178,13 @@ struct Prefetch : public LoadStoreFlags::LoadStoreFlags<PrefetchFlag<L1, L2, Exc

namespace Traits
{
///\internal partial specialization for detecting LoadStoreFlags types
template <typename... Ts>
struct is_loadstoreflag_internal<LoadStoreFlags::LoadStoreFlags<Ts...>> : public std::true_type
{
};
///\internal partial specialization for detecting the derived Prefetch type as a
/// load/store flag.
template <size_t L1, size_t L2, typename ExclusiveOrShared>
struct is_loadstoreflag_internal<Prefetch<L1, L2, ExclusiveOrShared>> : public std::true_type
{
Expand Down
10 changes: 10 additions & 0 deletions common/simdize.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,23 +334,29 @@ struct SubstituteOneByOne<N, MT, Typelist<Replaced...>, T, Remaining...>
Remaining...>::type;
};

///\internal Generates the SubstitutedWithValues member. This needs specialization for the
/// number of types in the template argument list.
template <size_t Size, typename... Replaced> struct SubstitutedBase;
///\internal Specialization for one type parameter.
template <typename Replaced> struct SubstitutedBase<1, Replaced> {
template <typename ValueT, template <typename, ValueT...> class C, ValueT... Values>
using SubstitutedWithValues = C<Replaced, Values...>;
};
///\internal Specialization for two type parameters.
template <typename R0, typename R1> struct SubstitutedBase<2, R0, R1>
{
template <typename ValueT, template <typename, typename, ValueT...> class C,
ValueT... Values>
using SubstitutedWithValues = C<R0, R1, Values...>;
};
///\internal Specialization for three type parameters.
template <typename R0, typename R1, typename R2> struct SubstitutedBase<3, R0, R1, R2>
{
template <typename ValueT, template <typename, typename, typename, ValueT...> class C,
ValueT... Values>
using SubstitutedWithValues = C<R0, R1, R2, Values...>;
};
///\internal Specialization for four type parameters.
template <typename... Replaced> struct SubstitutedBase<4, Replaced...> {
#ifndef Vc_ICC
template <typename ValueT,
Expand All @@ -359,6 +365,7 @@ template <typename... Replaced> struct SubstitutedBase<4, Replaced...> {
using SubstitutedWithValues = C<Replaced..., Values...>;
#endif // Vc_ICC
};
///\internal Specialization for five type parameters.
template <typename... Replaced> struct SubstitutedBase<5, Replaced...> {
#ifndef Vc_ICC
template <typename ValueT, template <typename, typename, typename, typename, typename,
Expand All @@ -367,6 +374,7 @@ template <typename... Replaced> struct SubstitutedBase<5, Replaced...> {
using SubstitutedWithValues = C<Replaced..., Values...>;
#endif // Vc_ICC
};
///\internal Specialization for six type parameters.
template <typename... Replaced> struct SubstitutedBase<6, Replaced...> {
#ifndef Vc_ICC
template <typename ValueT, template <typename, typename, typename, typename, typename,
Expand All @@ -375,6 +383,7 @@ template <typename... Replaced> struct SubstitutedBase<6, Replaced...> {
using SubstitutedWithValues = C<Replaced..., Values...>;
#endif // Vc_ICC
};
///\internal Specialization for seven type parameters.
template <typename... Replaced> struct SubstitutedBase<7, Replaced...> {
#ifndef Vc_ICC
template <typename ValueT, template <typename, typename, typename, typename, typename,
Expand All @@ -383,6 +392,7 @@ template <typename... Replaced> struct SubstitutedBase<7, Replaced...> {
using SubstitutedWithValues = C<Replaced..., Values...>;
#endif // Vc_ICC
};
///\internal Specialization for eight type parameters.
template <typename... Replaced> struct SubstitutedBase<8, Replaced...> {
#ifndef Vc_ICC
template <typename ValueT, template <typename, typename, typename, typename, typename,
Expand Down

0 comments on commit 210030d

Please sign in to comment.