Skip to content

Commit 06dcd6d

Browse files
committed
refactor: remove typedef and update Makefile
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 1cc46be commit 06dcd6d

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

lib/node_modules/@stdlib/math/base/special/heaviside/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ y = stdlib_base_heaviside( 0.0, STDLIB_BASE_HEAVISIDE_CONTINUITY_LEFT_CONTINUOUS
205205
The function accepts the following arguments:
206206

207207
- **x**: `[in] double` input value.
208-
- **continuity**: `[in] STDLIB_BASE_HEAVISIDE_CONTINUITY` continuity option.
208+
- **continuity**: `[in] enum STDLIB_BASE_HEAVISIDE_CONTINUITY` continuity option.
209209

210210
The `continuity` parameter may be one of the following values:
211211

@@ -217,7 +217,7 @@ The `continuity` parameter may be one of the following values:
217217
If provided a `continuity` argument which is not one of the enumeration constants listed above, the function returns `NaN` for `x == 0`, behaving like the discontinuous case.
218218

219219
```c
220-
double stdlib_base_heaviside( const double x, const STDLIB_BASE_HEAVISIDE_CONTINUITY continuity );
220+
double stdlib_base_heaviside( const double x, const enum STDLIB_BASE_HEAVISIDE_CONTINUITY continuity );
221221
```
222222
223223
</section>

lib/node_modules/@stdlib/math/base/special/heaviside/benchmark/c/native/Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ c_targets := benchmark.out
8888
# RULES #
8989

9090
#/
91-
# Compiles source files.
91+
# Compiles C source files.
9292
#
93-
# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
94-
# @param {string} [CFLAGS] - C compiler options
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
93+
# @param {string} SOURCE_FILES - list of C source files
94+
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
95+
# @param {string} [LIBRARIES] - list of libraries (e.g., `-lpthread -lblas`)
9896
# @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`)
97+
# @param {string} [C_COMPILER] - C compiler
98+
# @param {string} [CFLAGS] - C compiler flags
99+
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
100100
#
101101
# @example
102102
# make
@@ -112,13 +112,13 @@ all: $(c_targets)
112112
# Compiles C source files.
113113
#
114114
# @private
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`)
115+
# @param {string} SOURCE_FILES - list of C source files
116+
# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
117+
# @param {(string|void)} LIBRARIES - list of libraries (e.g., `-lpthread -lblas`)
118+
# @param {(string|void)} LIBPATH - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
119+
# @param {string} CC - C compiler
120+
# @param {string} CFLAGS - C compiler flags
121+
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
122122
#/
123123
$(c_targets): %.out: %.c
124124
$(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)

lib/node_modules/@stdlib/math/base/special/heaviside/include/stdlib/math/base/special/heaviside.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
// Enumeration of function continuity:
30-
typedef enum STDLIB_BASE_HEAVISIDE_CONTINUITY {
30+
enum STDLIB_BASE_HEAVISIDE_CONTINUITY {
3131
// Half-maximum:
3232
STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM = 0,
3333

@@ -39,12 +39,12 @@ typedef enum STDLIB_BASE_HEAVISIDE_CONTINUITY {
3939

4040
// Discontinuous:
4141
STDLIB_BASE_HEAVISIDE_CONTINUITY_DISCONTINUOUS = 3
42-
} STDLIB_BASE_HEAVISIDE_CONTINUITY;
42+
};
4343

4444
/**
4545
* Evaluates the Heaviside function.
4646
*/
47-
double stdlib_base_heaviside( const double x, const STDLIB_BASE_HEAVISIDE_CONTINUITY continuity );
47+
double stdlib_base_heaviside( const double x, const enum STDLIB_BASE_HEAVISIDE_CONTINUITY continuity );
4848

4949
#ifdef __cplusplus
5050
}

lib/node_modules/@stdlib/math/base/special/heaviside/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* double y = stdlib_base_heaviside( 0.0, STDLIB_BASE_HEAVISIDE_CONTINUITY_HALF_MAXIMUM );
3131
* // returns 0.5
3232
*/
33-
double stdlib_base_heaviside( const double x, const STDLIB_BASE_HEAVISIDE_CONTINUITY continuity ) {
33+
double stdlib_base_heaviside( const double x, const enum STDLIB_BASE_HEAVISIDE_CONTINUITY continuity ) {
3434
if ( stdlib_base_is_nan( x ) ) {
3535
return 0.0 / 0.0; // NaN
3636
}

0 commit comments

Comments
 (0)