1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Function template includes</title> 5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Compute"> 8<link rel="up" href="../../boost_compute/reference.html#header.boost.compute.algorithm.includes_hpp" title="Header <boost/compute/algorithm/includes.hpp>"> 9<link rel="prev" href="generate_n.html" title="Function template generate_n"> 10<link rel="next" href="inclusive_scan.html" title="Function inclusive_scan"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="generate_n.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_compute/reference.html#header.boost.compute.algorithm.includes_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="inclusive_scan.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="refentry"> 26<a name="boost.compute.includes"></a><div class="titlepage"></div> 27<div class="refnamediv"> 28<h2><span class="refentrytitle">Function template includes</span></h2> 29<p>boost::compute::includes — Includes algorithm. </p> 30</div> 31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../boost_compute/reference.html#header.boost.compute.algorithm.includes_hpp" title="Header <boost/compute/algorithm/includes.hpp>">boost/compute/algorithm/includes.hpp</a>> 33 34</span> 35<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> InputIterator1<span class="special">,</span> <span class="keyword">typename</span> InputIterator2<span class="special">></span> 36 <span class="keyword">bool</span> <span class="identifier">includes</span><span class="special">(</span><span class="identifier">InputIterator1</span> first1<span class="special">,</span> <span class="identifier">InputIterator1</span> last1<span class="special">,</span> 37 <span class="identifier">InputIterator2</span> first2<span class="special">,</span> <span class="identifier">InputIterator2</span> last2<span class="special">,</span> 38 <span class="identifier">command_queue</span> <span class="special">&</span> queue <span class="special">=</span> <span class="identifier">system</span><span class="special">::</span><span class="identifier">default_queue</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></div> 39<div class="refsect1"> 40<a name="idm45849521708352"></a><h2>Description</h2> 41<p>Finds if the sorted range [first1, last1) includes the sorted range [first2, last2). In other words, it checks if [first1, last1) is a superset of [first2, last2).</p> 42<p> 43 44Space complexity: \Omega(distance(<code class="computeroutput">first1</code>, <code class="computeroutput">last1</code>) + distance(<code class="computeroutput">first2</code>, <code class="computeroutput">last2</code>)) </p> 45<div class="variablelist"><table border="0" class="variablelist compact"> 46<colgroup> 47<col align="left" valign="top"> 48<col> 49</colgroup> 50<tbody> 51<tr> 52<td><p><span class="term">Parameters:</span></p></td> 53<td><div class="variablelist"><table border="0" class="variablelist compact"> 54<colgroup> 55<col align="left" valign="top"> 56<col> 57</colgroup> 58<tbody> 59<tr> 60<td><p><span class="term"><code class="computeroutput">first1</code></span></p></td> 61<td><p>Iterator pointing to start of first set </p></td> 62</tr> 63<tr> 64<td><p><span class="term"><code class="computeroutput">first2</code></span></p></td> 65<td><p>Iterator pointing to start of second set </p></td> 66</tr> 67<tr> 68<td><p><span class="term"><code class="computeroutput">last1</code></span></p></td> 69<td><p>Iterator pointing to end of first set </p></td> 70</tr> 71<tr> 72<td><p><span class="term"><code class="computeroutput">last2</code></span></p></td> 73<td><p>Iterator pointing to end of second set </p></td> 74</tr> 75<tr> 76<td><p><span class="term"><code class="computeroutput">queue</code></span></p></td> 77<td><p>Queue on which to execute</p></td> 78</tr> 79</tbody> 80</table></div></td> 81</tr> 82<tr> 83<td><p><span class="term">Returns:</span></p></td> 84<td><p>True, if [first1, last1) includes [first2, last2). False otherwise.</p></td> 85</tr> 86</tbody> 87</table></div> 88</div> 89</div> 90<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 91<td align="left"></td> 92<td align="right"><div class="copyright-footer">Copyright © 2013, 2014 Kyle Lutz<p> 93 Distributed under the Boost Software License, Version 1.0. (See accompanying 94 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 95 </p> 96</div></td> 97</tr></table> 98<hr> 99<div class="spirit-nav"> 100<a accesskey="p" href="generate_n.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_compute/reference.html#header.boost.compute.algorithm.includes_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="inclusive_scan.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 101</div> 102</body> 103</html> 104