TODO 7.8 KB

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