digitalmars.D.bugs - [Issue 12861] New: std.algorithm.sort of core.simd.int4[] too
- via Digitalmars-d-bugs (104/104) Jun 05 2014 https://issues.dlang.org/show_bug.cgi?id=12861
https://issues.dlang.org/show_bug.cgi?id=12861 Issue ID: 12861 Summary: std.algorithm.sort of core.simd.int4[] too Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: bearophile_hugs eml.cc void main() { import core.simd: int4; import std.algorithm: sort, SwapStrategy; int4[] data = [[1, 2, 3, 4], [10, 20, 30, 40]]; data.sort!q{ a.array < b.array }; data.sort!(q{ a.array < b.array }, SwapStrategy.stable); } DMD 2.066alpha gives: ...\dmd2\src\phobos\std\range.d(2224,36): Error: cannot implicitly convert expression (val) of type int[4] to __vector(int[4]) ...\dmd2\src\phobos\std\range.d(2281,39): Error: cannot implicitly convert expression (val) of type int[4] to __vector(int[4]) ...\dmd2\src\phobos\std\range.d(2308,42): Error: cannot implicitly convert expression (val) of type int[4] to __vector(int[4]) ...\dmd2\src\phobos\std\range.d(8385,33): Error: template instance std.range.stride!(__vector(int[4])[]) error instantiating ...\dmd2\src\phobos\std\algorithm.d(9364,1): instantiated from here: SortedRange!(__vector(int[4])[], " a.array < b.array ") test2.d(5,9): instantiated from here: sort!(" a.array < b.array ", cast(SwapStrategy)0, __vector(int[4])[]) ...\dmd2\src\phobos\std\algorithm.d(9395,29): Error: template instance std.range.assumeSorted!(" a.array < b.array ", __vector(int[4])[]) error instantiating test2.d(5,9): instantiated from here: sort!(" a.array < b.array ", cast(SwapStrategy)0, __vector(int[4])[]) ...\dmd2\src\phobos\std\range.d(7793,17): Error: cannot implicitly convert expression (r[i]) of type __vector(int[4]) to int[4] ...\dmd2\src\phobos\std\algorithm.d(10004,28): Error: template instance std.range.moveAt!(__vector(int[4])[], uint) error instantiating ...\dmd2\src\phobos\std\algorithm.d(9386,13): instantiated from here: TimSortImpl!(binaryFun, __vector(int[4])[]) test2.d(6,9): instantiated from here: sort!(" a.array < b.array ", cast(SwapStrategy)2, __vector(int[4])[]) ...\dmd2\src\phobos\std\algorithm.d(10020,32): Error: cannot implicitly convert expression (move(item)) of type int[4] to __vector(int[4]) ...\dmd2\src\phobos\std\algorithm.d(9982,22): Error: function std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).lessEqual (int[4] a, int[4] b) is not callable using argument types (__vector(int[4]), __vector(int[4])) ...\dmd2\src\phobos\std\algorithm.d(9984,49): Error: function std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).lessEqual (int[4] a, int[4] b) is not callable using argument types (__vector(int[4]), __vector(int[4])) ...\dmd2\src\phobos\std\algorithm.d(9988,47): Error: function std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).greater (int[4] a, int[4] b) is not callable using argument types (__vector(int[4]), __vector(int[4])) ...\dmd2\src\phobos\std\algorithm.d(10061,52): Error: template std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).gallopSearch!(false, true).gallopSearch cannot deduce function from argument types !()(__vector(int[4])[], __vector(int[4])), candidates are: ...\dmd2\src\phobos\std\algorithm.d(10288,16): std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).gallopSearch!(false, true).gallopSearch(R)(R range, T value) ...\dmd2\src\phobos\std\algorithm.d(10062,52): Error: template std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).gallopSearch!(true, false).gallopSearch cannot deduce function from argument types !()(__vector(int[4])[], __vector(int[4])), candidates are: ...\dmd2\src\phobos\std\algorithm.d(10288,16): std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).gallopSearch!(true, false).gallopSearch(R)(R range, T value) ...\dmd2\src\phobos\std\algorithm.d(7824,37): Error: cannot implicitly convert expression (source[idx]) of type __vector(int[4]) to int[] ...\dmd2\src\phobos\std\algorithm.d(10115,13): Error: template instance std.algorithm.copy!(__vector(int[4])[], int[4][]) error instantiating ...\dmd2\src\phobos\std\algorithm.d(9386,13): instantiated from here: TimSortImpl!(binaryFun, __vector(int[4])[]) test2.d(6,9): instantiated from here: sort!(" a.array < b.array ", cast(SwapStrategy)2, __vector(int[4])[]) ...\dmd2\src\phobos\std\algorithm.d(10133,30): Error: function std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).lessEqual (int[4] a, int[4] b) is not callable using argument types (int[4], __vector(int[4])) ...\dmd2\src\phobos\std\algorithm.d(10135,38): Error: cannot implicitly convert expression (temp[lef++]) of type int[4] to __vector(int[4]) ...\dmd2\src\phobos\std\algorithm.d(10152,47): Error: template std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).gallopSearch!(false, true).gallopSearch cannot deduce function from argument types !()(int[4][], __vector(int[4])), candidates are: ...\dmd2\src\phobos\std\algorithm.d(10288,16): std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).gallopSearch!(false, true).gallopSearch(R)(R range, T value) ...\dmd2\src\phobos\std\algorithm.d(10153,62): Error: cannot implicitly convert expression (temp[lef++]) of type int[4] to __vector(int[4]) ...\dmd2\src\phobos\std\algorithm.d(10334,29): Error: function std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).greater (int[4] a, int[4] b) is not callable using argument types (int[4], __vector(int[4])) ...\dmd2\src\phobos\std\algorithm.d(10350,29): Error: function std.algorithm.TimSortImpl!(binaryFun, __vector(int[4])[]).greater (int[4] a, int[4] b) is not callable using argument types (int[4], __vector(int[4])) --
Jun 05 2014