Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions deps/checksums/highway_1_4_0_tar_gz/sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e72241ac9524bb653ae52ced768b508045d4438726a303f10181a38f764a453c
45 changes: 45 additions & 0 deletions deps/test/highway/test_install.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 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.
*/

#include "hwy/highway.h"

HWY_BEFORE_NAMESPACE();

namespace hwy {
namespace HWY_NAMESPACE {

int test_install( void ) {
#if HWY_HAVE_FLOAT64
using T = double;
#else
using T = float;
#endif
const ScalableTag<T> tag;
const auto value = Set( tag, static_cast<T>( 1.0 ) );

return ( GetLane( value ) == static_cast<T>( 1.0 ) ) ? 0 : 1;
}

} // namespace HWY_NAMESPACE
} // namespace hwy

HWY_AFTER_NAMESPACE();

int main( void ) {
return hwy::HWY_NAMESPACE::test_install();
}
23 changes: 23 additions & 0 deletions deps/test/highway/test_runtime.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 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.
*/

#include "hwy/targets.h"

int main( void ) {
return hwy::SupportedAndGeneratedTargets().empty() ? 1 : 0;
}
3 changes: 3 additions & 0 deletions docs/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The following external libraries can be automatically downloaded and compiled fr

- [Boost][boost]: portable C++ libraries
- [Cephes][cephes]: C/C++ special functions math library
- [Highway][highway]: performance-portable SIMD library
- [OpenBLAS][openblas]: optimized BLAS library
- [Electron][electron]: framework for cross-platform desktop applications
- [Emscripten][emscripten]: LLVM to JavaScript compiler
Expand Down Expand Up @@ -406,6 +407,8 @@ For contribution guidelines, see the [contributing guide][stdlib-contributing].

[cephes]: http://www.moshier.net/#Cephes

[highway]: https://github.com/google/highway

[openblas]: https://github.com/xianyi/OpenBLAS

