diff options
| author | Conor Hoekstra <codereport@outlook.com> | 2025-10-17 17:32:41 -0400 |
|---|---|---|
| committer | Conor Hoekstra <codereport@outlook.com> | 2025-10-17 17:32:41 -0400 |
| commit | 997162ed04ad685f6897fbed07faced146fc050d (patch) | |
| tree | c20b019a867b9e785b92e311d88e2daf8ddaab8a /challenge-343 | |
| parent | 3f3081c9e593d8d59175dea41b041f8bb13f2314 (diff) | |
| download | perlweeklychallenge-club-997162ed04ad685f6897fbed07faced146fc050d.tar.gz perlweeklychallenge-club-997162ed04ad685f6897fbed07faced146fc050d.tar.bz2 perlweeklychallenge-club-997162ed04ad685f6897fbed07faced146fc050d.zip | |
:sparkles: Week 343 in CUDA (using Parrot)
Diffstat (limited to 'challenge-343')
| -rw-r--r-- | challenge-343/conor-hoekstra/ch-1.cu | 5 | ||||
| -rw-r--r-- | challenge-343/conor-hoekstra/ch-2.cu | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/challenge-343/conor-hoekstra/ch-1.cu b/challenge-343/conor-hoekstra/ch-1.cu new file mode 100644 index 0000000000..3a678e2acc --- /dev/null +++ b/challenge-343/conor-hoekstra/ch-1.cu @@ -0,0 +1,5 @@ +// Parrot: https://nvlabs.github.io/parrot + +auto zero_friend(auto arr) { // + return (arr - 0).abs().minr(); +} diff --git a/challenge-343/conor-hoekstra/ch-2.cu b/challenge-343/conor-hoekstra/ch-2.cu new file mode 100644 index 0000000000..2ec7d74781 --- /dev/null +++ b/challenge-343/conor-hoekstra/ch-2.cu @@ -0,0 +1,6 @@ +// Parrot: https://nvlabs.github.io/parrot + +auto team_champion(auto arr) { + auto sums = arr.sum(2_ic); + return (sums.maxr() == sums).where().front() - 1; +} |
