TODO 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. RA -*- mode: org; -*-
  2. help: [C-uc .] insert timestamp [C-cc] flip checkbox [C-uucc] partial flip [M-RET] continue list
  3. checkbox [C-ct] flip TODO
  4. #+STARTUP: logdone
  5. * TODO [1/7]
  6. - [-] Bugs [3/12]
  7. - [ ] const issues in View vs Container
  8. - [ ] fix conversion to const op in View, or
  9. - [ ] fix view() members in Container not to depend on conversion to const op in view (make View a member union??)
  10. - [ ] fix SmallView/SmallArray after the same pattern
  11. - [ ] fix RA_DEF_ASSIGNOPS return type and reuse that and RA_DEF_ASSIGNOPS_SELF in View
  12. - [X] ra::Small<real, 3, 3, 3>() benchmark in bench-dot.cc has op 10x worse
  13. than indexed
  14. - Fixed in ca20c1678bb7aa43ccf6b4fe1b93ee9c742b1630. Yay!
  15. - Appears to have regressed in 65076211eeeeecd8623877e3e3b5cc0a87af302c, although by a smaller factor. Bummer.
  16. - Looks good in v20 in g++-11, but bad in 12/13. Bummer.
  17. - Investigated & resolved in e297ee0561a647065fb5b92880fe0f994340595c ss.
  18. - [ ] Small/Big unification
  19. - [X] size_s, rank_s in Ryn:: are broken [ra7]
  20. - [X] broken with -DNDEBUG (95ac2014bfd86cbc27e3d151f55abaceef628de4 and by <2023-05-26 Fri 15:08> in CI)
  21. - [ ] ambiguity / bad init in nested constructors [ra45]
  22. - [ ] ra::at(A, I) needs nested I, so the obvious ra::at(A, [i j]) doesn't
  23. work (although view.at([i j]) does). But I would get rid of view.at(i) if
  24. ra::at(view, i) worked the same way.
  25. - [ ] subscripting inconsistencies; for example, if `A` is rank>1 and `i` is
  26. rank 1, then `A(i)` will return a nested expression instead of preserving
  27. `A`'s rank.
  28. - [ ] beatable subscripts are not beaten if mixed with non-beatable subscripts. E.g. in
  29. A(vector, iota, vector) the iota isn't beaten. (This is related to 'subscripting
  30. inconsistencies' above).
  31. - [ ] be namespace clean except for possibly complex.hh.
  32. - [ ] make iter work with w/rank.
  33. - [ ] make iter work with foreign vectors.
  34. - [-] Features [1/10]
  35. - [ ] Can choose iteration order in plyers. Order is already explicit, just need to expose it.
  36. - [ ] Merge Ptr and Iota. Why need more than one rank 1 IteratorConcept adaptor.
  37. - [-] Deduction guides, e.g. ra::Small a = {{1, 2}, {3, 4}} ?! maybe rank 1 first
  38. - [X] rank 1 SmallArray <2023-06-23 Fri 13:24> (not very useful)
  39. - [ ] rank >1 SmallArray
  40. - [ ] Small
  41. - [ ] Big
  42. - [ ] Support ra::len in x in o.len(x).
  43. - [ ] Should be able to reshape iota (??). One idea is to generalize View
  44. (so View<Iota>, etc.) which is something that newra does. But as long as
  45. Container is parent of View, conversion of (Container const &) into (View
  46. const &) forces us to have const/nonconst overloads in View (instead of
  47. just relying on the constness of (View::p). This is just a mess when
  48. View::p isn't a pointer.
  49. - [ ] Fix relationship between Container and View [0/5]
  50. - [ ] forward const/nonconst overloads to View or ViewConst from here.
  51. - [ ] remove inheritance relationship of Container on View
  52. - [ ] add const/nonconst casts of Container to View or ViewConst
  53. - [ ] remove const overloads from View::operator()
  54. - [ ] make View be View<pointer> and not View<value_type>
  55. - [ ] Should be able to turn ravel iterators (e.g. View::begin()) into array
  56. iterators. Ptr() doesn't work for that. Or to obtain STLIterator from any
  57. array iterator. That may come of merging STLIterator with plyers.
  58. - [ ] gemv(conj(a), b) should work. Beat View-like selectors down an Expr??
  59. - [ ] port some of the View ops to generic Iterator. reverse,
  60. transpose, etc. seem easy enough. Only it kind of bothers me that they
  61. need their own Expr-like types while on Views it's just a one time
  62. op. Propagating ops down Expr into leaf Views (a kind of beating) would be
  63. better.
  64. - [X] Support operator <=> <2020-09-15 Tue 13:50>
  65. - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96278 is annoying
  66. - [-] Magic subscript len
  67. - [X] For Big/View in beatable subscripts <2023-07-04 Tue 18:20>
  68. - [X] For Big/View in unbeatable subscripts <2023-07-05 Wed 12:34>
  69. - [-] For Small/SmallView
  70. - [X] Scalar / unbeatable <2023-08-04 Fri 14:18>
  71. - [ ] Iota. But Iota args need to integral constants for this to work.
  72. - [ ] Optimize iota(len...) + iota(len...)
  73. - [ ] Performance [0/1]
  74. - [ ] bench/bench-stencil* is weird.
  75. - [ ] Bigd cases in bench-at.
  76. - [X] Error report, debugging [3/3]
  77. - [X] Optionally throw instead of abort on bounds checks, etc. cf. test/ra-12.cc
  78. * This was fixed between v8 and v10, see examples/throw.cc.
  79. - [X] Static check on Small constructors e.g. real3 {1, 2, 3}. Cf big.hh:513 init<SS>(SS const & s).
  80. - [X] for Container constructors
  81. - [X] for Small constructors
  82. - [X] General static check on prefix matching <2019-02-06 Wed 12:06>
  83. - [-] Building, tests [4/6]
  84. - [X] Build docs with cmake
  85. - [X] Support RA_USE_BLAS with cmake (linux)
  86. - [X] Support RA_USE_BLAS with cmake (mac) <2018-12-07 Fri 16:33>
  87. - [X] TestRecorder.test_eq with mismatched shapes aborts. Should just fail the test. <2023-07-10 Mon 13:14>
  88. - We have had agree() for a while.
  89. - [ ] Make cmake tests respect dependences and able to be run independently.
  90. - [ ] Test for expected compilation errors (static_assert, etc) [ra42].
  91. - One idea (libc++?) is to fork() and check that child breaks.
  92. - [ ] Documentation [0/3]
  93. - [ ] Complete section on internals
  94. - [ ] Complete section on other languages, libraries
  95. - [ ] Describe xreferenced issues in doc ([raxx], etc.)
  96. - [ ] Other [0/3]
  97. - [ ] Reconsider len/len_s etc.
  98. Same as there are static/nonstatic versions of keep_step, we could remove len_s/rank_s use staticness of len/rank instead of ANY/ANY. A problem with this is that len_s lets me return ANY for some axes and finite for others and to do that with just len() would require len(integral constant) overloads possibly -- len(int k) cannot be static or not depending on k.
  99. - [ ] Review Container constructors. Why do we need (&) when we have (const &)?
  100. - [ ] Support tuple as a kind of foreign vector
  101. - [ ] Iterator type for tuple (like Vector for std::vector).
  102. - [ ] Appropriate ply. Possibly restrict it to rank 1.
  103. Will stop reusing issue numbers so I can keep the record. Some of these aren't bugs in the sense that I expect to solve them, but more like footnotes.
  104. * Numbered issues throughout the source [ra...]
  105. 1. [ ]
  106. 2. [ ]
  107. 3. [ ]
  108. 4. [ ] test/optimize.cc
  109. Expression objects only keep pointers to data objects. This means that it is unsafe to define expression objects unless none of the data objects are temporaries. E.g. `auto e = temp + temp;` is unsafe. Either `obj a; obj b; auto e = a + b;` or `obj o = temp + temp;` is safe. Generally there's no reason to ever define expression objects explicitly.
  110. 5. [ ]
  111. 6. [ ]
  112. 7. [ ]
  113. 8. [ ] test/operators.cc
  114. Some simple expressions with scalars fail in *FLAT(). The patch in ra.hh triggers the address sanitizer in test/ra-9.cc.
  115. 9. [ ] test/ra-6.cc
  116. ra::Ptr doesn't hold copies. This enables restarting (see [ra39]), so ra::ptr(temp) must only be used as temp. Really forbidding auto ll = ra::ptr(lvalue) would also be ok.
  117. 10. [ ] test/ra-0.cc
  118. size(SmallArray) requires ra:: to avoid collision with std::size, but not size(Big) (??).
  119. 11. [ ]
  120. 12. [ ]
  121. 13. [ ] ra/ply.hh (i/o), ra/atom.hh, ra/bootstrap.hh, test/compatibility.cc.
  122. std::string used to be registered as scalar, but that clashes with how std::ranges sees it. OTOH we don't want format(std::string_view) to print it as a foreign vector, so we have an exception for it there. As things stand, you can register it as scalar or not.
  123. 14. [ ] CellBig needs to copy its Dimv in some cases, which also complicates View::iter<>. Problem is demonstrated in ra-5.cc.
  124. 15. [ ] Conversion-to-scalar operators for dynamic-rank View().
  125. 16. [ ] Ambiguity in ravel vs nested constructors bc bc 1 converts to int2. Should be explicit (and ravel constructors also).
  126. 17. [ ] We would like for View::end() to be a free op, until it does we have to do extra checks in STLIterator and init Dim.
  127. 18. [ ]
  128. 19. [ ]
  129. 20. [ ]
  130. 21. [ ]
  131. 22. [ ]
  132. 23. [ ]
  133. 24. [ ]
  134. 25. [ ]
  135. 26. [ ]
  136. 27. [ ]
  137. 28. [ ]
  138. 29. [ ]
  139. 30. [ ]
  140. 31. [ ]
  141. 32. [ ]
  142. 33. [ ] test/frame-old.cc, test/fromb.cc.
  143. When mixing beaten & unbeaten subscripts and the unbeaten subscripts go first, the result is a nested expression. This has to be fixed in the view operator()s.
  144. 34. [ ]
  145. 35. [ ]
  146. 36. [ ]
  147. 37. [ ]
  148. 38. [ ]
  149. 39. [ ] test/ra-7.cc
  150. There's no reason to restart, since the Iterator methods are all static. So start(ra::Scalar) just forwards. But that means that Scalar::c maintain constness, so a const overload is required for ScalarFlat::operator*.
  151. 40. [ ]
  152. 41. [ ]
  153. 42. [ ] Ways to test that compile time assertions or constraints are triggered appropriately, esp. for things like ct array lookup. Some are doable with concepts, see e.g. ra-14.cc or big-0.cc.
  154. 43. [ ]
  155. 44. [ ]
  156. 45. [ ]
  157. 46. [ ]
  158. 47. [ ] ra/big.hh, test/const.cc, ra/view-ops.hh ...
  159. Review constness in ra/view-ops.hh after the Big/View const fixes after 913d6b531801609cb61bb7f631ddf50de701a802.