mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
276 lines
14 KiB
HTML
276 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>simdjson: simdjson::implementation Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
|
|
<td id="projectalign">
|
|
<div id="projectname">simdjson<span id="projectnumber"> 4.6.4</span>
|
|
</div>
|
|
<div id="projectbrief">Ridiculously Fast JSON</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.8 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function(){initNavTree('classsimdjson_1_1implementation.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classsimdjson_1_1implementation-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">simdjson::implementation Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>An implementation of simdjson for a particular CPU architecture.
|
|
<a href="classsimdjson_1_1implementation.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="implementation_8h_source.html">implementation.h</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:aa1d1e04f5471283ab9b2071ea36adf00" id="r_aa1d1e04f5471283ab9b2071ea36adf00"><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1implementation.html#aa1d1e04f5471283ab9b2071ea36adf00">name</a> () const</td></tr>
|
|
<tr class="memdesc:aa1d1e04f5471283ab9b2071ea36adf00"><td class="mdescLeft"> </td><td class="mdescRight">The name of this implementation. <br /></td></tr>
|
|
<tr class="separator:aa1d1e04f5471283ab9b2071ea36adf00"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab170b9fed9cab0daaff878472f339c40" id="r_ab170b9fed9cab0daaff878472f339c40"><td class="memItemLeft" align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1implementation.html#ab170b9fed9cab0daaff878472f339c40">description</a> () const</td></tr>
|
|
<tr class="memdesc:ab170b9fed9cab0daaff878472f339c40"><td class="mdescLeft"> </td><td class="mdescRight">The description of this implementation. <br /></td></tr>
|
|
<tr class="separator:ab170b9fed9cab0daaff878472f339c40"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adf77c9bc0869eff8fd46e942c4532135" id="r_adf77c9bc0869eff8fd46e942c4532135"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1implementation.html#adf77c9bc0869eff8fd46e942c4532135">supported_by_runtime_system</a> () const</td></tr>
|
|
<tr class="memdesc:adf77c9bc0869eff8fd46e942c4532135"><td class="mdescLeft"> </td><td class="mdescRight">The instruction sets this implementation is compiled against and the current CPU match. <br /></td></tr>
|
|
<tr class="separator:adf77c9bc0869eff8fd46e942c4532135"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa3a7b818d56a54cca272191ec176f8f1" id="r_aa3a7b818d56a54cca272191ec176f8f1"><td class="memItemLeft" align="right" valign="top">virtual simdjson_warn_unused bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1implementation.html#aa3a7b818d56a54cca272191ec176f8f1">validate_utf8</a> (const char *buf, size_t len) const noexcept=0</td></tr>
|
|
<tr class="memdesc:aa3a7b818d56a54cca272191ec176f8f1"><td class="mdescLeft"> </td><td class="mdescRight">Validate the UTF-8 string. <br /></td></tr>
|
|
<tr class="separator:aa3a7b818d56a54cca272191ec176f8f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>An implementation of simdjson for a particular CPU architecture. </p>
|
|
<p>Also used to maintain the currently active implementation. The active implementation is automatically initialized on first use to the most advanced implementation supported by the host. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="implementation_8h_source.html#l00045">45</a> of file <a class="el" href="implementation_8h_source.html">implementation.h</a>.</p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="ab170b9fed9cab0daaff878472f339c40" name="ab170b9fed9cab0daaff878472f339c40"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab170b9fed9cab0daaff878472f339c40">◆ </a></span>description()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual std::string simdjson::implementation::description </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The description of this implementation. </p>
|
|
<pre class="fragment">const implementation *impl = simdjson::get_active_implementation();
|
|
cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
|
|
</pre> <dl class="section return"><dt>Returns</dt><dd>the description of the implementation, e.g. "Intel/AMD AVX2", "Intel/AMD SSE4.2", "ARM NEON". </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="implementation_8h_source.html#l00066">66</a> of file <a class="el" href="implementation_8h_source.html">implementation.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa1d1e04f5471283ab9b2071ea36adf00" name="aa1d1e04f5471283ab9b2071ea36adf00"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa1d1e04f5471283ab9b2071ea36adf00">◆ </a></span>name()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual std::string simdjson::implementation::name </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The name of this implementation. </p>
|
|
<pre class="fragment">const implementation *impl = simdjson::get_active_implementation();
|
|
cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
|
|
</pre> <dl class="section return"><dt>Returns</dt><dd>the name of the implementation, e.g. "haswell", "westmere", "arm64". </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="implementation_8h_source.html#l00056">56</a> of file <a class="el" href="implementation_8h_source.html">implementation.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adf77c9bc0869eff8fd46e942c4532135" name="adf77c9bc0869eff8fd46e942c4532135"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adf77c9bc0869eff8fd46e942c4532135">◆ </a></span>supported_by_runtime_system()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool simdjson::implementation::supported_by_runtime_system </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The instruction sets this implementation is compiled against and the current CPU match. </p>
|
|
<p>This function may poll the current CPU/system and should therefore not be called too often if performance is a concern.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if the implementation can be safely used on the current system (determined at runtime). </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa3a7b818d56a54cca272191ec176f8f1" name="aa3a7b818d56a54cca272191ec176f8f1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa3a7b818d56a54cca272191ec176f8f1">◆ </a></span>validate_utf8()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual simdjson_warn_unused bool simdjson::implementation::validate_utf8 </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"><em>buf</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>len</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Validate the UTF-8 string. </p>
|
|
<p>Overridden by each implementation.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">buf</td><td>the string to validate. </td></tr>
|
|
<tr><td class="paramname">len</td><td>the length of the string in bytes. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>true if and only if the string is valid UTF-8. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>include/simdjson/<a class="el" href="implementation_8h_source.html">implementation.h</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespacesimdjson.html">simdjson</a></li><li class="navelem"><a class="el" href="classsimdjson_1_1implementation.html">implementation</a></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|