Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
de7df89
feat: add BLAS Level 1 cscal
aman-095 Apr 1, 2024
fdc0170
chore: apply review changes
aman-095 Apr 3, 2024
1ad3e77
chore: add review changes
aman-095 Apr 4, 2024
aef4daa
chore: apply review changes
aman-095 Apr 4, 2024
8caf26d
Apply suggestions from code review
kgryte Apr 4, 2024
1e4be35
Apply suggestions from code review
kgryte Apr 4, 2024
d3260d6
Apply suggestions from code review
kgryte Apr 4, 2024
27ffd5d
Apply suggestions from code review
kgryte Apr 4, 2024
557408b
Apply suggestions from code review
kgryte Apr 4, 2024
bf22517
Apply suggestions from code review
kgryte Apr 4, 2024
39b5a9e
Apply suggestions from code review
kgryte Apr 4, 2024
468fe12
Apply suggestions from code review
kgryte Apr 4, 2024
828f2aa
Apply suggestions from code review
kgryte Apr 4, 2024
ff51235
Apply suggestions from code review
kgryte Apr 4, 2024
1f6a062
Apply suggestions from code review
kgryte Apr 4, 2024
a751e2e
Apply suggestions from code review
kgryte Apr 4, 2024
2288c76
Apply suggestions from code review
kgryte Apr 4, 2024
f5eb15d
Apply suggestions from code review
kgryte Apr 4, 2024
a0a151b
Apply suggestions from code review
kgryte Apr 4, 2024
9e6217a
Apply suggestions from code review
kgryte Apr 4, 2024
18c412f
Apply suggestions from code review
kgryte Apr 4, 2024
8d734dd
chore: apply review changes
aman-095 Apr 5, 2024
483f5dc
feat: add C / Fortran implementation
aman-095 Apr 9, 2024
128bd2c
chore: apply review changes
aman-095 Apr 11, 2024
47209d7
chore: apply review changes
aman-095 Apr 22, 2024
8ff1c99
chore: apply review changes
aman-095 Apr 22, 2024
7b35d7f
chore: apply review changes
aman-095 Apr 22, 2024
f99c12e
chore: apply review changes
aman-095 Apr 22, 2024
27709d1
chore: apply review changes
aman-095 May 20, 2024
6223d2a
Merge branch 'develop' of https://github.com/stdlib-js/stdlib into pr…
kgryte Jun 8, 2024
40b6db9
bench: fix benchmarks
kgryte Jun 8, 2024
b1acc24
bench: refactor array creation
kgryte Jun 8, 2024
a517b6e
docs: update require paths
kgryte Jun 8, 2024
8a57432
fix: update paths and fix text wrapping
kgryte Jun 8, 2024
c553c34
docs: update comment
kgryte Jun 8, 2024
0b49f7f
docs: fix require path
kgryte Jun 8, 2024
dc90750
fix: update function signatures to indicate that argument is mutated
kgryte Jun 8, 2024
8419e12
docs: update require paths
kgryte Jun 8, 2024
26d9489
refactor: lowercase variable name
kgryte Jun 8, 2024
2201653
refactor: remove duplicate loops
kgryte Jun 8, 2024
e188d27
docs: add missing note
kgryte Jun 8, 2024
68cbef3
fix: update signatures
kgryte Jun 8, 2024
08cb3cc
build: fix dependencies
kgryte Jun 8, 2024
7980f53
chore: remove keyword
kgryte Jun 8, 2024
b125ed1
docs: update require paths
kgryte Jun 8, 2024
c2a2fdb
test: update require paths and remove duplicate tests
kgryte Jun 8, 2024
24fe831
docs: add C interface documentation
kgryte Jun 8, 2024
bba0e36
refactor: add support for 64-bit integers
kgryte Jun 8, 2024
d307934
bench: fix overflow
kgryte Jun 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: apply review changes
  • Loading branch information
aman-095 committed Apr 22, 2024
commit 8ff1c99ca0bb5f0630fa170f79cee66f95831887
31 changes: 24 additions & 7 deletions lib/node_modules/@stdlib/blas/base/cscal/benchmark/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/cscal.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
Expand All @@ -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
Expand All @@ -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.
Expand Down
141 changes: 141 additions & 0 deletions lib/node_modules/@stdlib/blas/base/cscal/benchmark/fortran/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#/
# @license Apache-2.0
#
# Copyright (c) 2024 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#/

# VARIABLES #

ifndef VERBOSE
QUIET := @
else
QUIET :=
endif

# Determine the OS ([1][1], [2][2]).
#
# [1]: https://en.wikipedia.org/wiki/Uname#Examples
# [2]: http://stackoverflow.com/a/27776822/2225624
OS ?= $(shell uname)
ifneq (, $(findstring MINGW,$(OS)))
OS := WINNT
else
ifneq (, $(findstring MSYS,$(OS)))
OS := WINNT
else
ifneq (, $(findstring CYGWIN,$(OS)))
OS := WINNT
else
ifneq (, $(findstring Windows_NT,$(OS)))
OS := WINNT
endif
endif
endif
endif

# Define the program used for compiling Fortran source files:
ifdef FORTRAN_COMPILER
FC := $(FORTRAN_COMPILER)
else
FC := gfortran
endif

# Define the command-line options when compiling Fortran files:
FFLAGS ?= \
-std=f95 \
-ffree-form \
-O3 \
-Wall \
-Wextra \
-Wno-compare-reals \
-Wimplicit-interface \
-fno-underscoring \
-pedantic

# Determine whether to generate position independent code ([1][1], [2][2]).
#
# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
ifeq ($(OS), WINNT)
fPIC ?=
else
fPIC ?= -fPIC
endif

# List of includes (e.g., `-I /foo/bar -I /beep/boop`):
INCLUDE ?=

# List of Fortran source files:
SOURCE_FILES ?= ../../src/cscal.f

# List of Fortran targets:
f_targets := benchmark.length.out


# RULES #

#/
# Compiles Fortran source files.
#
# @param {string} SOURCE_FILES - list of Fortran source files
# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
# @param {string} [FORTRAN_COMPILER] - Fortran compiler
# @param {string} [FFLAGS] - Fortran compiler flags
# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
#
# @example
# make
#
# @example
# make all
#/
all: $(f_targets)

.PHONY: all

#/
# Compiles Fortran source files.
#
# @private
# @param {string} SOURCE_FILES - list of Fortran source files
# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
# @param {string} FC - Fortran compiler
# @param {string} FFLAGS - Fortran compiler flags
# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
#/
$(f_targets): %.out: %.f
$(QUIET) $(FC) $(FFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $<

#/
# Runs compiled benchmarks.
#
# @example
# make run
#/
run: $(f_targets)
$(QUIET) ./$<

.PHONY: run

#/
# Removes generated files.
#
# @example
# make clean
#/
clean:
$(QUIET) -rm -f *.o *.out

.PHONY: clean
Loading