summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-09-24 21:06:27 +0300
committerxAlpharax <42233094+xAlpharax@users.noreply.github.com>2023-09-24 21:06:27 +0300
commit6215bc6b4e524735b75a45cdf6d08c7edf641bdb (patch)
treeba8269c79a0d526630b9b5b89a852b2695916203
parent21b12225b93203b2b59c7f2d3f68c2eca57172ae (diff)
Shell scripts for compiling and running C and CUDA standalone files.
Changes to be committed: new file: runc new file: runcuda
-rwxr-xr-xrunc11
-rwxr-xr-xruncuda9
2 files changed, 20 insertions, 0 deletions
diff --git a/runc b/runc
new file mode 100755
index 0000000..a68ac83
--- /dev/null
+++ b/runc
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+g++ $1 -o temp
+
+chmod +x temp
+
+./temp
+
+rm temp
diff --git a/runcuda b/runcuda
new file mode 100755
index 0000000..1c4de58
--- /dev/null
+++ b/runcuda
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+nvcc -allow-unsupported-compiler $1 -o temp
+
+chmod +x temp # if it isn't already executable
+
+./temp