Sophie

Sophie

distrib > Mageia > 7 > x86_64 > media > nonfree-updates > by-pkgid > b86a85131cc739c1c53d0b55840a4328 > files > 3361

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.nonfree.x86_64.rpm

<!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.5"/>
<title>NVIDIA 2D Image And Signal Performance Primitives (NPP): Signal-Processing Specific API Conventions</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="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">NVIDIA 2D Image And Signal Performance Primitives (NPP)
   &#160;<span id="projectnumber">Version 10.1.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<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 class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</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>
<!-- 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>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</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><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Signal-Processing Specific API Conventions </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="passing_signal_data"></a>
Signal Data</h1>
<p>Signal data is passed to and from NPPS primitives via a pointer to the signal's data type.</p>
<p>The general idea behind this fairly low-level way of passing signal data is ease-of-adoption into existing software projects:</p>
<ul>
<li>Passing the data pointer rather than a higher- level signal struct allows for easy adoption by not requiring a specific signal representation (that could include total signal size offset, or other additional information). This avoids awkward packing and unpacking of signal data from the host application to an NPP specific signal representation.</li>
</ul>
<h2><a class="anchor" id="signal_data_parameter_names"></a>
Parameter Names for Signal Data</h2>
<p>There are three general cases of image-data passing throughout NPP detailed in the following sections.</p>
<p>Those are signals consumed by the algorithm.</p>
<h3><a class="anchor" id="source_signal_pointer"></a>
Source Signal Pointer</h3>
<p>The source signal data is generally passed via a pointer named </p>
<div class="fragment"><div class="line">pSrc </div>
</div><!-- fragment --><p> The source signal pointer is generally defined constant, enforcing that the primitive does not change any image data pointed to by that pointer. E.g. </p>
<div class="fragment"><div class="line">nppsPrimitive_32s(<span class="keyword">const</span> <a class="code" href="group__npp__basic__types.html#gafa3572058d57d93e2e5ebb9b21fbedb3">Npp32s</a> * pSrc, ...) </div>
</div><!-- fragment --><p> In case the primitive consumes multiple signals as inputs the source pointers are numbered like this: </p>
<div class="fragment"><div class="line">pSrc1, pScr2, ... </div>
</div><!-- fragment --><h3><a class="anchor" id="destination_signal_pointer"></a>
Destination Signal Pointer</h3>
<p>The destination signal data is generally passed via a pointer named </p>
<div class="fragment"><div class="line">pDst </div>
</div><!-- fragment --><p> In case the primitive consumes multiple signals as inputs the source pointers are numbered like this: </p>
<div class="fragment"><div class="line">pDst1, pDst2, ... </div>
</div><!-- fragment --><h3><a class="anchor" id="in_place_signal_pointer"></a>
In-Place Signal Pointer</h3>
<p>In the case of in-place processing, source and destination are served by the same pointer and thus pointers to in-place signal data are called: </p>
<div class="fragment"><div class="line">pSrcDst </div>
</div><!-- fragment --><h2><a class="anchor" id="signal_data_alignment"></a>
Signal Data Alignment Requirements</h2>
<p>NPP requires signal sample data to be naturally aligned, i.e. any pointer </p>
<div class="fragment"><div class="line">NppType * p; </div>
</div><!-- fragment --><p> to a sample in a signal needs to fulfill: </p>
<div class="fragment"><div class="line">assert(p % <span class="keyword">sizeof</span>(p) == 0); </div>
</div><!-- fragment --><h2><a class="anchor" id="signal_data_error_codes"></a>
Signal Data Related Error Codes</h2>
<p>All NPPI primitives operating on signal data validate the signal-data pointer for proper alignment and test that the point is not null.</p>
<p>Failed validation results in one of the following error codes being returned and the primitive not being executed:</p>
<ul>
<li><a class="el" href="group__typedefs__npp.html#gga1105a17b5e76381583c46ecd6a60fe21a524a376b3d44c458b474613fb0dc8e1a">NPP_NULL_POINTER_ERROR</a> is returned if the image-data pointer is 0 (NULL).</li>
<li><a class="el" href="group__typedefs__npp.html#gga1105a17b5e76381583c46ecd6a60fe21ab1b34e6935a87a4f0018e783ad86cf1b">NPP_ALIGNMENT_ERROR</a> if the signal-data pointer address is not a multiple of the signal's data-type size.</li>
</ul>
<h1><a class="anchor" id="length_specification"></a>
Signal Length</h1>
<p>The vast majority of NPPS functions take a </p>
<div class="fragment"><div class="line">nLength </div>
</div><!-- fragment --><p> parameter that tells the primitive how many of the signal's samples starting from the given data pointer are to be processed.</p>
<h2><a class="anchor" id="length_error_codes"></a>
Length Related Error Codes</h2>
<p>All NPPS primitives taking a length parameter validate this input.</p>
<p>Failed validation results in the following error code being returned and the primitive not being executed:</p>
<ul>
<li><a class="el" href="group__typedefs__npp.html#gga1105a17b5e76381583c46ecd6a60fe21a63297527390b522fa2b47a4d82f71b4b">NPP_SIZE_ERROR</a> is returned if the length is negative. </li>
</ul>
</div></div><!-- contents -->
<HR>
<center>Copyright &copy; 2009-2019 NVIDIA Corporation</center>
<HR>