<?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 Yes, that would work.  in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990707#M27840</link>
    <description>Yes, that would work. 

However, it seems kind of redundant: The cilk_for-loop is already partitioning my array, thus it must have some partitioner class built in - if i could use that, i would not have to create one myself. I could rely on the cilk_for-loop to partition my array correctly, still have the grainsize as a measure of how many chunks of my array are created, have a simpler code, etc.</description>
    <pubDate>Tue, 11 Sep 2012 07:09:56 GMT</pubDate>
    <dc:creator>leifblaese</dc:creator>
    <dc:date>2012-09-11T07:09:56Z</dc:date>
    <item>
      <title>cilk_for and array notation with gcc</title>
      <link>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990705#M27838</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a question regarding the use of a cilk_for-loop and array-notation together, when using the gcc.&lt;/P&gt;
&lt;P&gt;Imagine having a program, where you want to add two arrays of integers A, &amp;nbsp;B. One could do that, for example, either by using a cilk_for-loop, or by using array notation (e.g. A[0:size] + B[0:size]). Now, if i want to use array notation inside the cilk_for-loop, i run into a problem, because i have to specify the start and the length for the section-operator to work (because i am using gcc not an Intel compiler). I don't know how big the sections are that are created by the cilk_for-loop. Sure, i can specify a grainsize, but that is only an approximate measure, which means i could not guarantee to process the whole array A or B.&lt;/P&gt;
&lt;P&gt;Still, the cilk_for-loop must have some variable that tells where to start and how long to run. My question is: Is there a way to access these information? If not, is it planned in a later version of cilk? I think that would be a neat feature because it would simplify the code a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2012 08:35:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990705#M27838</guid>
      <dc:creator>leifblaese</dc:creator>
      <dc:date>2012-09-10T08:35:45Z</dc:date>
    </item>
    <item>
      <title>Conceptually you would do</title>
      <link>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990706#M27839</link>
      <description>Conceptually you would do something like this:
	const int nSlices = 8;
	cilk_for(int i = 0; i &amp;lt; nSlices; ++i)
	{
		int iSize = ARRAY_SIZE / nSlices;
		int iBegin = iSize * i;
		if(i == (nSlices - 1)) iSize = ARRAY_SIZE - (iSize * (nSlices - 1));
		A[iBegin:iSize] = B[iBegin:iSize] + C[iBegin:iSize];
	}

However, you would want to create a partitioner class as a helper
Jim Dempsey</description>
      <pubDate>Mon, 10 Sep 2012 14:39:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990706#M27839</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2012-09-10T14:39:06Z</dc:date>
    </item>
    <item>
      <title>Yes, that would work.</title>
      <link>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990707#M27840</link>
      <description>Yes, that would work. 

However, it seems kind of redundant: The cilk_for-loop is already partitioning my array, thus it must have some partitioner class built in - if i could use that, i would not have to create one myself. I could rely on the cilk_for-loop to partition my array correctly, still have the grainsize as a measure of how many chunks of my array are created, have a simpler code, etc.</description>
      <pubDate>Tue, 11 Sep 2012 07:09:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cilk-for-and-array-notation-with-gcc/m-p/990707#M27840</guid>
      <dc:creator>leifblaese</dc:creator>
      <dc:date>2012-09-11T07:09:56Z</dc:date>
    </item>
  </channel>
</rss>

