Skip to content

Commit

Permalink
Add a compatibility module for Time to handle the new totalMicrosecon…
Browse files Browse the repository at this point in the history
…ds method

Without a compatibility module, the recent addition of totalMicroseconds will
result in a resolution conflict with the original solution

----
Signed-off-by: Lydia Duncan <[email protected]>
  • Loading branch information
lydia-duncan committed Mar 4, 2025
1 parent 7b69a9a commit 22614f8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/RandUtil.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ module RandUtil {
where D.rank == 1 {
// use a fixed number of elements per stream instead of relying on number of locales or numTasksPerLoc because these
// can vary from run to run / machine to mahchine. And it's important for the same seed to give the same results
use Time;
proc timeDelta.totalMicroseconds(): int{
return ((days*(24*60*60) + seconds)*1_000_000 + microseconds): int;
}
use ArkoudaTimeCompat;
var next: rng.eltType;
if hasSeed {
next = rng.next();
Expand Down
7 changes: 7 additions & 0 deletions src/compat/eq-20/ArkoudaTimeCompat.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module ArkoudaTimeCompat {
public use Time;

proc timeDelta.totalMicroseconds(): int{
return ((days*(24*60*60) + seconds)*1_000_000 + microseconds): int;
}
}
7 changes: 7 additions & 0 deletions src/compat/eq-21/ArkoudaTimeCompat.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module ArkoudaTimeCompat {
public use Time;

proc timeDelta.totalMicroseconds(): int{
return ((days*(24*60*60) + seconds)*1_000_000 + microseconds): int;
}
}
7 changes: 7 additions & 0 deletions src/compat/eq-22/ArkoudaTimeCompat.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module ArkoudaTimeCompat {
public use Time;

proc timeDelta.totalMicroseconds(): int{
return ((days*(24*60*60) + seconds)*1_000_000 + microseconds): int;
}
}
7 changes: 7 additions & 0 deletions src/compat/eq-23/ArkoudaTimeCompat.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module ArkoudaTimeCompat {
public use Time;

proc timeDelta.totalMicroseconds(): int{
return ((days*(24*60*60) + seconds)*1_000_000 + microseconds): int;
}
}
3 changes: 3 additions & 0 deletions src/compat/ge-24/ArkoudaTimeCompat.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module ArkoudaTimeCompat {
public use Time;
}

0 comments on commit 22614f8

Please sign in to comment.