@@ -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
111174Macro 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:
10381101void 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
10431169Macro 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:
11011227void 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
11061421Macro 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.
0 commit comments