2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-27 19:02:12 +00:00
Files
gil/develop/doc/html/reference/group___s_t_l_optimizations.html

179 lines
14 KiB
HTML

<!-- Copyright 2008 Lubomir Bourdev and Hailin Jin
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
-->
<!--
Copyright 2005-2007 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
Some files are held under additional license.
Please see "http://stlab.adobe.com/licenses.html" for more information.
-->
<!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" lang="en" xml:lang="en">
<head>
<TITLE>Performance overloads of STL algorithms</TITLE>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=ISO-8859-1"/>
<link type="text/css" rel="stylesheet" href="../_static/style.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div class="header">
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary="header">
<tr>
<td valign="top" width="300">
<h3><a href="../index.html"><img
alt="Boost GIL" src="../_static/gil.png" border="0"></a></h3>
</td>
<td >
<h1 align="center"><a href="../index.html"></a></h1>
</td>
<td>
</td>
</tr>
</table>
</div>
<hr/>
<table border="0" cellspacing="0" cellpadding="0" style='width: 100%; margin: 0; padding: 0'><tr>
<td width="100%" valign="top" style='padding-left: 10px; padding-right: 10px; padding-bottom: 10px'>
<div class="qindex"><a class="qindex" href="index.html">Modules</a>
| <a class="qindex" href="classes.html">Alphabetical List</a>
| <a class="qindex" href="annotated.html">Class List</a>
</div>
<!-- End Header -->
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Performance overloads of STL algorithms<div class="ingroups"><a class="el" href="group___image_view_algorithm.html">Algorithms and Utility Functions</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>overloads of STL algorithms allowing more efficient implementation when used with GIL constructs
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0881964a0319aa859cda6408c5a1cda2"><td class="memTemplParams" colspan="2"><a class="anchor" id="ga0881964a0319aa859cda6408c5a1cda2"></a>
template&lt;typename T , typename Cs &gt; </td></tr>
<tr class="memitem:ga0881964a0319aa859cda6408c5a1cda2"><td class="memTemplItemLeft" align="right" valign="top">BOOST_FORCEINLINE <br class="typebreak"/>
<a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___s_t_l_optimizations.html#ga0881964a0319aa859cda6408c5a1cda2">copy</a> (<a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *first, <a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *last, <a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *dst)</td></tr>
<tr class="memdesc:ga0881964a0319aa859cda6408c5a1cda2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy when both src and dst are interleaved and of the same type can be just memmove. <br/></td></tr>
<tr class="separator:ga0881964a0319aa859cda6408c5a1cda2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad113121390f9788a726bc0c12da2d116"><td class="memTemplParams" colspan="2"><a class="anchor" id="gad113121390f9788a726bc0c12da2d116"></a>
template&lt;typename T , typename Cs &gt; </td></tr>
<tr class="memitem:gad113121390f9788a726bc0c12da2d116"><td class="memTemplItemLeft" align="right" valign="top">BOOST_FORCEINLINE <br class="typebreak"/>
<a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___s_t_l_optimizations.html#gad113121390f9788a726bc0c12da2d116">copy</a> (const <a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *first, const <a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *last, <a class="el" href="structboost_1_1gil_1_1pixel.html">boost::gil::pixel</a>&lt; T, Cs &gt; *dst)</td></tr>
<tr class="memdesc:gad113121390f9788a726bc0c12da2d116"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy when both src and dst are interleaved and of the same type can be just memmove. <br/></td></tr>
<tr class="separator:gad113121390f9788a726bc0c12da2d116"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac27cfe7547df057c1f59f509e3ee486f"><td class="memTemplParams" colspan="2"><a class="anchor" id="gac27cfe7547df057c1f59f509e3ee486f"></a>
template&lt;typename Cs , typename IC1 , typename IC2 &gt; </td></tr>
<tr class="memitem:gac27cfe7547df057c1f59f509e3ee486f"><td class="memTemplItemLeft" align="right" valign="top">BOOST_FORCEINLINE <br class="typebreak"/>
<a class="el" href="structboost_1_1gil_1_1planar__pixel__iterator.html">boost::gil::planar_pixel_iterator</a><br class="typebreak"/>
&lt; IC2, Cs &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___s_t_l_optimizations.html#gac27cfe7547df057c1f59f509e3ee486f">copy</a> (<a class="el" href="structboost_1_1gil_1_1planar__pixel__iterator.html">boost::gil::planar_pixel_iterator</a>&lt; IC1, Cs &gt; first, <a class="el" href="structboost_1_1gil_1_1planar__pixel__iterator.html">boost::gil::planar_pixel_iterator</a>&lt; IC1, Cs &gt; last, <a class="el" href="structboost_1_1gil_1_1planar__pixel__iterator.html">boost::gil::planar_pixel_iterator</a>&lt; IC2, Cs &gt; dst)</td></tr>
<tr class="memdesc:gac27cfe7547df057c1f59f509e3ee486f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy when both src and dst are planar pointers is copy for each channel. <br/></td></tr>
<tr class="separator:gac27cfe7547df057c1f59f509e3ee486f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5aa989f3992b09c1f2d00eb9a98cbf1f"><td class="memTemplParams" colspan="2"><a class="anchor" id="ga5aa989f3992b09c1f2d00eb9a98cbf1f"></a>
template&lt;typename IL , typename OL &gt; </td></tr>
<tr class="memitem:ga5aa989f3992b09c1f2d00eb9a98cbf1f"><td class="memTemplItemLeft" align="right" valign="top">BOOST_FORCEINLINE <br class="typebreak"/>
<a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a><br class="typebreak"/>
&lt; OL &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___s_t_l_optimizations.html#ga5aa989f3992b09c1f2d00eb9a98cbf1f">copy1</a> (<a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; IL &gt; first, <a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; IL &gt; last, <a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; OL &gt; dst)</td></tr>
<tr class="memdesc:ga5aa989f3992b09c1f2d00eb9a98cbf1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">std::copy(I1,I1,I2) with I1 and I2 being a iterator_from_2d <br/></td></tr>
<tr class="separator:ga5aa989f3992b09c1f2d00eb9a98cbf1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab999be608ae006f1127b8bb5145a227"><td class="memTemplParams" colspan="2">template&lt;typename IL , typename V &gt; </td></tr>
<tr class="memitem:gaab999be608ae006f1127b8bb5145a227"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___s_t_l_optimizations.html#gaab999be608ae006f1127b8bb5145a227">fill</a> (<a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; IL &gt; first, <a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; IL &gt; last, const V &amp;val)</td></tr>
<tr class="memdesc:gaab999be608ae006f1127b8bb5145a227"><td class="mdescLeft">&#160;</td><td class="mdescRight">std::fill(I,I,V) with I being a iterator_from_2d <a href="#gaab999be608ae006f1127b8bb5145a227">More...</a><br/></td></tr>
<tr class="separator:gaab999be608ae006f1127b8bb5145a227"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2902a23650ef266e80874ce5df076079"><td class="memTemplParams" colspan="2">template&lt;typename Loc1 , typename Loc2 &gt; </td></tr>
<tr class="memitem:ga2902a23650ef266e80874ce5df076079"><td class="memTemplItemLeft" align="right" valign="top">BOOST_FORCEINLINE bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___s_t_l_optimizations.html#ga2902a23650ef266e80874ce5df076079">equal</a> (<a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; Loc1 &gt; first, <a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; Loc1 &gt; last, <a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; Loc2 &gt; first2)</td></tr>
<tr class="memdesc:ga2902a23650ef266e80874ce5df076079"><td class="mdescLeft">&#160;</td><td class="mdescRight">std::equal(I1,I1,I2) with I1 and I2 being a iterator_from_2d <a href="#ga2902a23650ef266e80874ce5df076079">More...</a><br/></td></tr>
<tr class="separator:ga2902a23650ef266e80874ce5df076079"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>overloads of STL algorithms allowing more efficient implementation when used with GIL constructs </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga2902a23650ef266e80874ce5df076079"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_FORCEINLINE bool std::equal </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; Loc1 &gt;&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; Loc1 &gt;&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; Loc2 &gt;&#160;</td>
<td class="paramname"><em>first2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>std::equal(I1,I1,I2) with I1 and I2 being a iterator_from_2d </p>
<p>Invoked when one calls std::equal(I1,I1,I2) with I1 and I2 being a iterator_from_2d (which is a 1D iterator over the pixels in an image). Attempts to demote the source and destination iterators to simpler/faster types if the corresponding range is contiguous. For contiguous images (i.e. images that have no alignment gap at the end of each row) it is more efficient to use the underlying pixel iterator that does not check for the end of rows. If the underlying pixel iterator happens to be a fundamental planar/interleaved pointer, the call may further resolve to memcmp. Otherwise it resolves to copying each row using the underlying pixel iterator </p>
</div>
</div>
<a class="anchor" id="gaab999be608ae006f1127b8bb5145a227"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void std::fill </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; IL &gt;&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classboost_1_1gil_1_1iterator__from__2d.html">boost::gil::iterator_from_2d</a>&lt; IL &gt;&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const V &amp;&#160;</td>
<td class="paramname"><em>val</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>std::fill(I,I,V) with I being a iterator_from_2d </p>
<p>Invoked when one calls std::fill(I,I,V) with I being a iterator_from_2d (which is a 1D iterator over the pixels in an image). For contiguous images (i.e. images that have no alignment gap at the end of each row) it is more efficient to use the underlying pixel iterator that does not check for the end of rows. For non-contiguous images fill resolves to fill of each row using the underlying pixel iterator, which is still faster </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Mar 26 2018 16:26:16 for Generic Image Library by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>