diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2025-10-19 02:43:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-19 02:43:33 +0100 |
| commit | 0f154b5be8905dcf649fb697de45346abe56ae9c (patch) | |
| tree | 39fe1e79940de5590638550cbc97295b173448f4 | |
| parent | 60f44cff092565ae53cc346fdff03d869d62c650 (diff) | |
| parent | 997162ed04ad685f6897fbed07faced146fc050d (diff) | |
| download | perlweeklychallenge-club-0f154b5be8905dcf649fb697de45346abe56ae9c.tar.gz perlweeklychallenge-club-0f154b5be8905dcf649fb697de45346abe56ae9c.tar.bz2 perlweeklychallenge-club-0f154b5be8905dcf649fb697de45346abe56ae9c.zip | |
Merge pull request #12862 from codereport/master
:sparkles: Week 343 in CUDA (using Parrot)
| -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; +} |
