Issue 18575: Sort function (vsiplxx-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: I don't think that Sort is defined the best way in VSIPL. Why spec doesn't define create function? Such function will let user to allocate additional memory which are required by some sorting methods. Why not to define out-of-place sort? If I work on 64-bit system, sort array of 32-bit FP values and need index vector, I'll get 64-bit indices which are not supposed to be that long. This is because last argument of sort function is const vsip_vview_vi *index and _vi means (unsigned long int) i.e. 64-bit elements. In the sort I implemented for AVX I permute data in vector registers and apply same permute to the indices which occupy other vector register. It's OK if function has to produce 32-bit indices, but it will be wrong when I have to shuffle 64-bit values. This last comment is applicable to other functions as well - index vector on 64-bit systems doesn't have to be 64-bit value because data arrays today are not huge yet. Resolution: In the interest of closing the current RTF so that the solutions to resolved issues can be made publically available, this issue is deferred to the next RTF. Disposition: Deferred Revised Text: Actions taken: March 25, 2013: received issue Discussion: End of Annotations:===== te: Mon, 25 Mar 2013 08:49:54 -0400 (EDT) Subject: [Fwd: Sort function] From: "Joe Harth" To: juergen@omg.org User-Agent: SquirrelMail/1.4.11 X-Virus-Scanned: amavisd-new at omg.org ---------------------------- Original Message ---------------------------- Subject: Sort function From: "Kotlov, Valeri (GE Intelligent Platforms, US)" Date: Fri, March 22, 2013 4:24 pm To: "info@omg.org" -------------------------------------------------------------------------- Hello, I don't think that Sort is defined the best way in VSIPL. Why spec doesn't define create function? Such function will let user to allocate additional memory which are required by some sorting methods. Why not to define out-of-place sort? If I work on 64-bit system, sort array of 32-bit FP values and need index vector, I'll get 64-bit indices which are not supposed to be that long. This is because last argument of sort function is const vsip_vview_vi *index and _vi means (unsigned long int) i.e. 64-bit elements. In the sort I implemented for AVX I permute data in vector registers and apply same permute to the indices which occupy other vector register. It's OK if function has to produce 32-bit indices, but it will be wrong when I have to shuffle 64-bit values. This last comment is applicable to other functions as well - index vector on 64-bit systems doesn't have to be 64-bit value because data arrays today are not huge yet. Regards, Valeri Kotlov. Joe Harth Systems Administrator Object Management Group 109 Highland Ave Needham, MA 02494 USA tel: +1 781 444 0404 x 121 fax: +1 781 444 0320 cell: +1 617 416 5352 email: joe@omg.org http://www.omg.org untitled-[2].htm untitled-[2].htm