<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Thanks very much, now I in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051984#M50400</link>
    <description>&lt;P&gt;Thanks very much, now I understand the whole code. what a weird way of programming....&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2015 08:34:06 GMT</pubDate>
    <dc:creator>Gilad_D_Intel</dc:creator>
    <dc:date>2015-11-07T08:34:06Z</dc:date>
    <item>
      <title>Image processing average filter sample code</title>
      <link>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051980#M50396</link>
      <description>&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 17.7273px; background-color: rgb(244, 234, 234);"&gt;The following code is taken from&amp;nbsp;&lt;A href="https://software.intel.com/en-us/code-samples/intel-c-compiler/application-domains/finance/averaging-filter" rel="nofollow" style="border: 0px; cursor: pointer; color: rgb(12, 101, 165);"&gt;https://software.intel.com/en-us/code-samples/intel-c-compiler/application-domains/finance/averaging-filter&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;
	here is the serial code which is not hard to explain&lt;/P&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 17.7273px; background-color: rgb(244, 234, 234);"&gt;&lt;STRONG style="margin: 0px; padding: 0px; border: 0px;"&gt;Linear Version of the code&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="lang-cpp prettyprint prettyprinted" style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: rgb(57, 51, 24); word-wrap: normal; background-color: rgb(238, 238, 238);"&gt;&lt;CODE style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;h&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;++)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
    &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; x &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;((&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;resized_width &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
    &lt;/SPAN&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; x&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;x &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; w&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;++)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
    &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;unsigned&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; red &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; green &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; blue &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k1 &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(-&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k1 &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;++)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
            &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; pos &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;k1 &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; resized_width&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
            &lt;/SPAN&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k2 &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(-&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k2 &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k2&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;++)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
            &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
                red &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; resized_indataset&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;pos &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k2&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)].&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;red&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
                green &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; resized_indataset&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;pos &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k2&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)].&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;green&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
                blue &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; resized_indataset&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;pos &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; k2&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)].&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;blue&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
            &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
        resized_outdataset&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;j&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;].&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;red &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; red&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;/&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;9&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
        resized_outdataset&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;j&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;].&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;green &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; green&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;/&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;9&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
        resized_outdataset&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;j&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;].&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;blue &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; blue&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;/&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;9&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
    &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 17.7273px; background-color: rgb(244, 234, 234);"&gt;&lt;STRONG style="margin: 0px; padding: 0px; border: 0px;"&gt;Array Notation&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE class="lang-cpp prettyprint prettyprinted" style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: rgb(57, 51, 24); word-wrap: normal; background-color: rgb(238, 238, 238);"&gt;&lt;CODE style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;h&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;++)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
    &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; x &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;((&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;resized_width &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
    &lt;/SPAN&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; x&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;x &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; w&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+=&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;8&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
    &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; jump &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;resized_width &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row1index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; jump&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row3index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; jump&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        out&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;):&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row1index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row1index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row1index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row3index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;])/&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;9&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; 
    &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 17.7273px; background-color: rgb(244, 234, 234);"&gt;I'm trying to understand the code but I do not understand that basics assumption here.&lt;/P&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 17.7273px; background-color: rgb(244, 234, 234);"&gt;In the following code&lt;/P&gt;

&lt;PRE class="lang-cpp prettyprint prettyprinted" style="margin-top: 0px; padding: 5px; border: 0px; font-size: 13px; overflow: auto; width: auto; max-height: 600px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: rgb(57, 51, 24); word-wrap: normal; background-color: rgb(238, 238, 238);"&gt;&lt;CODE style="margin: 0px; padding: 0px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;  &lt;/SPAN&gt;&lt;SPAN class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; x&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;x &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; w&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; j&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+=&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;8&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
            &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;j &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
            &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; jump &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;resized_width &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
            &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row1index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; jump&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
            &lt;/SPAN&gt;&lt;SPAN class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);"&gt;int&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row3index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; jump&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
            out&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;):&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row1index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row1index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row1index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row2index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row3index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row3index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;3&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;row3index&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;6&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;:&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;24&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;])/&lt;/SPAN&gt;&lt;SPAN class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);"&gt;9&lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 17.7273px; background-color: rgb(244, 234, 234);"&gt;a.how do you decide that j needs to jump to j+=8 ? why 8?&lt;BR /&gt;
	b.why does jump = (resized_width * 3)?&lt;BR /&gt;
	c.why do we have index +0, index+3 ,index +6 ??&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 13:51:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051980#M50396</guid>
      <dc:creator>Gilad_D_Intel</dc:creator>
      <dc:date>2015-11-06T13:51:26Z</dc:date>
    </item>
    <item>
      <title>Your question is a good one.</title>
      <link>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051981#M50397</link>
      <description>&lt;P&gt;Your question is a good one. &amp;nbsp;This is the first time I've seen this code, and did not see any comments explaining it, so I was puzzled too. &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Answer to a&lt;/STRONG&gt;: The code appears to be trying to use array notation to seduce the compiler into generating vector code, by type-punning slices of 8 {r,g,b} structures onto vectors of length 24. &amp;nbsp;Why 24? &amp;nbsp;The vector length needs to be a multiple of 3 because the r,g,b structure has 3 elements. &amp;nbsp;The widest type in each calculation is a 32-bit integer (because of C++ promotion rules). &amp;nbsp;An AVX instruction can do 8 32-bit operations at once. &amp;nbsp;24 is the least common multiple of 8 and 3, and so works out well for AVX; i.e. three AVX instructions can operate on a 24-element slice. &amp;nbsp;If the target machine had only SSE instructions, which can do only 4 32-bit operations at once, then maybe 12 would be a better value. &amp;nbsp;24 would still be workable, but might raise the register pressure badly, or might help by improving instruction-level parallelism. &amp;nbsp;The only way to be sure is to time the variations -- modern hardware is too complex to predict. &amp;nbsp;That's why when I write this sort of code, I make the 24 a symbolic constant and time the variations.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: 700; font-size: 13.008px; line-height: 17.7382px;"&gt;Answer to b&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.008px; line-height: 17.7382px;"&gt;&lt;STRONG&gt;: &lt;/STRONG&gt;The jump is in units of the type-punned pointer to a color component (one of r, g, or b), not the original pointer to a struct containing a triple {r, g, b}.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 13.008px; line-height: 17.7382px;"&gt;Answer to c:&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.008px; line-height: 17.7382px;"&gt;See answer to be for why the offsets are multiples of 3. &amp;nbsp;Though a more literal translation of the serial code's offsets -1, 0, 1, would rescale them to -3, 0, 3. &amp;nbsp;For reasons not apparent to me, the code shifts the offsets upwards by 3, and compensates by &amp;nbsp;burying a -3 in this line:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;int row2index = 3*j - 3;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 19:38:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051981#M50397</guid>
      <dc:creator>ARCH_R_Intel</dc:creator>
      <dc:date>2015-11-06T19:38:00Z</dc:date>
    </item>
    <item>
      <title>Thanks for the quick answer</title>
      <link>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051982#M50398</link>
      <description>&lt;P&gt;Thanks for the quick answer but i'm still a little puzzled.&lt;/P&gt;

