From e8d39879b576c47f34c1876a5f55ec64a8cd720c Mon Sep 17 00:00:00 2001 From: stdlib-bot Date: Sun, 14 Apr 2024 22:54:09 +0000 Subject: [PATCH] Auto-generated commit --- base/saxpy/benchmark/c/Makefile | 31 +++-- base/saxpy/examples/c/Makefile | 33 +++-- base/saxpy/manifest.json | 211 ++++++++++++++++++++++++++++++++ 3 files changed, 260 insertions(+), 15 deletions(-) diff --git a/base/saxpy/benchmark/c/Makefile b/base/saxpy/benchmark/c/Makefile index cc672a5aa..7280962b4 100644 --- a/base/saxpy/benchmark/c/Makefile +++ b/base/saxpy/benchmark/c/Makefile @@ -69,8 +69,17 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + # List of source files: -c_src := ../../src/saxpy.c +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= # List of C targets: c_targets := benchmark.length.out @@ -79,11 +88,15 @@ c_targets := benchmark.length.out # RULES # #/ -# Compiles C source files. +# Compiles source files. # # @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) # @param {string} [CFLAGS] - C compiler options -# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code (e.g., `-fPIC`) +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) # # @example # make @@ -99,12 +112,16 @@ all: $(c_targets) # Compiles C source files. # # @private -# @param {string} CC - C compiler -# @param {string} CFLAGS - C compiler flags -# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) #/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -I ../../include -o $@ $(c_src) $< -lm + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) #/ # Runs compiled benchmarks. diff --git a/base/saxpy/examples/c/Makefile b/base/saxpy/examples/c/Makefile index 38f1d61a7..ff5293d30 100644 --- a/base/saxpy/examples/c/Makefile +++ b/base/saxpy/examples/c/Makefile @@ -69,8 +69,17 @@ else fPIC ?= -fPIC endif +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + # List of source files: -c_src := ../../src/saxpy.c +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= # List of C targets: c_targets := example.out @@ -79,11 +88,15 @@ c_targets := example.out # RULES # #/ -# Compiles C source files. +# Compiles source files. # # @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) # @param {string} [CFLAGS] - C compiler options -# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code (e.g., `-fPIC`) +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) # # @example # make @@ -99,15 +112,19 @@ all: $(c_targets) # Compiles C source files. # # @private -# @param {string} CC - C compiler -# @param {string} CFLAGS - C compiler flags -# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) #/ $(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) -I ../../include -o $@ $(c_src) $< -lm + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) #/ -# Runs compiled benchmarks. +# Runs compiled examples. # # @example # make run diff --git a/base/saxpy/manifest.json b/base/saxpy/manifest.json index 23fa917d2..86bce79a6 100644 --- a/base/saxpy/manifest.json +++ b/base/saxpy/manifest.json @@ -1,5 +1,6 @@ { "options": { + "task": "build", "os": "linux", "blas": "", "wasm": false @@ -28,6 +29,7 @@ ], "confs": [ { + "task": "build", "os": "linux", "blas": "", "wasm": false, @@ -49,6 +51,38 @@ ] }, { + "task": "benchmark", + "os": "linux", + "blas": "", + "wasm": false, + "src": [ + "./src/saxpy.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "os": "linux", + "blas": "", + "wasm": false, + "src": [ + "./src/saxpy.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + + { + "task": "build", "os": "linux", "blas": "openblas", "wasm": false, @@ -72,6 +106,44 @@ ] }, { + "task": "benchmark", + "os": "linux", + "blas": "openblas", + "wasm": false, + "src": [ + "./src/saxpy_cblas.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lopenblas", + "-lpthread" + ], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "os": "linux", + "blas": "openblas", + "wasm": false, + "src": [ + "./src/saxpy_cblas.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lopenblas", + "-lpthread" + ], + "libpath": [], + "dependencies": [] + }, + + { + "task": "build", "os": "mac", "blas": "", "wasm": false, @@ -93,6 +165,38 @@ ] }, { + "task": "benchmark", + "os": "mac", + "blas": "", + "wasm": false, + "src": [ + "./src/saxpy.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "os": "mac", + "blas": "", + "wasm": false, + "src": [ + "./src/saxpy.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + + { + "task": "build", "os": "mac", "blas": "apple_accelerate_framework", "wasm": false, @@ -115,6 +219,42 @@ ] }, { + "task": "benchmark", + "os": "mac", + "blas": "apple_accelerate_framework", + "wasm": false, + "src": [ + "./src/saxpy_cblas.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lblas" + ], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "os": "mac", + "blas": "apple_accelerate_framework", + "wasm": false, + "src": [ + "./src/saxpy_cblas.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lblas" + ], + "libpath": [], + "dependencies": [] + }, + + { + "task": "build", "os": "mac", "blas": "openblas", "wasm": false, @@ -138,6 +278,44 @@ ] }, { + "task": "benchmark", + "os": "mac", + "blas": "openblas", + "wasm": false, + "src": [ + "./src/saxpy_cblas.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lopenblas", + "-lpthread" + ], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "os": "mac", + "blas": "openblas", + "wasm": false, + "src": [ + "./src/saxpy_cblas.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lopenblas", + "-lpthread" + ], + "libpath": [], + "dependencies": [] + }, + + { + "task": "build", "os": "win", "blas": "", "wasm": false, @@ -152,11 +330,44 @@ "dependencies": [ "@stdlib/napi/export", "@stdlib/napi/argv", + "@stdlib/napi/argv-float", "@stdlib/napi/argv-int64", "@stdlib/napi/argv-strided-float32array" ] }, { + "task": "benchmark", + "os": "win", + "blas": "", + "wasm": false, + "src": [ + "./src/saxpy.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + { + "task": "examples", + "os": "win", + "blas": "", + "wasm": false, + "src": [ + "./src/saxpy.c" + ], + "include": [ + "./include" + ], + "libraries": [], + "libpath": [], + "dependencies": [] + }, + + { + "task": "build", "os": "", "blas": "", "wasm": true,