diff options
| -rw-r--r-- | example/example_02_nectar/example.nc | 5 | ||||
| -rw-r--r-- | example/example_05_asm_gpu/.keep | 0 | ||||
| -rw-r--r-- | example/example_06_nectar_gpu/example.nc | 7 | ||||
| -rw-r--r-- | include/GenericsLibrary/pstd.nhh | 17 |
4 files changed, 26 insertions, 3 deletions
diff --git a/example/example_02_nectar/example.nc b/example/example_02_nectar/example.nc index c41223b..46cbd25 100644 --- a/example/example_02_nectar/example.nc +++ b/example/example_02_nectar/example.nc @@ -2,10 +2,9 @@ extern sleep; extern putchar; const main() { - sleep(0x1); - putchar(0x0, '!'); + sleep(1); + putchar(0, '!'); let foo := 42; - return foo; } diff --git a/example/example_05_asm_gpu/.keep b/example/example_05_asm_gpu/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/example/example_05_asm_gpu/.keep diff --git a/example/example_06_nectar_gpu/example.nc b/example/example_06_nectar_gpu/example.nc new file mode 100644 index 0000000..d21003c --- /dev/null +++ b/example/example_06_nectar_gpu/example.nc @@ -0,0 +1,7 @@ +extern palloc; // parallel alloc + +const main() { + palloc(0, 0, 0); + return 0; +} + diff --git a/include/GenericsLibrary/pstd.nhh b/include/GenericsLibrary/pstd.nhh new file mode 100644 index 0000000..5df5232 --- /dev/null +++ b/include/GenericsLibrary/pstd.nhh @@ -0,0 +1,17 @@ +// 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/nekernel-org/nectar + +#pragma once + +extern __nrt_palloc; + +#define PALLOC_INVALID 0 + +let palloc(let type, let sz, let align := 0) +{ + return __nrt_palloc(type, sz, align); +} + + |