&lt;P&gt;so if you run the linear version I get in pos+k2&lt;/P&gt;

&lt;P&gt;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp;&lt;BR /&gt;
	3266 3267 3268 &amp;nbsp;&lt;BR /&gt;
	6532 6533 6534&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;BR /&gt;
	3267 3268 3269&lt;BR /&gt;
	6533 6534 6535&lt;/P&gt;

&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp;&lt;BR /&gt;
	3268 3269 3270&amp;nbsp;&lt;BR /&gt;
	6534 6535 6536&lt;/P&gt;

&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;3269 3270 3271&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;6535 6536 6537&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;and so on for the next 8 runs - we said 8 because of 3*8 =24 for the AVX&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px; line-height: 15.6096px;"&gt;each position has RGB channels we are calculating&amp;nbsp;&lt;/SPAN&gt;resized_outdataset&lt;J&gt;&amp;nbsp;where&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px; line-height: 15.6096px;"&gt;j = the middle 2,2 index starting from 3267, 3268 for the next 3x3&lt;/SPAN&gt;&lt;/J&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 15.6096px;"&gt;so we iterate 8 times over 3 char* which are the RGB channels for each position&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;when I use the AN version I get totally different indices&lt;/P&gt;

&lt;P&gt;row1index = 0&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;row2index = 9798&lt;/SPAN&gt;&lt;BR /&gt;
	row3index = 19596&lt;/P&gt;

&lt;P&gt;Can you please explain this? even the assignment in the end of the loop is into row2Index which is not the same index as j.&lt;/P&gt;

&lt;P&gt;I would expect the syntax here to say&amp;nbsp;&lt;/P&gt;

&lt;P&gt;(in[row1index:24] + in[row1index+3:24] + in[row1index+6:24]&lt;/P&gt;

&lt;P&gt;iterating over 8*3 chars&amp;nbsp;&lt;/P&gt;

&lt;P&gt;the first index was 0 1 2 for the first iteration for pos+k2 so 0 == row1index when pos+k2 =1 this means you need to skip 3 chars because of the RGB channels so we get to row1index+3 &amp;nbsp;and so on for index+6 when pos+k2=2&lt;/P&gt;

&lt;P&gt;but when pos+k2 = 3266 , 3267, 3268 for the first iteration the AN version syntax says&amp;nbsp;&lt;/P&gt;

&lt;P&gt;in[row2index:24] + in[row2index+3:24] + in[row2index+6:24]&lt;/P&gt;

&lt;P&gt;and row2index starts from 9798.... so i'm lost here&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 21:52:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051982#M50398</guid>
      <dc:creator>Gilad_D_Intel</dc:creator>
      <dc:date>2015-11-06T21:52:00Z</dc:date>
    </item>
    <item>
      <title>The index j in the serial</title>
      <link>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051983#M50399</link>
      <description>&lt;P&gt;The index &lt;STRONG&gt;j&amp;nbsp;&lt;/STRONG&gt;in the serial code is an index into an array of struct, where there are 3 bytes per struct. &amp;nbsp;The row...index&amp;nbsp;variable is indexing on the scale of bytes. &amp;nbsp;So there's a 3x ratio, i.e. 9798/3 = 3266.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 23:46:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051983#M50399</guid>
      <dc:creator>ARCH_R_Intel</dc:creator>
      <dc:date>2015-11-06T23:46:38Z</dc:date>
    </item>
    <item>
      <title>Thanks very much, now I</title>
      <link>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051984#M50400</link>
      <description>&lt;P&gt;Thanks very much, now I understand the whole code. what a weird way of programming....&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2015 08:34:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Image-processing-average-filter-sample-code/m-p/1051984#M50400</guid>
      <dc:creator>Gilad_D_Intel</dc:creator>
      <dc:date>2015-11-07T08:34:06Z</dc:date>
    </item>
  </channel>
</rss>

