README.md (7447B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2020 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # Strided Array Native Add-ons 22 23 > C APIs for creating Node-API strided array native add-ons. 24 25 <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> 26 27 <section class="intro"> 28 29 This package exposes an absolute file path for the directory containing header files for various C APIs. The various C APIs facilitate the creation of Node-API strided array native add-ons. 30 31 </section> 32 33 <!-- /.intro --> 34 35 <!-- Package usage documentation. --> 36 37 <section class="usage"> 38 39 ## Usage 40 41 ```javascript 42 var headerDir = require( '@stdlib/strided/napi' ); 43 ``` 44 45 #### headerDir 46 47 Absolute file path for the directory containing header files for C APIs. 48 49 ```javascript 50 var dir = headerDir; 51 // returns <string> 52 ``` 53 54 </section> 55 56 <!-- /.usage --> 57 58 <!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> 59 60 <section class="notes"> 61 62 </section> 63 64 <!-- /.notes --> 65 66 <!-- Package usage examples. --> 67 68 <section class="examples"> 69 70 ## Examples 71 72 ```javascript 73 var headerDir = require( '@stdlib/strided/napi' ); 74 75 console.log( headerDir ); 76 // => <string> 77 ``` 78 79 </section> 80 81 <!-- /.examples --> 82 83 <!-- C interface documentation. --> 84 85 * * * 86 87 <section class="c"> 88 89 ## C APIs 90 91 <!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> 92 93 <section class="intro"> 94 95 This package exposes various C APIs to facilitate the creation of Node-API strided array native add-ons. The included C APIs are the APIs implemented in the following packages: 96 97 <!-- NOTE: please keep in alphabetical order --> 98 99 - [`@stdlib/strided/base/binary`][@stdlib/strided/base/binary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/binary`][@stdlib/strided/base/binary 100 - [`@stdlib/strided/base/dmap`][@stdlib/strided/base/dmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/dmap`][@stdlib/strided/base/dmap 101 - [`@stdlib/strided/base/dmskmap`][@stdlib/strided/base/dmskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/dmskmap`][@stdlib/strided/base/dmskmap 102 - [`@stdlib/strided/base/function-object`][@stdlib/strided/base/function-object]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/function-object`][@stdlib/strided/base/function-object 103 - [`@stdlib/strided/base/mskunary`][@stdlib/strided/base/mskunary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/mskunary`][@stdlib/strided/base/mskunary 104 - [`@stdlib/strided/base/smap`][@stdlib/strided/base/smap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/smap`][@stdlib/strided/base/smap 105 - [`@stdlib/strided/base/smskmap`][@stdlib/strided/base/smskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/smskmap`][@stdlib/strided/base/smskmap 106 - [`@stdlib/strided/base/unary`][@stdlib/strided/base/unary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/unary`][@stdlib/strided/base/unary 107 - [`@stdlib/strided/dtypes`][@stdlib/strided/dtypes]: https://www.npmjs.com/package/@stdlib/strided/tree/main/dtypes`][@stdlib/strided/dtypes 108 - [`@stdlib/strided/napi/dmap`][@stdlib/strided/napi/dmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/dmap`][@stdlib/strided/napi/dmap 109 - [`@stdlib/strided/napi/dmskmap`][@stdlib/strided/napi/dmskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/dmskmap`][@stdlib/strided/napi/dmskmap 110 - [`@stdlib/strided/napi/mskunary`][@stdlib/strided/napi/mskunary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/mskunary`][@stdlib/strided/napi/mskunary 111 - [`@stdlib/strided/napi/smap`][@stdlib/strided/napi/smap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/smap`][@stdlib/strided/napi/smap 112 - [`@stdlib/strided/napi/smskmap`][@stdlib/strided/napi/smskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/smskmap`][@stdlib/strided/napi/smskmap 113 - [`@stdlib/strided/napi/unary`][@stdlib/strided/napi/unary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/unary`][@stdlib/strided/napi/unary 114 115 For API documentation, consult the individual packages. 116 117 </section> 118 119 <!-- /.intro --> 120 121 <!-- C usage documentation. --> 122 123 <section class="usage"> 124 125 ### Usage 126 127 ```c 128 #include "stdlib/strided/napi.h" 129 ``` 130 131 </section> 132 133 <!-- /.usage --> 134 135 <!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> 136 137 <section class="notes"> 138 139 </section> 140 141 <!-- /.notes --> 142 143 <!-- C API usage examples. --> 144 145 <section class="examples"> 146 147 ### Examples 148 149 ```c 150 #include "stdlib/strided/napi.h" 151 152 static double identity( const double x ) { 153 return x; 154 } 155 156 STDLIB_STRIDED_NAPI_MODULE_DMAP( identity ) 157 ``` 158 159 </section> 160 161 <!-- /.examples --> 162 163 </section> 164 165 <!-- /.c --> 166 167 <!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> 168 169 <section class="references"> 170 171 </section> 172 173 <!-- /.references --> 174 175 <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> 176 177 <section class="links"> 178 179 [@stdlib/strided/base/binary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/binary 180 181 [@stdlib/strided/base/dmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/dmap 182 183 [@stdlib/strided/base/dmskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/dmskmap 184 185 [@stdlib/strided/base/function-object]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/function-object 186 187 [@stdlib/strided/base/mskunary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/mskunary 188 189 [@stdlib/strided/base/smap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/smap 190 191 [@stdlib/strided/base/smskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/smskmap 192 193 [@stdlib/strided/base/unary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/unary 194 195 [@stdlib/strided/dtypes]: https://www.npmjs.com/package/@stdlib/strided/tree/main/dtypes 196 197 [@stdlib/strided/napi/dmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/dmap 198 199 [@stdlib/strided/napi/dmskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/dmskmap 200 201 [@stdlib/strided/napi/mskunary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/mskunary 202 203 [@stdlib/strided/napi/smap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/smap 204 205 [@stdlib/strided/napi/smskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/smskmap 206 207 [@stdlib/strided/napi/unary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/napi/unary 208 209 </section> 210 211 <!-- /.links -->