summaryrefslogtreecommitdiffhomepage
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/example_02_nectar/example.nc16
-rw-r--r--example/example_05_nectar_gpu/Jamfile.v2 (renamed from example/example_06_nectar_gpu/Jamfile.v2)0
-rw-r--r--example/example_05_nectar_gpu/example.nc6
-rw-r--r--example/example_06_nectar_cuda/example.nc10
-rw-r--r--example/example_06_nectar_gpu/example.nc11
5 files changed, 20 insertions, 23 deletions
diff --git a/example/example_02_nectar/example.nc b/example/example_02_nectar/example.nc
index fdaadcd..5e95c44 100644
--- a/example/example_02_nectar/example.nc
+++ b/example/example_02_nectar/example.nc
@@ -1,15 +1,7 @@
extern exit;
-trait foo {
- let exit();
-};
-
-let foo.exit() {
- exit(0);
-}
-
-const main() {
- let self := 0;
- foo.exit();
- return 0;
+const main()
+{
+ let foo := exit(0);
+ return 0;
}
diff --git a/example/example_06_nectar_gpu/Jamfile.v2 b/example/example_05_nectar_gpu/Jamfile.v2
index 87f2328..87f2328 100644
--- a/example/example_06_nectar_gpu/Jamfile.v2
+++ b/example/example_05_nectar_gpu/Jamfile.v2
diff --git a/example/example_05_nectar_gpu/example.nc b/example/example_05_nectar_gpu/example.nc
new file mode 100644
index 0000000..976b329
--- /dev/null
+++ b/example/example_05_nectar_gpu/example.nc
@@ -0,0 +1,6 @@
+extern palloc_bytes;
+
+const main() {
+ let dummy := palloc_bytes(0, 1, 0);
+ return dummy;
+}
diff --git a/example/example_06_nectar_cuda/example.nc b/example/example_06_nectar_cuda/example.nc
new file mode 100644
index 0000000..4f2e430
--- /dev/null
+++ b/example/example_06_nectar_cuda/example.nc
@@ -0,0 +1,10 @@
+import cudaMalloc;
+
+const main()
+{
+ let ptr := 0;
+ let sz := 8;
+ cudaMalloc(ptr, sz);
+}
+
+
diff --git a/example/example_06_nectar_gpu/example.nc b/example/example_06_nectar_gpu/example.nc
deleted file mode 100644
index d0a8b72..0000000
--- a/example/example_06_nectar_gpu/example.nc
+++ /dev/null
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: Apache-2.0
-// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
-// Licensed under the Apache License, Version 2.0 (See accompanying
-// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0)
-// Official repository: https://github.com/ne-foss-org/nectar
-
-const main() {
- const dummy := 0x10;
- return dummy;
-}
-