TODO 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 [2/11]
  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. - [ ] 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. - [ ] Small/Big unification
  18. - [X] size_s, rank_s in Ryn:: are broken [ra7]
  19. - [X] broken with -DNDEBUG (95ac2014bfd86cbc27e3d151f55abaceef628de4 and by <2023-05-26 Fri 15:08> in CI)
  20. - [ ] ambiguity / bad init in nested constructors [ra45]
  21. - [ ] subscripting inconsistencies; for example, if `A` is rank>1 and `i` is
  22. rank 1, then `A(i)` will return a nested expression instead of preserving
  23. `A`'s rank.
  24. - [ ] beatable subscripts are not beaten if mixed with non-beatable
  25. subscripts. E.g. in A(vector, iota, vector) the iota isn't beaten.
  26. - [ ] be namespace clean except for possibly complex.hh.
  27. - [ ] make iter work with w/rank.
  28. - [ ] make iter work with foreign vectors.
  29. - [-] Features [1/8]
  30. - [ ] Merge Ptr and Iota. We should only need one rank 1 IteratorConcept adaptor.
  31. - [-] Deduction guides, e.g. ra::Small a = {{1, 2}, {3, 4}} ?! maybe rank 1 first
  32. - [X] rank 1 SmallArray <2023-06-23 Fri 13:24> (not very useful)
  33. - [ ] rank >1 SmallArray
  34. - [ ] Small
  35. - [ ] Big
  36. - [ ] Should be able to reshape iota (??) or show examples with TensorIndex,
  37. maybe. One idea is to generalize View (so View<Iota>, etc.) which is
  38. something that newra does. But as long as Container is parent of View,
  39. conversion of (Container const &) into (View const &) forces us to have
  40. const/nonconst overloads in View (instead of just relying on the constness
  41. of (View::p). This is just a mess when View::p isn't a pointer.
  42. - [ ] Fix relationship between Container and View [0/5]
  43. - [ ] forward const/nonconst overloads to View or ViewConst from here.
  44. - [ ] remove inheritance relationship of Container on View
  45. - [ ] add const/nonconst casts of Container to View or ViewConst
  46. - [ ] remove const overloads from View::operator()
  47. - [ ] make View be View<pointer> and not View<value_type>
  48. - [ ] Should be able to turn ravel iterators (e.g. View::begin()) into array
  49. iterators. Ptr() doesn't work for that. Or to obtain STLIterator from any
  50. array iterator. That may come of merging STLIterator with
  51. ply_index/ply_ravel.
  52. - [ ] gemv(conj(a), b) should work. Beat View-like selectors down an Expr??
  53. - [ ] port some of the View ops to generic Iterator. reverse,
  54. transpose, etc. seem easy enough. Only it kind of bothers me that they
  55. need their own Expr-like types while on Views it's just a one time
  56. op. Propagating ops down Expr into leaf Views (a kind of beating) would be
  57. better.
  58. - [X] Support operator <=> <2020-09-15 Tue 13:50>
  59. - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96278 is annoying
  60. - [-] Magic subscript len
  61. - [X] For Big/View in beatable subscripts <2023-07-04 Tue 18:20>
  62. - [X] For Big/View in unbeatable subscripts <2023-07-05 Wed 12:34>
  63. - [ ] For Small/SmallView
  64. - [ ] Optimize iota(len...) + iota(len...)
  65. - [ ] Performance [0/1]
  66. - [ ] bench/bench-stencil* is weird.
  67. - [X] Error report, debugging [3/3]
  68. - [X] Optionally throw instead of abort on bounds checks, etc. cf. test/ra-12.cc
  69. * This was fixed between v8 and v10, see examples/throw.cc.
  70. - [X] Static check on Small constructors e.g. real3 {1, 2, 3}. Cf big.hh:513 init<SS>(SS const & s).
  71. - [X] for Container constructors
  72. - [X] for Small constructors
  73. - [X] General static check on prefix matching <2019-02-06 Wed 12:06>
  74. - [-] Building, tests [3/6]
  75. - [X] Build docs with cmake
  76. - [X] Support RA_USE_BLAS with cmake (linux)
  77. - [X] Support RA_USE_BLAS with cmake (mac) <2018-12-07 Fri 16:33>
  78. - [ ] Make cmake tests respect dependences and able to be run independently.
  79. - [ ] Test for expected compilation errors (static_assert, etc) [ra42].
  80. - [ ] TestRecorder.test_eq with mismatched shapes aborts. Should just fail the test.
  81. - [ ] Documentation [0/3]
  82. - [ ] Complete section on internals
  83. - [ ] Complete section on other languages, libraries
  84. - [ ] Describe xreferenced issues in doc ([raxx], etc.)
  85. - [ ] Other [0/2]
  86. - [ ] Review Container constructors. Why do we need (&) when we have (const &)?
  87. - [ ] Support tuple as a kind of foreign vector
  88. - [ ] Iterator type for tuple (like Vector for std::vector).
  89. - [ ] Appropriate ply. Possibly restrict it to rank 1.
  90. 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.
  91. * Numbered issues throughout the source [ra...]
  92. 1. [ ]
  93. 2. [ ] test/compatibility.cc, ra/atom.hh, ra/bootstrap.hh
  94. ra::vector(rank 1 builtin array) should be the same as ra::start(), that is static sizes shouldn't be lost.
  95. 3. [ ]
  96. 4. [ ] test/optimize.cc
  97. 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.
  98. 5. [ ]
  99. 6. [ ]
  100. 7. [ ]
  101. 8. [ ] test/operators.cc
  102. Some simple expressions with scalars fail in *FLAT(). The patch in operators.hh triggers the address sanitizer in test/ra-9.cc.
  103. 9. [ ] test/ra-6.cc
  104. ra::Ptr doesn't hold copies. This enables restarting (see [ra39]), so ra::vector(temp) must only be used as temp. Really forbidding auto ll = ra::vector(lvalue) would also be ok.
  105. 10. [ ] test/ra-0.cc
  106. size(SmallArray) requires ra:: to avoid collision with std::size, but not size(Big) (??).
  107. 11. [ ]
  108. 12. [ ]
  109. 13. [ ] ra/io.hh, ra/atom.hh, ra/bootstrap.hh, test/compatibility.cc.
  110. 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 or not.
  111. 14. [ ] CellBig needs to copy its Dimv in some cases, which also complicates View::iter<>. Problem is demonstrated in ra-5.cc.
  112. 15. [ ] Conversion-to-scalar operators for dynamic-rank View().
  113. 16. [ ]
  114. 17. [ ]
  115. 18. [ ]
  116. 19. [ ]
  117. 20. [ ]
  118. 21. [ ]
  119. 22. [ ]
  120. 23. [ ]
  121. 24. [ ]
  122. 25. [ ]
  123. 26. [ ]
  124. 27. [ ]
  125. 28. [ ]
  126. 29. [ ]
  127. 30. [ ]
  128. 31. [ ]
  129. 32. [ ]
  130. 33. [ ]
  131. 34. [ ]
  132. 35. [ ]
  133. 36. [ ]
  134. 37. [ ]
  135. 38. [ ]
  136. 39. [ ] test/ra-7.cc
  137. 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*.
  138. 40. [ ]
  139. 41. [ ]
  140. 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.
  141. 43. [ ] bench/bench-dot.cc
  142. The performace of f_small_op depends on the optimization in plyf() through ocd<>(). Doing this required having static and non-static versions of Iterator::keep_step in Match/Expr. Possibly the same could be done to reduce rank/rank_s, size/size_s to just rank/size, and check for static-ness instead of RANK_ANY/DIM_ANY.
  143. 44. [ ]
  144. 45. [ ]
  145. 46. [ ]
  146. 47. [ ] ra/big.hh, test/const.cc, ra/view-ops.hh ...
  147. Review constness in ra/view-ops.hh after the Big/View const fixes after 913d6b531801609cb61bb7f631ddf50de701a802.