File: index.xhtml

package info (click to toggle)
sleef 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,564 kB
  • sloc: ansic: 49,154; cpp: 6,095; makefile: 38
file content (319 lines) | stat: -rw-r--r-- 12,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=0.4"/>
<meta name="description" content="SLEEF implements vectorized C99 math functions." />
<meta name="google" content="notranslate" />
<link rel="canonical" href="https://sleef.org/" />
<link rel="icon" href="favicon.png" />
<link rel="stylesheet" type="text/css" href="texlike.css"/>
<link rel="stylesheet" type="text/css" href="sleef.css"/>
<title>SLEEF Vectorized Math Library</title>
</head>
<body translate="no" class="notranslate">
<h1>SLEEF Vectorized Math Library<img src="sleeflogo3.png" alt="logo" width="25%" height="25%" style="float: right" /></h1>

<ul class="none" style="font-family: arial, sansserif; margin-top: 1.0cm;">
  <li><a class="underlined" style="color:#a00000;" href="https://github.com/shibatch/sleef/releases">Download the latest version</a></li>
  <li><a class="underlined" href="https://sleef.org/">Latest documentation on the web</a></li>
  <li><a class="underlined" href="https://github.com/shibatch/sleef">GitHub repository</a></li>
  <li><a class="underlined" href="https://github.com/shibatch/sleef/discussions">Discussions</a></li>
  <li><a class="underlined" href="https://github.com/shibatch/sleef/wiki">Wiki pages</a></li>
</ul>

<h2>Table of contents</h2>

<ul class="none" style="font-family: arial, sansserif; padding-left: 0.5cm;">
  <li><a class="underlined" href="index.xhtml">Introduction</a>
    <ul class="disc">
      <li><a href="index.xhtml#overview">Overview</a></li>
      <li><a href="index.xhtml#environment">Supported environments</a></li>
      <li><a href="index.xhtml#credit">Credit</a></li>
      <li><a href="index.xhtml#license">License</a></li>
      <li><a href="index.xhtml#history">History</a></li>
      <li><a href="index.xhtml#related">Related projects</a></li>
      <li><a href="index.xhtml#publication">Publication</a></li>
    </ul>
  </li>
  <li>&nbsp;</li>
  <li><a class="underlined" href="compile.xhtml">Compiling and installing the library</a></li>
  <li><a class="underlined" href="purec.xhtml">Math library reference</a></li>
  <li><a class="underlined" href="quad.xhtml"> Quad-precision math library reference</a></li>
  <li><a class="underlined" href="dft.xhtml">DFT library reference</a></li>
  <li><a class="underlined" href="misc.xhtml">Other tools included in the package</a></li>
  <li><a class="underlined" href="benchmark.xhtml">Benchmark results</a></li>
  <li><a class="underlined" href="additional.xhtml">Additional notes</a></li>
</ul>

<h2 id="overview">Overview</h2>

<p class="noindent">
  SLEEF stands for SIMD Library for Evaluating Elementary
  Functions. It implements manually <a class="underlined"
  href="https://en.wikipedia.org/wiki/Automatic_vectorization">vectorized</a>
  versions of all C99 real floating point math functions. It can
  utilize SIMD instructions that are available on modern
  processors. SLEEF is designed to effciently perform computation with
  SIMD instructions by reducing the use of conditional branches and
  scatter/gather memory access. Our <a class="underlined"
  href="benchmark.xhtml">benchmarks</a> show that the performance of
  SLEEF is comparable to that of the best commercial library.
</p>

<p>
  Unlike closed-source commercial libraries, which are often
  assembly-optimized, SLEEF is designed to work with various
  architectures, operating systems and compilers. It is distributed
  under <a class="underlined"
  href="http://www.boost.org/users/license.html">the Boost Software
  License</a>, which is a permissive open source license. SLEEF can be
  easily ported to other architectures by writing a helper file, which
  is a thin abstraction layer of SIMD intrinsics. SLEEF also
  provides <a class="underlined"
  href="additional.xhtml#dispatcher">dispatchers</a> that
  automatically choose the best subroutines for the computer on which
  the library is executed. In order to further optimize the
  application code that calls SLEEF functions,
  <a class="underlined" href="additional.xhtml#lto">link time
  optimization(LTO)</a> can be used to reduce the overhead of
  functions calls, and the build system of SLEEF supports usage of
  LTO. The library also has a functionality to generate
  <a class="underlined" href="additional.xhtml#inline">header
  files</a> in which the library functions are all defined as inline
  functions. SLEEF can be used for <a class="underlined"
  href="cuda.xhtml">GPGPU</a> and <a class="underlined"
  href="additional.xhtml#wasm">WebAssembly</a> with these header
  files. In addition to the vectorized functions, SLEEF provides
  scalar functions. Calls to these scalar SLEEF functions can be
  <a class="underlined"
  href="additional.xhtml#vectorizing">auto-vectorized</a> by GCC and
  Clang.
