TODO 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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/6]
  6. - [-] Bugs [2/9]
  7. - [ ] ra::Small<real, 3, 3, 3>() benchmark in bench-dot.cc has op 10x worse
  8. than indexed
  9. - Fixed in ca20c1678bb7aa43ccf6b4fe1b93ee9c742b1630. Yay!
  10. - Appears to have regressed in 65076211eeeeecd8623877e3e3b5cc0a87af302c, although by a smaller factor. Bummer.
  11. - [X] size_s, rank_s in Ryn:: are broken [ra07]
  12. - [ ] broken with -DNDEBUG
  13. - [ ] ambiguity / bad init in nested constructors [ra45]
  14. - [ ] subscripting inconsistencies; for example, if `A` is rank>1 and `i` is
  15. rank 1, then `A(i)` will return a nested expression instead of preserving
  16. `A`'s rank.
  17. - [ ] beatable subscripts are not beaten if mixed with non-beatable
  18. subscripts. E.g. in A(vector, iota, vector) the iota isn't beaten.
  19. - [ ] be namespace clean except for possibly real.hh, complex.hh.
  20. - [ ] make iter work with w/rank.
  21. - [ ] make iter work with foreign vectors.
  22. - [-] Features [1/7]
  23. - [ ] Iota is both vector-like object and iterator. Split into two types?
  24. - [ ] Deduction guides, e.g. ra::small a = {{1, 2}, {3, 4}} ?! maybe rank 1 first
  25. - [ ] View::p is not const because it's used as sliding window (cell_iterator_big). Split into two types?
  26. - [ ] Should be able to reshape iota (??) or show examples with TensorIndex,
  27. maybe. One idea is to generalize View (so View<Iota>, etc.) which is
  28. something that newra does. But as long as Container is parent of View,
  29. conversion of (Container const &) into (View const &) forces us to have
  30. const/nonconst overloads in View (instead of just relying on the constness
  31. of (View::p). This is just a mess when View::p isn't a pointer.
  32. - [ ] Fix relationship between Container and View [0/5]
  33. - [ ] forward const/nonconst overloads to View or ViewConst from here.
  34. - [ ] remove inheritance relationship of Container on View
  35. - [ ] add const/nonconst casts of Container to View or ViewConst
  36. - [ ] remove const overloads from View::operator()
  37. - [ ] make View be View<pointer> and not View<value_type>
  38. - [ ] Should be able to turn ravel iterators (e.g. View::begin()) into array
  39. iterators. Ptr() doesn't work for that. Or to obtain STLIterator from any
  40. array iterator. That may come of merging STLIterator with
  41. ply_index/ply_ravel.
  42. - [ ] gemv(conj(a), b) should work. Beat View-like selectors down an Expr??
  43. - [ ] port some of the View ops to generic Iterator. reverse,
  44. transpose, etc. seem easy enough. Only it kind of bothers me that they
  45. need their own Expr-like types while on Views it's just a one time
  46. op. Propagating ops down Expr into leaf Views (a kind of beating) would be
  47. better.
  48. - [X] Support operator <=> <2020-09-15 Tue 13:50>
  49. - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96278 is annoying
  50. - [X] Error report, debugging [3/3]
  51. - [X] Optionally throw instead of abort on bounds checks, etc. cf. test/ra-12.cc
  52. * This was fixed between v8 and v10, see examples/throw.cc.
  53. - [X] Static check on Small constructors e.g. real3 {1, 2, 3}. Cf big.hh:513 init<SS>(SS const & s).
  54. - [X] for Container constructors
  55. - [X] for Small constructors
  56. - [X] General static check on prefix matching <2019-02-06 Wed 12:06>
  57. - [-] Building, tests [3/6]
  58. - [X] Build docs with cmake
  59. - [X] Support RA_USE_BLAS with cmake (linux)
  60. - [X] Support RA_USE_BLAS with cmake (mac) <2018-12-07 Fri 16:33>
  61. - [ ] Make cmake tests respect dependences and able to be run independently.
  62. - [ ] Test for expected compilation errors (static_assert, etc) [ra42].
  63. - [ ] TestRecorder.test_eq with mismatched shapes aborts. Should just fail the test.
  64. - [ ] Documentation [0/3]
  65. - [ ] Complete section on internals
  66. - [ ] Complete section on other languages, libraries
  67. - [ ] Describe xreferenced issues in doc ([raxx], etc.)
  68. - [ ] Other [0/2]
  69. - [ ] Review Container constructors. Why do we need (&) when we have (const &)?
  70. - [ ] Support tuple as a kind of foreign vector
  71. - [ ] Iterator type for tuple (like Vector for std::vector).
  72. - [ ] Appropriate ply. Possibly restrict it to rank 1.
  73. 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.
  74. * Numbered issues throughout the source [ra...]
  75. 1. [ ]
  76. 2. [ ] test/compatibility.cc, ra/atom.hh, ra/bootstrap.hh
  77. ra::vector(rank 1 builtin array) should be the same as ra::start(), that is static sizes shouldn't be lost.
  78. 3. [ ]
  79. 4. [ ] test/optimize.cc
  80. 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.
  81. 5. [ ]
  82. 6. [ ]
  83. 7. [ ]
  84. 8. [ ] (free)
  85. 9. [ ] test/ra-6.cc
  86. Using the same lvalue ra::vector multiple times in an expression is broken, since start(ra::Vector) doesn't restart, so they clash with each other in ply. See also [ra39].
  87. The reason start(ra::Vector) doesn't restart is that ra::Vector may contain a copy of v instead of a reference, same as ra::Scalar. But this is problematic since plying modifies the Iterator. So I should split ra::Vector into the Array-like owning object and the Iterator object which is exclusively a temp and can be made to hold a ref.
  88. 10. [ ] test/ra-0.cc
  89. size(SmallArray) requires ra:: to avoid collision with std::size, but not size(Big) (??).
  90. 11. [ ]
  91. 12. [ ]
  92. 13. [ ] ra/io.hh, ra/atom.hh, ra/bootstrap.hh, test/compatibility.cc.
  93. 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.
  94. 14. [ ]
  95. 15. [ ]
  96. 16. [ ]
  97. 17. [ ]
  98. 18. [ ]
  99. 19. [ ]
  100. 20. [ ]
  101. 21. [ ]
  102. 22. [ ]
  103. 23. [ ]
  104. 24. [ ]
  105. 25. [ ]
  106. 26. [ ]
  107. 27. [ ]
  108. 28. [ ]
  109. 29. [ ]
  110. 30. [ ]
  111. 31. [ ]
  112. 32. [ ]
  113. 33. [ ]
  114. 34. [ ]
  115. 35. [ ]
  116. 36. [ ]
  117. 37. [ ]
  118. 38. [ ]
  119. 39. [ ] test/ra-7.cc
  120. 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*.
  121. 40. [ ]
  122. 41. [ ]
  123. 42. [ ] no current test
  124. A way to test that compilation assertions are triggered appropriately, esp. for things like ct array lookup et
  125. 43. [ ] bench/bench-dot.cc
  126. 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.
  127. 44. [ ]
  128. 45. [ ]
  129. 46. [ ]
  130. 47. [ ] ra/big.hh, test/const.cc, ra/view-ops.hh ...
  131. FIXME
  132. Following the behavior of View::operator(), View::data() should const_cast, but that breaks many View operations. E.g. explode() takes View & const and that means it could only return View<super_t const>. This is clearly broken and a motivation for the viewp branch.