Skip to content

Commit c41aa3e

Browse files
committed
Auto-generated commit
1 parent 1b1222d commit c41aa3e

File tree

8 files changed

+259
-24
lines changed

8 files changed

+259
-24
lines changed

.github/workflows/productionize.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ jobs:
344344
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
345345
with:
346346
status: ${{ job.status }}
347-
steps: ${{ toJson(steps) }}
348347
channel: '#npm-ci'
349348
if: failure()
350349

@@ -518,7 +517,6 @@ jobs:
518517
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
519518
with:
520519
status: ${{ job.status }}
521-
steps: ${{ toJson(steps) }}
522520
channel: '#npm-ci'
523521
if: failure()
524522

@@ -698,7 +696,6 @@ jobs:
698696
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
699697
with:
700698
status: ${{ job.status }}
701-
steps: ${{ toJson(steps) }}
702699
channel: '#npm-ci'
703700
if: failure()
704701

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ jobs:
218218
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
219219
with:
220220
status: ${{ job.status }}
221-
steps: ${{ toJson(steps) }}
222221
channel: '#npm-ci'
223222
if: failure()
224223

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,5 @@ jobs:
9595
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
9696
with:
9797
status: ${{ job.status }}
98-
steps: ${{ toJson(steps) }}
9998
channel: '#npm-ci'
10099
if: failure()

.github/workflows/test_bundles.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
9595
with:
9696
status: ${{ job.status }}
97-
steps: ${{ toJson(steps) }}
9897
channel: '#npm-ci'
9998
if: failure()
10099

@@ -139,7 +138,6 @@ jobs:
139138
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
140139
with:
141140
status: ${{ job.status }}
142-
steps: ${{ toJson(steps) }}
143141
channel: '#npm-ci'
144142
if: failure()
145143

@@ -184,6 +182,5 @@ jobs:
184182
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
185183
with:
186184
status: ${{ job.status }}
187-
steps: ${{ toJson(steps) }}
188185
channel: '#npm-ci'
189186
if: failure()

.github/workflows/test_install.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,5 @@ jobs:
8181
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 # v3.16.2
8282
with:
8383
status: ${{ job.status }}
84-
steps: ${{ toJson(steps) }}
8584
channel: '#npm-ci'
8685
if: failure()

benchmark/c/Makefile

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,17 @@ else
6969
fPIC ?= -fPIC
7070
endif
7171

72+
# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
73+
INCLUDE ?=
74+
7275
# List of source files:
73-
c_src := ../../src/cswap.c
76+
SOURCE_FILES ?=
77+
78+
# List of libraries (e.g., `-lopenblas -lpthread`):
79+
LIBRARIES ?=
80+
81+
# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
82+
LIBPATH ?=
7483

7584
# List of C targets:
7685
c_targets := benchmark.length.out
@@ -79,11 +88,15 @@ c_targets := benchmark.length.out
7988
# RULES #
8089

8190
#/
82-
# Compiles C source files.
91+
# Compiles source files.
8392
#
8493
# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
8594
# @param {string} [CFLAGS] - C compiler options
86-
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code (e.g., `-fPIC`)
95+
# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
96+
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
97+
# @param {string} [SOURCE_FILES] - list of source files
98+
# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
99+
# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
87100
#
88101
# @example
89102
# make
@@ -99,12 +112,16 @@ all: $(c_targets)
99112
# Compiles C source files.
100113
#
101114
# @private
102-
# @param {string} CC - C compiler
103-
# @param {string} CFLAGS - C compiler flags
104-
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
115+
# @param {string} CC - C compiler (e.g., `gcc`)
116+
# @param {string} CFLAGS - C compiler options
117+
# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
118+
# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
119+
# @param {string} SOURCE_FILES - list of source files
120+
# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
121+
# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
105122
#/
106123
$(c_targets): %.out: %.c
107-
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -I ../../include -o $@ $(c_src) $< -lm
124+
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
108125

109126
#/
110127
# Runs compiled benchmarks.

examples/c/Makefile

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,17 @@ else
6969
fPIC ?= -fPIC
7070
endif
7171

72+
# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
73+
INCLUDE ?=
74+
7275
# List of source files:
73-
c_src := ../../src/cswap.c
76+
SOURCE_FILES ?=
77+
78+
# List of libraries (e.g., `-lopenblas -lpthread`):
79+
LIBRARIES ?=
80+
81+
# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
82+
LIBPATH ?=
7483

7584
# List of C targets:
7685
c_targets := example.out
@@ -79,11 +88,15 @@ c_targets := example.out
7988
# RULES #
8089

8190
#/
82-
# Compiles C source files.
91+
# Compiles source files.
8392
#
8493
# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
8594
# @param {string} [CFLAGS] - C compiler options
86-
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code (e.g., `-fPIC`)
95+
# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
96+
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
97+
# @param {string} [SOURCE_FILES] - list of source files
98+
# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
99+
# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
87100
#
88101
# @example
89102
# make
@@ -99,15 +112,19 @@ all: $(c_targets)
99112
# Compiles C source files.
100113
#
101114
# @private
102-
# @param {string} CC - C compiler
103-
# @param {string} CFLAGS - C compiler flags
104-
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
115+
# @param {string} CC - C compiler (e.g., `gcc`)
116+
# @param {string} CFLAGS - C compiler options
117+
# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
118+
# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
119+
# @param {string} SOURCE_FILES - list of source files
120+
# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
121+
# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
105122
#/
106123
$(c_targets): %.out: %.c
107-
$(QUIET) $(CC) $(CFLAGS) $(fPIC) -I ../../include -o $@ $(c_src) $< -lm
124+
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
108125

109126
#/
110-
# Runs compiled benchmarks.
127+
# Runs compiled examples.
111128
#
112129
# @example
113130
# make run

0 commit comments

Comments
 (0)