blob: 52b0175f48a608f80b5dd6ed0d76d09eb5e3823c [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Impala: impala::StringSearchSSE 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="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.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 style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Impala
</div>
<div id="projectbrief">Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</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">
$(document).ready(function(){initNavTree('classimpala_1_1StringSearchSSE.html','');});
</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)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classimpala_1_1StringSearchSSE-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">impala::StringSearchSSE Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for impala::StringSearchSSE:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classimpala_1_1StringSearchSSE__coll__graph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aceed3032b366f10f4b95bbdd2ecccc0d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#aceed3032b366f10f4b95bbdd2ecccc0d">StringSearchSSE</a> (const char *needle)</td></tr>
<tr class="separator:aceed3032b366f10f4b95bbdd2ecccc0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac198cd994557789995aa1ef04951788e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#ac198cd994557789995aa1ef04951788e">StringSearchSSE</a> (const <a class="el" href="structimpala_1_1StringValue.html">StringValue</a> *needle)</td></tr>
<tr class="separator:ac198cd994557789995aa1ef04951788e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58a85a02099f8998eb81659e88683905"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#a58a85a02099f8998eb81659e88683905">StringSearchSSE</a> ()</td></tr>
<tr class="separator:a58a85a02099f8998eb81659e88683905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac22795d8ec86eec8604ad078d87c5ab3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#ac22795d8ec86eec8604ad078d87c5ab3">Search</a> (const <a class="el" href="structimpala_1_1StringValue.html">StringValue</a> &amp;haystack) const </td></tr>
<tr class="separator:ac22795d8ec86eec8604ad078d87c5ab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:ac6bb7a0da62ac1ccf66cf8be1918a0c4"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structimpala_1_1StringValue.html">StringValue</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#ac6bb7a0da62ac1ccf66cf8be1918a0c4">needle_str_val_</a></td></tr>
<tr class="memdesc:ac6bb7a0da62ac1ccf66cf8be1918a0c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Only one of these two will be non-null. Both are unowned. <a href="#ac6bb7a0da62ac1ccf66cf8be1918a0c4">More...</a><br/></td></tr>
<tr class="separator:ac6bb7a0da62ac1ccf66cf8be1918a0c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e04f037b0baabf6e7b518a462943ea4"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#a0e04f037b0baabf6e7b518a462943ea4">needle_cstr_</a></td></tr>
<tr class="separator:a0e04f037b0baabf6e7b518a462943ea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf2629647b98b116c9aee3b9e94264e2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StringSearchSSE.html#aaf2629647b98b116c9aee3b9e94264e2">needle_len_</a></td></tr>
<tr class="separator:aaf2629647b98b116c9aee3b9e94264e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>NOTE: Because this modifies the strings in place, you <em>cannot</em> pass it data that was from the data section (e.g. <a class="el" href="classimpala_1_1StringSearchSSE.html">StringSearchSSE</a>(<a class="el" href="structimpala_1_1StringValue.html">StringValue</a>("abcd", 4)); TODO: this is still 25% slower than just calling strstr. Look into why TODO: this cannot be used with data containing nulls (I think) </p>
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00018">18</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aceed3032b366f10f4b95bbdd2ecccc0d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">impala::StringSearchSSE::StringSearchSSE </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>needle</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a search needle for <em>null-terminated strings</em>. This is more efficient for searching and should be used if either the needle already happens to be null terminated or the needle will be reused repeatedly, in which case the copy and null terminate is worth it. The caller owns the memory for the needle. </p>
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00025">25</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
<p>References <a class="el" href="string-search-sse_8h_source.html#l00145">needle_len_</a>.</p>
</div>
</div>
<a class="anchor" id="ac198cd994557789995aa1ef04951788e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">impala::StringSearchSSE::StringSearchSSE </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structimpala_1_1StringValue.html">StringValue</a> *&#160;</td>
<td class="paramname"><em>needle</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a search needle from a non-null terminated string. The caller owns the memory for the needle. </p>
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00032">32</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
<p>References <a class="el" href="string-value_8h_source.html#l00038">impala::StringValue::len</a>, and <a class="el" href="string-search-sse_8h_source.html#l00145">needle_len_</a>.</p>
</div>
</div>
<a class="anchor" id="a58a85a02099f8998eb81659e88683905"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">impala::StringSearchSSE::StringSearchSSE </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00037">37</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac22795d8ec86eec8604ad078d87c5ab3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int impala::StringSearchSSE::Search </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structimpala_1_1StringValue.html">StringValue</a> &amp;&#160;</td>
<td class="paramname"><em>haystack</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Search for needle in haystack. Returns the offset into str if the needle exists Returns -1 if the needle is not found str will be temporarily modified for the duration of the function </p>
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00043">43</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
<p>References <a class="el" href="string-value_8h_source.html#l00038">impala::StringValue::len</a>, <a class="el" href="compiler-util_8h_source.html#l00032">LIKELY</a>, <a class="el" href="string-search-sse_8h_source.html#l00143">needle_cstr_</a>, <a class="el" href="string-search-sse_8h_source.html#l00145">needle_len_</a>, <a class="el" href="string-search-sse_8h_source.html#l00142">needle_str_val_</a>, <a class="el" href="partitioning-throughput-test_8cc_source.html#l00037">offset</a>, <a class="el" href="string-value_8h_source.html#l00037">impala::StringValue::ptr</a>, and <a class="el" href="compiler-util_8h_source.html#l00033">UNLIKELY</a>.</p>
<p>Referenced by <a class="el" href="string-search-benchmark_8cc_source.html#l00097">TestImpalaNonNullTerminated()</a>, <a class="el" href="string-search-benchmark_8cc_source.html#l00079">TestImpalaNullTerminated()</a>, and <a class="el" href="string-search-test_8cc_source.html#l00015">impala::TestSearch()</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a0e04f037b0baabf6e7b518a462943ea4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const char* impala::StringSearchSSE::needle_cstr_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00143">143</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
<p>Referenced by <a class="el" href="string-search-sse_8h_source.html#l00043">Search()</a>.</p>
</div>
</div>
<a class="anchor" id="aaf2629647b98b116c9aee3b9e94264e2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int impala::StringSearchSSE::needle_len_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00145">145</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
<p>Referenced by <a class="el" href="string-search-sse_8h_source.html#l00043">Search()</a>, and <a class="el" href="string-search-sse_8h_source.html#l00025">StringSearchSSE()</a>.</p>
</div>
</div>
<a class="anchor" id="ac6bb7a0da62ac1ccf66cf8be1918a0c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="structimpala_1_1StringValue.html">StringValue</a>* impala::StringSearchSSE::needle_str_val_</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Only one of these two will be non-null. Both are unowned. </p>
<p>Definition at line <a class="el" href="string-search-sse_8h_source.html#l00142">142</a> of file <a class="el" href="string-search-sse_8h_source.html">string-search-sse.h</a>.</p>
<p>Referenced by <a class="el" href="string-search-sse_8h_source.html#l00043">Search()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>be/src/experiments/<a class="el" href="string-search-sse_8h_source.html">string-search-sse.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="namespaceimpala.html">impala</a></li><li class="navelem"><a class="el" href="classimpala_1_1StringSearchSSE.html">StringSearchSSE</a></li>
<li class="footer">Generated on Thu May 7 2015 16:10:48 for Impala by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>