</p>

<p>
  The library contains implementations of all C99 real FP math
  functions in double precision and single precision. Different
  accuracy of the results can be chosen for a subset of the elementary
  functions; for this subset there are versions with up to
  1 <a class="underlined" href="additional.xhtml#ulp">ULP</a> error
  (which is the maximum error, not the average) and even faster
  versions with a few ULPs of error bounds. For non-finite inputs and
  outputs, the functions return correct results as specified in the
  C99 standard. All the functions in the library
  are <a class="underlined" href="misc.xhtml#testerlibm">thoroughly
  tested</a> and confirmed that the evaluation error is within the
  designed limit by comparing the returned values against
  high-precision evaluation using the GNU MPFR Library.
</p>

<p>
  SLEEF also includes a <a class="underlined"
  href="quad.xhtml">quad-precision math library</a>. This library
  includes fully vectorized IEEE 754 quadruple-precision (QP)
  functions that correspond to the standard C math functions. I/O
  functions for converting between QP numbers and strings are also
  available.
</p>

<br/>

<p>
  SLEEF includes a library of <a class="underlined"
  href="dft.xhtml">discrete Fourier transform(DFT)</a>. It is fully
  vectorized, heavily unrolled, and parallelized in such a way that
  modern SIMD instructions and multiple cores can be utilized, and it
  can utilize long vectors up to 2048 bits. It has an API similar to
  that of FFTW for easy migration. The helper files for abstracting
  SIMD intrinsics are shared with SLEEF libm, and thus it is easy to
  port the DFT library to other architectures. <a class="underlined"
  href="benchmark.xhtml#dft">Benchmark results of the DFT library</a>
  are now available.
</p>

<h2 id="environment">Supported environments</h2>

<p class="noindent">
  This library supports the following architectures :
</p>

<div><br/></div>

<ul class="disc">
  <li><a class="underlined" href="x86.xhtml">x86</a> - SSE2, AVX2, AVX512F</li>
  <li>RISC-V - RVV1, RVV2</li>
  <li><a class="underlined" href="ppc64.xhtml">PowerPC64</a> - VSX (POWER8), VSX-3 (POWER9)</li>
  <li><a class="underlined" href="s390x.xhtml">System/390</a> - VXE (z14), VXE2 (z15)</li>
  <li><a class="underlined" href="cuda.xhtml">CUDA</a></li>
  <li><a class="underlined" href="aarch64.xhtml">AArch64</a> - Advanced SIMD, SVE</li>
  <li><a class="underlined" href="additional.xhtml#wasm">WebAssembly</a> - SSE2</li>
</ul>

<div><br/></div>

<p>
  The supported combinations of the architecture, operating system and
  compiler are shown in Table 1.1.
</p>

<div style="margin-top: 1.0cm;"></div>

