clpy icon indicating copy to clipboard operation
clpy copied to clipboard

Pass clpy_tests/sorting_tests/test_sort.py

Open ghost opened this issue 6 years ago • 5 comments

We should support, remove, or fix clpy_tests/sorting_tests/test_sort.py https://github.com/fixstars/clpy/blob/clpy/tests/clpy_tests/sorting_tests/test_sort.py

ghost avatar Sep 04 '18 06:09 ghost

  • clpy.core.core.ndarray.argsort
  • clpy.core.core.ndarray.sort
  • AttributeError: module 'clpy' has no attribute 'partition'
  • AttributeError: module 'clpy' has no attribute 'argpartition'
  • AttributeError: module 'clpy' has no attribute 'msort'

nsakabe-fixstars avatar Sep 20 '18 02:09 nsakabe-fixstars

We need to substitute thrust with something.

nsakabe-fixstars avatar Sep 20 '18 03:09 nsakabe-fixstars

バイトニックソートを使うなら:

  • 要素数をたしかめて2ベキじゃないなら
    • 2ベキまでバッファを拡張(というか移動/コピー)
    • 要素の型に応じたパディング値をつめる
    • ソート
    • パディング部分を捨てて返す

大変めんどいですね… thrust はどうしているんだろう

nsakabe-fixstars avatar Sep 20 '18 07:09 nsakabe-fixstars

I implemented a simple example of in-workgroup bitonic sort and merging, and going to integrate it into clpy.

nsakabe-fixstars avatar Mar 12 '19 10:03 nsakabe-fixstars

  • [x] sort
  • [ ] argsort
  • [ ] lexsort
  • [ ] partition
  • [ ] argpartition

nsakabe-fixstars avatar Mar 20 '19 09:03 nsakabe-fixstars