aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <Mohammad.Anwar@yahoo.com>2025-10-19 02:43:33 +0100
committerGitHub <noreply@github.com>2025-10-19 02:43:33 +0100
commit0f154b5be8905dcf649fb697de45346abe56ae9c (patch)
tree39fe1e79940de5590638550cbc97295b173448f4
parent60f44cff092565ae53cc346fdff03d869d62c650 (diff)
parent997162ed04ad685f6897fbed07faced146fc050d (diff)
downloadperlweeklychallenge-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.cu5
-rw-r--r--challenge-343/conor-hoekstra/ch-2.cu6
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;
+}