[electron]: https://www.electronjs.org/
Expand Down
14 changes: 14 additions & 0 deletions docs/links/database.json
Original file line number Diff line number Diff line change
Expand Up @@ -8274,6 +8274,20 @@
"linter"
]
},
"https://github.com/google/highway": {
"id": "highway",
"description": "Highway is a C++ library for performance-portable SIMD with runtime dispatch.",
"short_url": "",
"keywords": [
"highway",
"simd",
"vectorization",
"intrinsics",
"c++",
"runtime",
"dispatch"
]
},
"https://github.com/gotwarlost/istanbul": {
"id": "istanbul",
"description": "Istanbul is a JavaScript code coverage tool.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"license": "LICENSE",
"notice": "NOTICE",
"makefile": "Makefile",
"cmakelists": "CMakeLists.txt",
"description": "DESCRIPTION",
"require": "REQUIRE",
"authors": "AUTHORS",
Expand Down
17 changes: 17 additions & 0 deletions lib/node_modules/@stdlib/_tools/lint/filenames/test/test.lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ tape( 'the function requires `Makefile` to be spelled exactly', function test( t
t.end();
});

tape( 'the function requires `CMakeLists.txt` to be spelled exactly', function test( t ) {
var values;
var names;

values = [
'cmakelists.txt',
'CMAKELISTS.txt',
'CMakeLists.cmake'
];

names = lint( values );

t.strictEqual( names.length, values.length, 'returns error messages' );
t.end();
});

tape( 'the function requires `LICENSE` to be spelled exactly', function test( t ) {
var values;
var names;
Expand Down Expand Up @@ -150,6 +166,7 @@ tape( 'the function returns an empty array if all filenames are valid', function
'data.data.txt',
'README.md',
'Makefile',
'CMakeLists.txt',
'DESCRIPTION',
'LICENSE',
'CITATION.cff'
Expand Down
103 changes: 102 additions & 1 deletion lib/node_modules/@stdlib/blas/ext/base/dsumpw/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
# Target name should match the add-on export name:
'addon_target_name%': 'addon',

# SIMD backend:
'simd%': '',

# Set variables based on the host OS:
'conditions': [
[
Expand All @@ -48,13 +51,103 @@
# Define compile targets:
'targets': [

# Target to compile the Highway kernel:
{
'target_name': 'simd_kernel',

# By default, this target has no output:
'type': 'none',

# Apply conditions based on the selected SIMD backend:
'conditions': [
[
'simd=="highway"',
{
# Generate a static library which is linked into the add-on:
'type': 'static_library',

# Define directories which contain relevant include headers:
'include_dirs': [
'<@(include_dirs)',
'<@(highway_include_dirs)',
],

# List of source files:
'sources': [
'<@(cxx_src_files)',
],

'defines': [
'<@(highway_defines)',
],

'link_settings': {
'libraries': [
'<@(highway_libraries)',
],
},

# C/C++ compiler flags:
'cflags': [
# Enable commonly used warning options:
'-Wall',

# Aggressive optimization:
'-O3',

# Disable floating-point contraction:
'-ffp-contract=off',
],

# C++ specific compiler flags:
'cflags_cc': [
# Use the C++17 standard:
'-std=c++17',
],

# Apply conditions based on the host OS:
'conditions': [
[
'OS=="win"',
{
'msvs_settings': {
'VCCLCompilerTool': {
# Use the C++17 standard:
'AdditionalOptions': [
'/std:c++17',
],
},
},
},
], # end condition (OS=="win")
[
'OS!="win"',
{
# C/C++ flags:
'cflags': [
# Generate position-independent code:
'-fPIC',

# Keep implementation symbols private to the add-on:
'-fvisibility=hidden',
],
},
], # end condition (OS!="win")
], # end conditions
},
], # end condition (simd=="highway")
], # end conditions
}, # end target simd_kernel

# Target to generate an add-on:
{
# The target name should match the add-on export name:
'target_name': '<(addon_target_name)',

# Define dependencies:
'dependencies': [],
'dependencies': [
'simd_kernel',
],

# Define directories which contain relevant include headers:
'include_dirs': [
Expand All @@ -67,6 +160,14 @@
'<@(src_files)',
],

'sources!': [
'<@(cxx_src_files)',
],

'defines': [
'<@(defines)',
],

# Settings which should be applied when a target's object files are used as linker input:
'link_settings': {
# Define libraries:
Expand Down
44 changes: 40 additions & 4 deletions lib/node_modules/@stdlib/blas/ext/base/dsumpw/include.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@
{
# Define variables to be used throughout the configuration for all targets:
'variables': {
'variables': {
# SIMD backend:
'simd%': '',

# Path to a configured Highway build:
'highway_dir%': '',
},

# Source directory:
'src_dir': './src',

# Include directories:
'include_dirs': [
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'simd\':\'<(simd)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],

# Add-on destination directory:
Expand All @@ -37,17 +45,45 @@
# Source files:
'src_files': [
'<(src_dir)/addon.c',
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'simd\':\'<(simd)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],

# C++ source files:
'cxx_src_files': [
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'simd\':\'<(simd)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { if ( /\\.(cpp|cc)$/.test( arr[ i ] ) ) { console.log( arr[ i ] ); } }")',
],

# Preprocessor definitions:
'defines': [
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'simd\':\'<(simd)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).defines; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],

# Library dependencies:
'libraries': [
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libraries; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'simd\':\'<(simd)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libraries; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],

# Library directories:
'library_dirs': [
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libpath; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'simd\':\'<(simd)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libpath; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],

# Highway runtime settings:
'conditions': [
[
'simd=="highway"',
{
'highway_include_dirs': [
'<!@(node -e "var arr = require(\'<(highway_dir)/highway.json\').include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],
'highway_defines': [
'<!@(node -e "var arr = require(\'<(highway_dir)/highway.json\').defines; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],
'highway_libraries': [
'<!@(node -e "var arr = require(\'<(highway_dir)/highway.json\').libraries; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
],
},
], # end condition (simd=="highway")
], # end conditions
}, # end variables
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 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.
*/

#ifndef STDLIB_BLAS_EXT_BASE_DSUMPW_SIMD_HIGHWAY_H
#define STDLIB_BLAS_EXT_BASE_DSUMPW_SIMD_HIGHWAY_H

#include "stdlib/blas/base/shared.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* Computes a pairwise sum using Highway, assuming N > 128 and strideX = 1.
*/
double API_SUFFIX( stdlib_strided_dsumpw_ndarray_highway )( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX );

#ifdef __cplusplus
}
#endif

#endif // !STDLIB_BLAS_EXT_BASE_DSUMPW_SIMD_HIGHWAY_H
Loading