public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rocthrust] epel10: Reuse Archlinux smoke test
@ 2026-06-11 12:54 Tom Rix
  0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2026-06-11 12:54 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rocthrust
            Branch : epel10
            Commit : d1bffce9b6d677b520e784371e8b17d662a5b1ac
            Author : Tom Rix <Tom.Rix@amd.com>
            Date   : 2026-02-11T06:49:02-08:00
            Stats  : +49/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rocthrust/c/d1bffce9b6d677b520e784371e8b17d662a5b1ac?branch=epel10

            Log:
            Reuse Archlinux smoke test

Licensed as 0BSD
repo https://gitlab.archlinux.org/archlinux/packaging/packages/rocthrust.git
commit e5b72cc12346bcdb3c0346df6f9e29800e5da134

Signed-off-by: Tom Rix <Tom.Rix@amd.com>

---
diff --git a/rocthrust.spec b/rocthrust.spec
index 66ad9c6..7cedd61 100644
--- a/rocthrust.spec
+++ b/rocthrust.spec
@@ -80,7 +80,7 @@ Summary:        ROCm Thrust libary
 # https://en.opensuse.org/openSUSE:Accepted_licences
 # Uses 'Public Domain' but this is not a spdx tag and hangs up the SLE 15.7 autochecker
 # The license should also include Public Domain
-License:        Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MIT
+License:        Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MIT AND 0BSD
 %else
 # https://docs.fedoraproject.org/en-US/legal/allowed-licenses/
 # Uses 'LicenseRef-Fedora-Public-Domain'

diff --git a/test.cpp b/test.cpp
new file mode 100644
index 0000000..d61a1d5
--- /dev/null
+++ b/test.cpp
@@ -0,0 +1,39 @@
+#include <thrust/copy.h>
+#include <thrust/host_vector.h>
+#include <thrust/device_vector.h>
+#include <thrust/sort.h>
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <random>
+
+int main(int argc, char *argv[])
+{
+    size_t size = 1024;
+
+    std::random_device rd;
+    std::mt19937 gen(rd());
+    std::uniform_real_distribution<float> dist(-1.0, 1.0);
+
+    auto myrand = [&]() -> float {return dist(gen);};
+
+    thrust::host_vector<float> xin(size);
+    std::generate(xin.begin(), xin.end(), myrand);
+
+    thrust::device_vector<float> x(size);
+    x = xin;
+
+    thrust::sort(x.begin(), x.end());
+    thrust::copy(x.begin(), x.end(), xin.begin());
+
+    for(size_t i = 1; i < size; i++){
+        if(xin[i - 1] > xin[i]){
+            std::cout << "Elements " << i - 1 << " and " << i
+                << "are not sorted:\n";
+            std::cout << xin[i - 1] << " " << xin[i] << std::endl;
+            return 1;
+        }
+    }
+
+    std::cout << "TESTS PASSED!" << std::endl;
+}

diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..4cdf5fc
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,9 @@
+#! /usr/bin/env sh
+
+BPATH=/usr/bin
+IPATH=/usr/include
+LPATH=/usr/lib64
+
+OUT=$(mktemp -d)
+${BPATH}/hipcc -o "$OUT"/test test.cpp -I${IPATH} -L${LPATH} -lamdhip64
+"$OUT"/test

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-11 12:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-11 12:54 [rpms/rocthrust] epel10: Reuse Archlinux smoke test Tom Rix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox