CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
lindex.h
Go to the documentation of this file.
1// -*- C++ -*-
15#ifndef __cxz_lindex_h__
16#define __cxz_lindex_h__
17
18#include "base/base.h"
19#include "ranges/index_base.h"
20#include "ranges/range_base.h"
21#include "xpr/xpr.h"
22
23namespace CNORXZ
24{
30 template <class Index, SizeT L>
31 class LIndex : public Index
32 {
33 public:
34 typedef typename Index::IB IB;
35 typedef typename Index::RangeType RangeType;
36
42 LIndex(const Sptr<Index>& i);
43
47 IndexId<L> id() const;
48
52 template <SizeT I>
53 decltype(auto) stepSize(const IndexId<I>& id) const;
54
56 template <class Xpr, class F>
57 decltype(auto) ifor(const Xpr& xpr, F&& f) const;
58
59 private:
60 Sptr<Index> mI;
61 };
62
67 template <class Index, SizeT L>
68 struct is_index<LIndex<Index,L>>
69 {
70 static constexpr bool value = is_index<Index>::value;
71 };
72
77 template <class Index, SizeT L>
79 {
81 };
82
88 template <class Index, SizeT L, class I1>
89 decltype(auto) operator*(const Sptr<LIndex<Index,L>>& a, const Sptr<I1>& b);
90
96 template <SizeT L, class Index>
97 decltype(auto) lindexPtr(const Sptr<Index>& i);
98
104 template <class Index, SizeT L>
105 decltype(auto) lindexPtr(const Sptr<Index>& i, CSizeT<L> l);
106}
107
108#endif
basic headers
LIndex(const Sptr< Index > &i)
Definition lindex.cc.h:20
decltype(auto) ifor(const Xpr &xpr, F &&f) const
Definition lindex.cc.h:50
Index::RangeType RangeType
Definition lindex.h:35
DEFAULT_MEMBERS(LIndex)
IndexId< L > id() const
Definition lindex.cc.h:26
decltype(auto) stepSize(const IndexId< I > &id) const
Definition lindex.cc.h:33
Index::IB IB
Definition lindex.h:34
Index base declaration.
decltype(auto) xpr(const Sptr< I > &i)
std::integral_constant< SizeT, N > CSizeT
Definition types.h:81
Sptr< Range > rangeCast(const RangePtr r)
decltype(auto) lindexPtr(const Sptr< Index > &i)
Definition lindex.cc.h:62
std::shared_ptr< T > Sptr
Definition types.h:48
RangeBase declaration.
static constexpr bool value
static constexpr bool value
Xpression main header.