-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add two futures for issues I encountered with arrays of ranges
One was while trying to sort the array, the other was trying to use it in a zippered context ---- Signed-off-by: Lydia Duncan <[email protected]>
- Loading branch information
1 parent
49651a3
commit 8904086
Showing
9 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: In function 'compareByPart': | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: error: illegal tuple variable declaration with non-tuple initializer | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as compareByPart(a: range(int(64),both,one), b: range(int(64),both,one), comparator: defaultComparator) | ||
within internal functions (use --print-callstack-on-error to see) | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as shellSortMoveElts(Data: [domain(1,int(64),one)] range(int(64),both,one), comparator: defaultComparator, start: int(64), end: int(64)) from function 'msbRadixSort' | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as msbRadixSort(A: [domain(1,int(64),one)] range(int(64),both,one), start_n: int(64), end_n: int(64), criterion: defaultComparator, startbit: int(64), endbit: int(64), settings: MSBRadixSortSettings(5,false,false)) from function 'msbRadixSort' | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as msbRadixSort(Data: [domain(1,int(64),one)] range(int(64),both,one), comparator: defaultComparator, region: range(int(64),both,one)) from function 'unstableSort' | ||
$CHPL_HOME/modules/standard/Sort.chpl:nnnn: called as unstableSort(x: [domain(1,int(64),one)] range(int(64),both,one), comparator: defaultComparator, region: range(int(64),both,one)) from function 'sort' | ||
arrayOfRanges.chpl:8: called as sort(x: [domain(1,int(64),one)] range(int(64),both,one), comparator: defaultComparator, param stable = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Motivated by wanting to sort the ranges returned by the range leader iterator | ||
use Sort; | ||
|
||
var arr: [0..4] range = [1..2, 3..4, 6..7, 5..5, -1..0]; | ||
|
||
writeln(arr); | ||
|
||
sort(arr); | ||
|
||
writeln(arr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
unimplemented feature: sorting arrays of ranges | ||
#26616 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-1..0 1..2 3..4 5..5 6..7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
$CHPL_HOME/util/test/prediff-obscure-module-linenos $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
arrayOfRanges.chpl:10: error: Heterogeneous tuples don't support this style of loop yet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Motivated by getting the subranges from the range leader iterator | ||
var arr: [0..4] range = [1..2, 3..4, 6..7, 5..5, -1..0]; | ||
|
||
writeln(arr); | ||
|
||
var arr2: [arr.domain] int; | ||
|
||
// I wanted to store the size of each of the ranges into a separate array, but | ||
// writing it like this didn't work. | ||
forall (i, r) in (arr.domain, arr) { | ||
arr2[i] = r.size; | ||
} | ||
/* Had to use this instead: | ||
for i in arr.domain { | ||
arr2[i] = arr[i].size; | ||
} | ||
*/ | ||
|
||
writeln(arr2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
unimplemented feature: zippering an array of ranges with something else | ||
#26618 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1..2 3..4 6..7 5..5 -1..0 | ||
2 2 2 1 0 |