<table style="text-align:center;" align="center">
  <tr align="center">
    <td class="caption">Table 1.1: Environment support matrix</td>
  </tr>
  <tr align="center">
    <td>
      <table class="lt">
        <tr>
          <td class="lt-hl"></td>
	  <td class="lt-hl"></td>
          <td class="lt-hl"></td>
          <td class="lt-hl"></td>
          <td class="lt-hl"></td>
        </tr>
	<tr>
	  <td class="lt-br"></td>
	  <td class="lt-hl"></td>
	  <td class="lt-blr" align="center">GCC</td>
	  <td class="lt-br" align="center">Clang</td>
	  <td class="lt-b" align="center">MSVC</td>
	</tr>
        <tr>
          <td class="lt-hl"></td>
	  <td class="lt-hl"></td>
	  <td class="lt-hl"></td>
          <td class="lt-hl"></td>
          <td class="lt-hl"></td>
        </tr>
	<tr>
	  <td class="lt-r" align="left">x86_64, Linux</td>
	  <td></td>
	  <td class="lt-lr" align="center">Supported</td>
	  <td class="lt-r" align="center">Experimental</td>
	  <td class="lt-" align="center">N/A</td>
	</tr>
	<tr>
	  <td class="lt-r" align="left">x86_64, Windows</td>
	  <td></td>
	  <td class="lt-lr" align="center">Experimental(Cygwin)</td>
	  <td class="lt-r" align="center">Experimental</td>
	  <td class="lt-" align="center">Supported</td>
	</tr>
	<tr>
	  <td class="lt-r" align="left">RISC-V (64-bit), Linux</td>
	  <td></td>
	  <td class="lt-lr" align="center">Supported</td>
	  <td class="lt-r" align="center">Experimental</td>
	  <td class="lt-" align="center">N/A</td>
	</tr>
	<tr>
	  <td class="lt-r" align="left">PowerPC (64 bit), Linux</td>
	  <td></td>
	  <td class="lt-lr" align="center">Supported</td>
	  <td class="lt-r" align="center">Experimental</td>
	  <td class="lt-" align="center">N/A</td>
	</tr>
	<tr>
	  <td class="lt-r" align="left">System/390 (64 bit), Linux</td>
	  <td></td>
	  <td class="lt-lr" align="center">Supported</td>
	  <td class="lt-r" align="center">Experimental</td>
	  <td class="lt-" align="center">N/A</td>
	</tr>
	<tr>
	  <td class="lt-r" align="left">AArch64, Linux</td>
	  <td></td>
	  <td class="lt-lr" align="center">Supported</td>
	  <td class="lt-r" align="center">Experimental</td>
	  <td class="lt-" align="center">N/A</td>
	</tr>
	<tr>
	  <td class="lt-br" align="left">AArch64, macOS</td>
	  <td class="lt-hl"></td>
	  <td class="lt-blr" align="center">Experimental</td>
	  <td class="lt-br" align="center">Supported</td>
	  <td class="lt-b" align="center">N/A</td>
	</tr>
      </table>
    </td>
  </tr>
</table>

<div style="margin-top: 2.0cm;"></div>

<p>
  Supported compilers are only the latest versions of compilers
  officially used on the OSes. All functions in the library are thread
  safe unless otherwise noted.
</p>
  

<h2 id="credit">Credit</h2>

<ul class="disc">
  <li>The main developer is <a class="underlined"
  href="https://github.com/shibatch">Naoki Shibata</a>
  ( <a href="mailto:shibatch@users.sourceforge.net">shibatch@users.sourceforge.net</a> ).</li>
  <li><a class="underlined"
  href="https://github.com/shibatch/sleef/graphs/contributors">
  And many more contributors you can find listed on GitHub.</a></li>
</ul>

<h2 id="license">License</h2>

<p class="noindent">
SLEEF is distributed under <a class="underlined"
href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License
    Version 1.0</a>.
</p>

<p class="noindent" style="margin-top: 0.8cm;">
  <a class="nothing" href="https://opensource.org/">
    <img src="osi_logo.png" width="90" height="103" alt="open source logo" style="position:relative; top:3px;"/>
  </a>
&nbsp; Boost Software License is <a class="underlined"
href="https://opensource.org/licenses/BSL-1.0">OSI-certified</a>.
See <a class="underlined"
href="http://www.boost.org/users/license.html">this page</a> for more
information about Boost Software License.
</p>

<h2 id="history">History</h2>

<p class="noindent" style="margin-top: 1.0cm;">
See <a class="underlined"
href="https://github.com/shibatch/sleef/blob/master/CHANGELOG.md">Changelog</a>
for a full history of changes to SLEEF.</p>


<h2 id="publication">Publication</h2>

<ul class="disc">
  <li>Naoki Shibata and Francesco Petrogalli : <B>SLEEF: A Portable Vectorized Library of C Standard Mathematical Functions,</B> <I>in IEEE Transactions on Parallel and Distributed Systems,</I> <a class="underlined" href="https://doi.org/10.1109/TPDS.2019.2960333">DOI:10.1109/TPDS.2019.2960333</a> (Dec. 2019). [<a class="underlined" href="https://arxiv.org/pdf/2001.09258">PDF</a>]</li>
</ul>

<p class="footer">
  Copyright &copy; 2010-2025 SLEEF Project, Naoki Shibata and contributors.<br/>
  SLEEF is open-source software and is distributed under the Boost Software License, Version 1.0.
</p>

<script type="text/javascript">
var sc_project=13098265; 
var sc_invisible=1; 
var sc_security="518de45e"; 
</script>
<script type="text/javascript"
src="https://www.statcounter.com/counter/counter.js"
async="async"></script>
<noscript><div class="statcounter"><a title="Web Analytics"
href="https://statcounter.com/" target="_blank"><img
class="statcounter"
src="https://c.statcounter.com/13098265/0/518de45e/1/"
alt="Web Analytics"
referrerPolicy="no-referrer-when-downgrade"></img></a></div></noscript>


</body>
</html>