Skip to content

Commit 085e509

Browse files
committed
Auto-generated commit
1 parent 6ef7436 commit 085e509

17 files changed

Lines changed: 1179 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-06-07)
7+
## Unreleased (2025-06-08)
88

99
<section class="features">
1010

1111
### Features
1212

13+
- [`2e5601a`](https://github.com/stdlib-js/stdlib/commit/2e5601ac124eba7f7da0079cf9c8124c21810c3d) - add signed 16-bit integer APIs
14+
- [`3e17026`](https://github.com/stdlib-js/stdlib/commit/3e17026605bc56416822aa289fd4e2f428c3bf11) - add signed 8-bit integer APIs
15+
- [`d1b7fe1`](https://github.com/stdlib-js/stdlib/commit/d1b7fe117cae21279fb8e62283ba7693822bda4d) - add unsigned 32-bit integer APIs
16+
- [`5ff1e27`](https://github.com/stdlib-js/stdlib/commit/5ff1e2760c40b9318c9a4cbfb1c8d4ccb5644de5) - add unsigned 16-bit integer APIs
17+
- [`e83a528`](https://github.com/stdlib-js/stdlib/commit/e83a5284d2c9db6b968ac2edd81c43f4b76549d5) - add unsigned 8-bit integer APIs
1318
- [`dc8a471`](https://github.com/stdlib-js/stdlib/commit/dc8a4718d16d105ff2c88ec6a5f0ac6dc0693d79) - add `math/base/special/spencef` [(#7048)](https://github.com/stdlib-js/stdlib/pull/7048)
1419
- [`83da5c1`](https://github.com/stdlib-js/stdlib/commit/83da5c17c4a6d5f0dcfaf905e0612961a11d92db) - add `acotdf` to namespace
1520
- [`69c0f30`](https://github.com/stdlib-js/stdlib/commit/69c0f3039c61db8c47af5f4d8300bb219c4e94fc) - add `acosdf` to namespace
@@ -486,6 +491,11 @@ A total of 46 issues were closed in this release:
486491

487492
<details>
488493

494+
- [`2e5601a`](https://github.com/stdlib-js/stdlib/commit/2e5601ac124eba7f7da0079cf9c8124c21810c3d) - **feat:** add signed 16-bit integer APIs _(by Athan Reines)_
495+
- [`3e17026`](https://github.com/stdlib-js/stdlib/commit/3e17026605bc56416822aa289fd4e2f428c3bf11) - **feat:** add signed 8-bit integer APIs _(by Athan Reines)_
496+
- [`d1b7fe1`](https://github.com/stdlib-js/stdlib/commit/d1b7fe117cae21279fb8e62283ba7693822bda4d) - **feat:** add unsigned 32-bit integer APIs _(by Athan Reines)_
497+
- [`5ff1e27`](https://github.com/stdlib-js/stdlib/commit/5ff1e2760c40b9318c9a4cbfb1c8d4ccb5644de5) - **feat:** add unsigned 16-bit integer APIs _(by Athan Reines)_
498+
- [`e83a528`](https://github.com/stdlib-js/stdlib/commit/e83a5284d2c9db6b968ac2edd81c43f4b76549d5) - **feat:** add unsigned 8-bit integer APIs _(by Athan Reines)_
489499
- [`dc8a471`](https://github.com/stdlib-js/stdlib/commit/dc8a4718d16d105ff2c88ec6a5f0ac6dc0693d79) - **feat:** add `math/base/special/spencef` [(#7048)](https://github.com/stdlib-js/stdlib/pull/7048) _(by Karan Anand, Athan Reines, stdlib-bot)_
490500
- [`03e5c54`](https://github.com/stdlib-js/stdlib/commit/03e5c54b90e538bee276484281d2e4553d7ec83e) - **docs:** update namespace table of contents [(#7233)](https://github.com/stdlib-js/stdlib/pull/7233) _(by stdlib-bot)_
491501
- [`57ef247`](https://github.com/stdlib-js/stdlib/commit/57ef247aa2a78d934abb36b6ea9994371369db37) - **docs:** fix incorrect require path for `Complex128Array` _(by Karan Anand)_

base/napi/binary/README.md

Lines changed: 315 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,69 @@ console.log( headerDir );
106106

107107
<!-- NOTE: please keep in alphabetical order according to suffix XX_X -->
108108

109+
#### STDLIB_MATH_BASE_NAPI_MODULE_BB_B( fcn )
110+
111+
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning unsigned 8-bit integers.
112+
113+
```c
114+
#include <stdint.h>
115+
116+
static uint8_t add( const uint8_t x, const uint8_t y ) {
117+
return x + y;
118+
}
119+
120+
// ...
121+
122+
// Register a Node-API module:
123+
STDLIB_MATH_BASE_NAPI_MODULE_BB_B( add );
124+
```
125+
126+
The macro expects the following arguments:
127+
128+
- **fcn**: `uint8_t (*fcn)( uint8_t, uint8_t )` binary function.
129+
130+
When used, this macro should be used **instead of** `NAPI_MODULE`. The macro includes `NAPI_MODULE`, thus ensuring Node-API module registration.
131+
132+
#### stdlib_math_base_napi_bb_b( env, info, fcn )
133+
134+
Invokes a binary function accepting and returning unsigned 8-bit integers.
135+
136+
```c
137+
#include <node_api.h>
138+
#include <stdint.h>
139+
140+
// ...
141+
142+
static uint8_t add( const uint8_t x, const uint8_t y ) {
143+
return x + y;
144+
}
145+
146+
// ...
147+
148+
/**
149+
* Receives JavaScript callback invocation data.
150+
*
151+
* @param env environment under which the function is invoked
152+
* @param info callback data
153+
* @return Node-API value
154+
*/
155+
napi_value addon( napi_env env, napi_callback_info info ) {
156+
return stdlib_math_base_napi_bb_b( env, info, add );
157+
}
158+
159+
// ...
160+
```
161+
162+
The function accepts the following arguments:
163+
164+
- **env**: `[in] napi_env` environment under which the function is invoked.
165+
- **info**: `[in] napi_callback_info` callback data.
166+
- **fcn**: `[in] uint8_t (*fcn)( uint8_t, uint8_t )` binary function.
167+
168+
```c
169+
void stdlib_math_base_napi_bb_b( napi_env env, napi_callback_info info, uint8_t (*fcn)( uint8_t, uint8_t ) );
170+
```
171+
109172
#### STDLIB_MATH_BASE_NAPI_MODULE_CC_C( fcn )
110173
111174
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning single-precision complex floating-point numbers.
@@ -1038,6 +1101,69 @@ The function accepts the following arguments:
10381101
void stdlib_math_base_napi_ii_i( napi_env env, napi_callback_info info, int32_t (*fcn)( int32_t, int32_t ) );
10391102
```
10401103

1104+
#### STDLIB_MATH_BASE_NAPI_MODULE_KK_K( fcn )
1105+
1106+
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning signed 16-bit integers.
1107+
1108+
```c
1109+
#include <stdint.h>
1110+
1111+
static int16_t add( const int16_t x, const int16_t y ) {
1112+
return x + y;
1113+
}
1114+
1115+
// ...
1116+
1117+
// Register a Node-API module:
1118+
STDLIB_MATH_BASE_NAPI_MODULE_KK_K( add );
1119+
```
1120+
1121+
The macro expects the following arguments:
1122+
1123+
- **fcn**: `int16_t (*fcn)( int16_t, int16_t )` binary function.
1124+
1125+
When used, this macro should be used **instead of** `NAPI_MODULE`. The macro includes `NAPI_MODULE`, thus ensuring Node-API module registration.
1126+
1127+
#### stdlib_math_base_napi_kk_k( env, info, fcn )
1128+
1129+
Invokes a binary function accepting and returning signed 16-bit integers.
1130+
1131+
```c
1132+
#include <node_api.h>
1133+
#include <stdint.h>
1134+
1135+
// ...
1136+
1137+
static int16_t add( const int16_t x, const int16_t y ) {
1138+
return x + y;
1139+
}
1140+
1141+
// ...
1142+
1143+
/**
1144+
* Receives JavaScript callback invocation data.
1145+
*
1146+
* @param env environment under which the function is invoked
1147+
* @param info callback data
1148+
* @return Node-API value
1149+
*/
1150+
napi_value addon( napi_env env, napi_callback_info info ) {
1151+
return stdlib_math_base_napi_kk_k( env, info, add );
1152+
}
1153+
1154+
// ...
1155+
```
1156+
1157+
The function accepts the following arguments:
1158+
1159+
- **env**: `[in] napi_env` environment under which the function is invoked.
1160+
- **info**: `[in] napi_callback_info` callback data.
1161+
- **fcn**: `[in] int16_t (*fcn)( int16_t, int16_t )` binary function.
1162+
1163+
```c
1164+
void stdlib_math_base_napi_kk_k( napi_env env, napi_callback_info info, int16_t (*fcn)( int16_t, int16_t ) );
1165+
```
1166+
10411167
#### STDLIB_MATH_BASE_NAPI_MODULE_LL_D( fcn )
10421168
10431169
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting signed 64-bit integers and returning a double-precision floating-point number.
@@ -1101,6 +1227,195 @@ The function accepts the following arguments:
11011227
void stdlib_math_base_napi_ll_d( napi_env env, napi_callback_info info, double (*fcn)( int64_t, int64_t ) );
11021228
```
11031229

1230+
#### STDLIB_MATH_BASE_NAPI_MODULE_SS_S( fcn )
1231+
1232+
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning signed 8-bit integers.
1233+
1234+
```c
1235+
#include <stdint.h>
1236+
1237+
static int8_t add( const int8_t x, const int8_t y ) {
1238+
return x + y;
1239+
}
1240+
1241+
// ...
1242+
1243+
// Register a Node-API module:
1244+
STDLIB_MATH_BASE_NAPI_MODULE_SS_S( add );
1245+
```
1246+
1247+
The macro expects the following arguments:
1248+
1249+
- **fcn**: `int8_t (*fcn)( int8_t, int8_t )` binary function.
1250+
1251+
When used, this macro should be used **instead of** `NAPI_MODULE`. The macro includes `NAPI_MODULE`, thus ensuring Node-API module registration.
1252+
1253+
#### stdlib_math_base_napi_ss_s( env, info, fcn )
1254+
1255+
Invokes a binary function accepting and returning signed 8-bit integers.
1256+
1257+
```c
1258+
#include <node_api.h>
1259+
#include <stdint.h>
1260+
1261+
// ...
1262+
1263+
static int8_t add( const int8_t x, const int8_t y ) {
1264+
return x + y;
1265+
}
1266+
1267+
// ...
1268+
1269+
/**
1270+
* Receives JavaScript callback invocation data.
1271+
*
1272+
* @param env environment under which the function is invoked
1273+
* @param info callback data
1274+
* @return Node-API value
1275+
*/
1276+
napi_value addon( napi_env env, napi_callback_info info ) {
1277+
return stdlib_math_base_napi_ss_s( env, info, add );
1278+
}
1279+
1280+
// ...
1281+
```
1282+
1283+
The function accepts the following arguments:
1284+
1285+
- **env**: `[in] napi_env` environment under which the function is invoked.
1286+
- **info**: `[in] napi_callback_info` callback data.
1287+
- **fcn**: `[in] int8_t (*fcn)( int8_t, int8_t )` binary function.
1288+
1289+
```c
1290+
void stdlib_math_base_napi_ss_s( napi_env env, napi_callback_info info, int8_t (*fcn)( int8_t, int8_t ) );
1291+
```
1292+
1293+
#### STDLIB_MATH_BASE_NAPI_MODULE_TT_T( fcn )
1294+
1295+
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning unsigned 16-bit integers.
1296+
1297+
```c
1298+
#include <stdint.h>
1299+
1300+
static uint16_t add( const uint16_t x, const uint16_t y ) {
1301+
return x + y;
1302+
}
1303+
1304+
// ...
1305+
1306+
// Register a Node-API module:
1307+
STDLIB_MATH_BASE_NAPI_MODULE_TT_T( add );
1308+
```
1309+
1310+
The macro expects the following arguments:
1311+
1312+
- **fcn**: `uint16_t (*fcn)( uint16_t, uint16_t )` binary function.
1313+
1314+
When used, this macro should be used **instead of** `NAPI_MODULE`. The macro includes `NAPI_MODULE`, thus ensuring Node-API module registration.
1315+
1316+
#### stdlib_math_base_napi_tt_t( env, info, fcn )
1317+
1318+
Invokes a binary function accepting and returning unsigned 16-bit integers.
1319+
1320+
```c
1321+
#include <node_api.h>
1322+
#include <stdint.h>
1323+
1324+
// ...
1325+
1326+
static uint16_t add( const uint16_t x, const uint16_t y ) {
1327+
return x + y;
1328+
}
1329+
1330+
// ...
1331+
1332+
/**
1333+
* Receives JavaScript callback invocation data.
1334+
*
1335+
* @param env environment under which the function is invoked
1336+
* @param info callback data
1337+
* @return Node-API value
1338+
*/
1339+
napi_value addon( napi_env env, napi_callback_info info ) {
1340+
return stdlib_math_base_napi_tt_t( env, info, add );
1341+
}
1342+
1343+
// ...
1344+
```
1345+
1346+
The function accepts the following arguments:
1347+
1348+
- **env**: `[in] napi_env` environment under which the function is invoked.
1349+
- **info**: `[in] napi_callback_info` callback data.
1350+
- **fcn**: `[in] uint16_t (*fcn)( uint16_t, uint16_t )` binary function.
1351+
1352+
```c
1353+
void stdlib_math_base_napi_tt_t( napi_env env, napi_callback_info info, uint16_t (*fcn)( uint16_t, uint16_t ) );
1354+
```
1355+
1356+
#### STDLIB_MATH_BASE_NAPI_MODULE_UU_U( fcn )
1357+
1358+
Macro for registering a Node-API module exporting an interface for invoking a binary function accepting and returning unsigned 32-bit integers.
1359+
1360+
```c
1361+
#include <stdint.h>
1362+
1363+
static uint32_t add( const uint32_t x, const uint32_t y ) {
1364+
return x + y;
1365+
}
1366+
1367+
// ...
1368+
1369+
// Register a Node-API module:
1370+
STDLIB_MATH_BASE_NAPI_MODULE_UU_U( add );
1371+
```
1372+
1373+
The macro expects the following arguments:
1374+
1375+
- **fcn**: `uint32_t (*fcn)( uint32_t, uint32_t )` binary function.
1376+
1377+
When used, this macro should be used **instead of** `NAPI_MODULE`. The macro includes `NAPI_MODULE`, thus ensuring Node-API module registration.
1378+
1379+
#### stdlib_math_base_napi_uu_u( env, info, fcn )
1380+
1381+
Invokes a binary function accepting and returning unsigned 32-bit integers.
1382+
1383+
```c
1384+
#include <node_api.h>
1385+
#include <stdint.h>
1386+
1387+
// ...
1388+
1389+
static uint32_t add( const uint32_t x, const uint32_t y ) {
1390+
return x + y;
1391+
}
1392+
1393+
// ...
1394+
1395+
/**
1396+
* Receives JavaScript callback invocation data.
1397+
*
1398+
* @param env environment under which the function is invoked
1399+
* @param info callback data
1400+
* @return Node-API value
1401+
*/
1402+
napi_value addon( napi_env env, napi_callback_info info ) {
1403+
return stdlib_math_base_napi_uu_u( env, info, add );
1404+
}
1405+
1406+
// ...
1407+
```
1408+
1409+
The function accepts the following arguments:
1410+
1411+
- **env**: `[in] napi_env` environment under which the function is invoked.
1412+
- **info**: `[in] napi_callback_info` callback data.
1413+
- **fcn**: `[in] uint32_t (*fcn)( uint32_t, uint32_t )` binary function.
1414+
1415+
```c
1416+
void stdlib_math_base_napi_uu_u( napi_env env, napi_callback_info info, uint32_t (*fcn)( uint32_t, uint32_t ) );
1417+
```
1418+
11041419
#### STDLIB_MATH_BASE_NAPI_MODULE_ZD_Z( fcn )
11051420
11061421
Macro for registering a Node-API module exporting an interface invoking a binary function accepting a double-precision complex floating-point number and a double-precision floating-point number and returning a double-precision complex floating-point number.

base/napi/binary/include/stdlib/math/base/napi/binary.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#define STDLIB_MATH_BASE_NAPI_BINARY_H
2121

2222
// NOTE: please keep in alphabetical order...
23+
#include "stdlib/math/base/napi/binary/bb_b.h"
2324
#include "stdlib/math/base/napi/binary/cc_c.h"
2425
#include "stdlib/math/base/napi/binary/cf_c.h"
2526
#include "stdlib/math/base/napi/binary/ci_c.h"
@@ -33,7 +34,11 @@
3334
#include "stdlib/math/base/napi/binary/ii_d.h"
3435
#include "stdlib/math/base/napi/binary/ii_f.h"
3536
#include "stdlib/math/base/napi/binary/ii_i.h"
37+
#include "stdlib/math/base/napi/binary/kk_k.h"
3638
#include "stdlib/math/base/napi/binary/ll_d.h"
39+
#include "stdlib/math/base/napi/binary/ss_s.h"
40+
#include "stdlib/math/base/napi/binary/tt_t.h"
41+
#include "stdlib/math/base/napi/binary/uu_u.h"
3742
#include "stdlib/math/base/napi/binary/zd_z.h"
3843
#include "stdlib/math/base/napi/binary/zi_z.h"
3944
#include "stdlib/math/base/napi/binary/zz_z.h"

0 commit comments

Comments
 (0)