forked from rjhogan/Adept-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
112 lines (90 loc) · 4.29 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
BUGS
spread<DIM> function does not use the right DIM
DESIRABLE BUT NEEDS NEW STACK
Differentiated BLAS operations on symmetric matrices etc
Implement general OpenMP for forward pass
OPTIMIZATION
Vectorize active expressions
Fix vectorization of spread and outer_product by storing pointer to start of row and not using index
Communicate band diagonals statically to optimize Array = band expression (e.g. 2*TridiagMatrix)
Implement active scalar precomputation
Optimize reciprocal to use 1.0 or 1.0f; vectorize
Optimize storage of data range
SquareMatrix::is_vectorizable = true
FEATURES
long double calls double matmul functions?
std::string configuration function returning options for this compilation unit
Mathematical functions copysign, fdim, hypot, remainder?
Implement user elemental function
Implement user choice of Jacobian array ordering
Clean-up benchmark and test_arrays/test_array_speed code
Check can do Array<*,Active<Real>,false>
Rename ExpressionSize
Enable functions taking ExpressionSize arguments (e.g. resize and array constructor) to take equivalent arguments, e.g. std::vector, initializer lists etc
Fall-back if BLAS not available
Implement pow<int> and sqr
Implement non-member functions merge?, reshape, shape?, size, [un]pack(?), minloc, maxloc
Implement matlab-like tile (generic repmat) plus zeros and ones
Implement iterators
Triangular/symmetric views
Const link does not increment reference counter
Cannot link non-const to const either by construction or explicit link
Should reduce functions take dimensions as template arguments?
reduce operations have a template version with the reduce dimension provided statically
differentiate complex number operations
matmul and solve on complex numbers
complex functions arg, abs, real, imag etc
CHECK
Check Square matmul
All vectorization combinations work, e.g. double/int, aligned/unaligned LHS
Set whole arrays as independent/dependent
Reduce RMS difference in Toon case
CLEAN
References to OpenMP for array operations - remove?
DOCUMENTATION
Document diag_vector non-member function (in reduce.h) and test in test_arrays
OLDER IDEAS
Clarify vector orientation when in matrix multiplication
Vector orientation changed with row(), col()?
Implement move semantics and make copy constructors do deep copy ADEPT_***
Implement OpenMP passive array operations
Implement OpenMP active array operations
Link can only be performed on empty object
If new Expression types are to be added, they should provide the
following interface:
static const int rank_ = 0;
static const int n_scratch_ = 0;
static const int n_active_ = 0;
static const int n_arrays_ = 0;
static const bool is_active_ = false;
static const bool is_vectorizable_ = true;
bool get_dimensions_(ExpressionSize<0>& dim) const;
std::string expression_string_() const;
bool is_aliased_(const Type* mem1, const Type* mem2) const;
Type value_with_len_(const Index& j, const Index& len) const;
template <int MyArrayNum, int NArrays>
void advance_location_(ExpressionSize<NArrays>& loc) const;
template <int MyArrayNum, int NArrays>
Type value_at_location_(const ExpressionSize<NArrays>& loc) const;
template <int MyArrayNum, int NArrays>
Packet<Type>
packet_at_location_(const ExpressionSize<NArrays>& loc) const;
template <int MyArrayNum, int MyScratchNum, int NArrays, int NScratch>
Type value_at_location_store_(const ExpressionSize<NArrays>& loc,
ScratchVector<NScratch>& scratch) const;
template <int MyArrayNum, int MyScratchNum, int NArrays, int NScratch>
Type value_stored_(const ExpressionSize<NArrays>& loc,
const ScratchVector<NScratch>& scratch) const;
template <int MyArrayNum, int MyScratchNum, int NArrays, int NScratch>
void calc_gradient_(Stack& stack,
const ExpressionSize<NArrays>& loc,
const ScratchVector<NScratch>& scratch) const;
template <int MyArrayNum, int MyScratchNum,
int NArrays, int NScratch, typename MyType>
void calc_gradient_(Stack& stack,
const ExpressionSize<NArrays>& loc,
const ScratchVector<NScratch>& scratch,
const MyType& multiplier) const;
template <int MyArrayNum, int Rank, int NArrays>
void set_location_(const ExpressionSize<Rank>& i,
ExpressionSize<NArrays>& index) const;