CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
src
include
ranges
crange.cc.h
Go to the documentation of this file.
1
// -*- C++ -*-
12
#ifndef __cxz_crange_cc_h__
13
#define __cxz_crange_cc_h__
14
15
#include "
crange.h
"
16
#include "
index_mul.h
"
17
18
namespace
CNORXZ
19
{
20
template
<SizeT I>
21
decltype
(
auto
)
CIndex::stepSize
(
const
IndexId<I>
&
id
)
const
22
{
23
if
constexpr
(I != 0){
24
return
SPos<0>
();
25
}
26
else
{
27
return
UPos
(
id
== this->
id
() ? 1 : 0);
28
}
29
}
30
31
template
<
class
Xpr,
class
F>
32
decltype
(
auto
)
CIndex::ifor
(
const
Xpr&
xpr
,
F
&&
f
)
const
33
{
34
return
For<0,Xpr,F>
(this->pmax().val(), this->
id
(), xpr, std::forward<F>(
f
));
35
}
36
37
template
<
class
I>
38
decltype
(
auto
)
operator
*(
const
Sptr<CIndex>
& a,
const
Sptr<I>
&
b
)
39
{
40
return
iptrMul
(a,
b
);
41
}
42
}
43
44
#endif
CNORXZ::CIndex::ifor
decltype(auto) ifor(const Xpr &xpr, F &&f) const
Definition
crange.cc.h:32
CNORXZ::CIndex::stepSize
decltype(auto) stepSize(const IndexId< I > &id) const
Definition
crange.cc.h:21
CNORXZ::IndexId
Definition
index_id.h:23
CNORXZ::UPos
Definition
pos_type.h:55
crange.h
CRange and CIndex declaration.
index_mul.h
Index multiplication.
CNORXZ
Definition
aindex.cc.h:18
CNORXZ::xpr
decltype(auto) xpr(const Sptr< I > &i)
Definition
index_base.cc.h:152
CNORXZ::rangeCast
Sptr< Range > rangeCast(const RangePtr r)
Definition
range_base.cc.h:53
CNORXZ::iptrMul
decltype(auto) iptrMul(const Sptr< I1 > &a, const Sptr< I2 > &b)
Definition
index_mul.cc.h:129
CNORXZ::Sptr
std::shared_ptr< T > Sptr
Definition
types.h:48
Generated by
1.10.0