<?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 Hello, in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044017#M47182</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;This is Rishab here. I am working on Intel Xeon Phi offload model in OPENMP .I needed to offload the for loop across get_orientation() an image data array named in the code(actually in):&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;img-&amp;gt;imageData and array of structures named( actually in&amp;amp; out):&amp;nbsp;arr_ipts .Please suggest if there is any correction in &amp;nbsp;the piece of code or additional information required. I am enabled OFFLOAD_REPORT=2, but can't see any data transfer messages. The cod snippet and message log are below:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;The message log :&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;[Offload] [MIC 0] [File] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;src/surf.cpp&lt;BR /&gt;
	[Offload] [MIC 0] [Line] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;81&lt;BR /&gt;
	[Offload] [MIC 0] [Tag] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag 0&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The piece of code I want to offload:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Ipoint ** arr_ipts = (Ipoint **)malloc(ipts.size()*sizeof(Ipoint *));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;int b = sizeof(Ipoint);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; ipts.size(); i++)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;arr_ipts&lt;I&gt; = (Ipoint *)malloc(sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;memcpy(arr_ipts&lt;I&gt;, &amp;amp;ipts&lt;I&gt;, sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;float * tData &amp;nbsp;= &amp;nbsp;img-&amp;gt;imageData;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int k &amp;nbsp;= sizeof(Ipoint);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int w = img-&amp;gt;width;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int h = img-&amp;gt;height;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int step &amp;nbsp;= img-&amp;gt;widthStep;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; // Main SURF-64 loop assigns orientations and gets descriptors&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; printf("offload start\n");&lt;BR /&gt;
	#pragma offload target(mic:0) in(tData:length(w*h)) in(*arr_ipts[0:(size)]:length(k)) out(*arr_ipts[0:(size)]:length(k))&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; ipts_size; ++i)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;// Set the Ipoint to be described&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;int idx = i;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;const int deviceNum = _Offload_get_device_number();&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;//printf("Hello from coprocessor %d \n" , deviceNum);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;//fflush(stdout);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;// Assign Orientations and extract rotation invariant descriptors&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;getOrientation(tData, w, h, step, arr_ipts&lt;I&gt;);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;//getDescriptor(img-&amp;gt;imageData, img-&amp;gt;width, img-&amp;gt;height, img-&amp;gt;widthStep,false);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Rishab Goel&lt;/P&gt;</description>
    <pubDate>Mon, 04 Apr 2016 00:48:53 GMT</pubDate>
    <dc:creator>Rishab_G_</dc:creator>
    <dc:date>2016-04-04T00:48:53Z</dc:date>
    <item>
      <title>Is it possible to offload a string array to xeon phi</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044006#M47171</link>
      <description>&lt;DIV class="post-text" itemprop="text"&gt;
	&lt;DIV class="post-text" itemprop="text"&gt;
		&lt;P&gt;I want to get all substring of a string on xeon phi&lt;BR /&gt;
			First, I read a txt file from args and store it into a pointer array like this&lt;/P&gt;

		&lt;PRE class="lang-c prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="kwd"&gt;char&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;*&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;temp_string&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;N_ELEMENT&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;];&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;

		&lt;P&gt;Second, I want to using pragma offlad to copt this array to xeon phi like this&lt;/P&gt;

		&lt;PRE class="lang-c prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="com"&gt;#pragma&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; offload target&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;mic&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;temp_string&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;length&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;N_ELEMENT&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;

		&lt;P&gt;The command line give me the following message&lt;/P&gt;

		&lt;PRE class="lang-c prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;error&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; variable &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"temp_string"&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; used in in&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;out&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;/&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;inout clause is an array whose underlying type is &lt;/SPAN&gt;&lt;SPAN class="str"&gt;"char *"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;

		&lt;P&gt;Is it have any solutation to fix my problem?&lt;/P&gt;

		&lt;HR /&gt;
		&lt;P&gt;The offload section like this:&lt;/P&gt;

		&lt;PRE class="lang-c prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="com"&gt;#pragma&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; offload target&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;mic&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; in&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;temp_string&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;length&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;N_ELEMENT&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;))&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&lt;/SPAN&gt;&lt;SPAN class="com"&gt;#pragma&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; omp parallel &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;private&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;c&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; length&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;n &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; n &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; N_ELEMENT&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;++&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;n&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; 
&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
    length &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; strlen&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;temp_string&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;n&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;

    &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; c &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; c &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; length &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; c&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;++&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; i &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; i &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; length &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;-&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; c &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;++&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
            sub &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; substring&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;temp_string&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;n&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;],&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; c&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;+&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; i&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
            printf&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"%s \n"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; sub&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;
        &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;

&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
	&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 01 Nov 2014 09:56:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044006#M47171</guid>
      <dc:creator>Po_Chang_W_</dc:creator>
      <dc:date>2014-11-01T09:56:16Z</dc:date>
    </item>
    <item>
      <title>The problem you have is you</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044007#M47172</link>
      <description>&lt;P&gt;The problem you have is you are attempting to copy the array of char*'s and not also that which they point to.&lt;/P&gt;

&lt;P&gt;If these are substring pointers then consider:&lt;/P&gt;

&lt;P&gt;char *big_string;&lt;BR /&gt;
	int tokenIndex[N_ELEMENT];&lt;BR /&gt;
	..&lt;/P&gt;

&lt;P&gt;Then offload the big_string and tokenIndex arrays (don't forget the length+1 of the big_string).&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sat, 01 Nov 2014 11:24:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044007#M47172</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-11-01T11:24:21Z</dc:date>
    </item>
    <item>
      <title>I am seeing different</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044008#M47173</link>
      <description>&lt;P&gt;I am seeing different treatment between our 14.0 and 15.0 compilers so I expect this is an intentional restriction imposed by the Intel Composer XE 2013 SP1 release (14.0 compiler) that may have been eased/lifted in the Intel Parallel Studio XE 2015 (15.0) compiler.&lt;/P&gt;

&lt;P&gt;The error is reproducible with the 14.0 compiler but not the 15.0 compiler so if it was convenient for you to upgrade to the newer 15.0 release then you may find it supports your needs/interests. Using 14.0 may require a different approach, perhaps as Jim suggested.&lt;/P&gt;

&lt;P&gt;I will inquire with our Developers about this error and share what else I learn.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Nov 2014 11:51:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044008#M47173</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-11-01T11:51:10Z</dc:date>
    </item>
    <item>
      <title>Hi, jimdempseyatthecove</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044009#M47174</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/100158" style="font-size: 11px; line-height: 16px;"&gt;jimdempseyatthecove&lt;BR /&gt;
	I try your method and success, thank you very much.&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/user/100158" style="font-size: 11px; line-height: 16px;"&gt;B&lt;/A&gt;y the way, I want to know how to offload a struct array?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Nov 2014 14:04:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044009#M47174</guid>
      <dc:creator>Po_Chang_W_</dc:creator>
      <dc:date>2014-11-01T14:04:39Z</dc:date>
    </item>
    <item>
      <title>If the struct is POD (just</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044010#M47175</link>
      <description>&lt;P&gt;If the struct is POD (just data. POD=Plain Old Data) then the pointer and sizeof the struct should work.&lt;/P&gt;

&lt;P&gt;However, structs can&amp;nbsp;contain pointers to other objects, member functions, (in addition to ctor/dtor), and virtual functions, and these complicate the offload. Some of this management&amp;nbsp;is aided with the 15.0 compiler, however, I am unable to provide a working example because I do not have the 15.0 compiler.&lt;/P&gt;

&lt;P&gt;Look at a few of the other threads&amp;nbsp;on this forum, there was one showing a simple example where a member function was offloaded where the member variable was an array. The fix was to remember to offload the this pointer with nocopy. As to if this worked, I did not see the reply. There should be some examples that you can find with a google search of this forum. Use the following search:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C++ class offload site:https://software.intel.com/en-us/forums&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sun, 02 Nov 2014 22:19:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044010#M47175</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-11-02T22:19:44Z</dc:date>
    </item>
    <item>
      <title>The Intel® Parallel Studio XE</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044011#M47176</link>
      <description>&lt;P&gt;The Intel® Parallel Studio XE 2015 (15.0 compiler) release contains new feature support for passing an array of pointers as discussed in this article:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/xeon-phi-coprocessor-data-transfer-array-of-pointers-using-language-extensions-for-offload" target="_blank"&gt;&lt;STRONG&gt;Data transfer of an “array of pointers” using the Intel® Language Extensions for Offload (LEO) for the Intel® Xeon Phi™ coprocessor&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This slipped my mind but it is behind the different treatment I noted between the two compilers earlier. With this feature support I was able to mock-up your sample and get it working rather easily. For the prototype you posted, with 15.0 you only need to change your &lt;STRONG&gt;#pragma offload&lt;/STRONG&gt; to this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;#pragma offload target(mic: 0) in(temp_string[0:N_ELEMENT])&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The offload run-time dynamically determines the length of each string element and transfers each element accordingly. The article mentions but does not detail use with &lt;STRONG&gt;char &lt;/STRONG&gt;data types specifically so we'll look to update that soon.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 10:55:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044011#M47176</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-11-04T10:55:14Z</dc:date>
    </item>
    <item>
      <title>Thanks everyone to help me, I</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044012#M47177</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Thanks everyone to help me, I try to using a big char array(string) and a index array(int array) to offload it to help me get all of my string from my string array, when my array is small, it will work great. But when I add the number of element to the string array, the big char array become big and big, and offload will happened "&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;process on the device 0 was terminated by signal 11 (SIGSEGV)&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;", I have no idea to fix it, can someone help me and give me some top to fix it.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;And the second question is, I using the variable on offload block, but I didn't write the closure "in out inout" like this, it still can read the variable, why? If I only want to read it not modified all of my data, can I using it without copy?&lt;/P&gt;

&lt;P&gt;Thanks everyone.&lt;/P&gt;

&lt;P&gt;My code just like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE style="font-size: 10px; line-height: 15px;"&gt;&amp;lt;pre class="brush:cpp"&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;__attribute__((target(mic))) char offload_pattern_string[30 * PATTERN_ELEMENT];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;__attribute__((target(mic))) int offload_pattern_index[PATTERN_ELEMENT], n=0;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;__attribute__((target(mic))) char offload_content_string[60 * CONTENT_ELEMENT];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;__attribute__((target(mic))) int offload_content_index[CONTENT_ELEMENT];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(fgets(line, 1024, fp)) {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if((p=strchr(line, '\r'))) *p='\0';&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if((p=strchr(line, '\n'))) *p='\0';&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;/*bloom_add(bloom, line);*/&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;p=strtok(line, " \t,.;:\r\n?!-/()");&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(p) {&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;strcat(offload_pattern_string, p);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;offload_pattern_index[n++] = strlen(p);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;p=strtok(NULL, " \t,.;:\r\n?!-/()");&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;

&lt;P&gt;&lt;CODE style="font-size: 10px; line-height: 15px;"&gt;&amp;lt;/pre&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE style="font-size: 10px; line-height: 15px;"&gt;and let the offload_pattern_string to MIC&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 07:55:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044012#M47177</guid>
      <dc:creator>Po_Chang_W_</dc:creator>
      <dc:date>2014-11-05T07:55:35Z</dc:date>
    </item>
    <item>
      <title>By default, any variable the</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044013#M47178</link>
      <description>&lt;P&gt;By default, any variable the compiler can see within the lexical scope of the offload construct is transferred implicitly as &lt;STRONG&gt;INOUT&lt;/STRONG&gt;. So the variable's value by default is available and that's why you can read it without listing the variable in any explicit data transfer clause.&lt;/P&gt;

&lt;P&gt;To use a variable's host value on the coprocessor only you must at least transfer the value once using IN. Subsequent offloads can then reuse the variable's value on the coprocessor by using NOCOPY for that variable.&lt;/P&gt;

&lt;P&gt;It is difficult to know for certain the cause of the SIGSEGV without a reproducer.&lt;/P&gt;

&lt;P&gt;What are the values for PATTERN_ELEMENT and COUNT_ELEMENT that cause the failure?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 10:43:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044013#M47178</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-11-05T10:43:00Z</dc:date>
    </item>
    <item>
      <title>PATTERN_ELEMENT means the</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044014#M47179</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;PATTERN_ELEMENT means the number of my pattern&lt;/SPAN&gt;, read from file line by line&lt;/P&gt;

&lt;P&gt;So, I need to &lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;transfer they using IN and then reuse they using&amp;nbsp;no copy right?&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;And I&amp;nbsp;want&amp;nbsp;to ask how&amp;nbsp;lager&amp;nbsp;variable can I transfer into Xeon Phi, is it have any&amp;nbsp;&lt;/SPAN&gt;restriction?&lt;BR /&gt;
	&lt;BR /&gt;
	thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 10:49:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044014#M47179</guid>
      <dc:creator>Po_Chang_W_</dc:creator>
      <dc:date>2014-11-05T10:49:09Z</dc:date>
    </item>
    <item>
      <title>The guidance I received is</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044015#M47180</link>
      <description>&lt;P&gt;The guidance I received is that in theory there is no limit/restriction on size of any single variable transferred or the aggregate size of transferring multiple variables with a single offload/offload_transfer.&lt;/P&gt;

&lt;P&gt;For the IN and NOCOPY usage, you could perhaps do something like this:&lt;/P&gt;

&lt;P&gt;…&lt;BR /&gt;
	…&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // some host code&lt;BR /&gt;
	…&lt;BR /&gt;
	#pragma offload_transfer IN(&amp;lt;variables&amp;gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // offload_transfer can be used to only upload a variable’s value&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // This could also be a #pragma offload with other offload code if desired&lt;BR /&gt;
	…&lt;BR /&gt;
	…&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // some more host code&lt;BR /&gt;
	…&lt;BR /&gt;
	#pragma offload NOCOPY(&amp;lt;variables&amp;gt;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This might be where your earlier offload/omp code snippet could appear&lt;BR /&gt;
	{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; // offload code to use the variable’s value.&lt;BR /&gt;
	}&lt;BR /&gt;
	…&lt;BR /&gt;
	…&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // some more host code&lt;BR /&gt;
	…&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2014 19:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044015#M47180</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-11-05T19:40:00Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;By default, any variable</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044016#M47181</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;By default, any variable the compiler can see within the lexical scope of the offload construct is transferred implicitly as &lt;STRONG&gt;INOUT&lt;BR /&gt;
	...+&lt;/STRONG&gt;&lt;BR /&gt;
	&amp;nbsp;__attribute__((target(mic))) char offload_pattern_string[30 * PATTERN_ELEMENT];&lt;BR /&gt;
	...&lt;/P&gt;

&lt;P&gt;If these variables are local scoped variables (they appear to be on stack), then the stack size on the MIC portion of the application must be large enough to accommodate the variables. I do not know how big&amp;nbsp; PATTERN_ELEMENT and CONTEN_ELEMENT are. If these are large, then this may be a stack issue. If so, consider making these&amp;nbsp;global or allocatable.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Nov 2014 21:01:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044016#M47181</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-11-07T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044017#M47182</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;This is Rishab here. I am working on Intel Xeon Phi offload model in OPENMP .I needed to offload the for loop across get_orientation() an image data array named in the code(actually in):&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;img-&amp;gt;imageData and array of structures named( actually in&amp;amp; out):&amp;nbsp;arr_ipts .Please suggest if there is any correction in &amp;nbsp;the piece of code or additional information required. I am enabled OFFLOAD_REPORT=2, but can't see any data transfer messages. The cod snippet and message log are below:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;The message log :&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;[Offload] [MIC 0] [File] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;src/surf.cpp&lt;BR /&gt;
	[Offload] [MIC 0] [Line] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;81&lt;BR /&gt;
	[Offload] [MIC 0] [Tag] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag 0&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The piece of code I want to offload:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Ipoint ** arr_ipts = (Ipoint **)malloc(ipts.size()*sizeof(Ipoint *));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;int b = sizeof(Ipoint);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; ipts.size(); i++)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;arr_ipts&lt;I&gt; = (Ipoint *)malloc(sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;memcpy(arr_ipts&lt;I&gt;, &amp;amp;ipts&lt;I&gt;, sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;float * tData &amp;nbsp;= &amp;nbsp;img-&amp;gt;imageData;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int k &amp;nbsp;= sizeof(Ipoint);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int w = img-&amp;gt;width;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int h = img-&amp;gt;height;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp;int step &amp;nbsp;= img-&amp;gt;widthStep;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; // Main SURF-64 loop assigns orientations and gets descriptors&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; printf("offload start\n");&lt;BR /&gt;
	#pragma offload target(mic:0) in(tData:length(w*h)) in(*arr_ipts[0:(size)]:length(k)) out(*arr_ipts[0:(size)]:length(k))&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; ipts_size; ++i)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;// Set the Ipoint to be described&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;int idx = i;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;const int deviceNum = _Offload_get_device_number();&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;//printf("Hello from coprocessor %d \n" , deviceNum);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp;//fflush(stdout);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;// Assign Orientations and extract rotation invariant descriptors&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;getOrientation(tData, w, h, step, arr_ipts&lt;I&gt;);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;//getDescriptor(img-&amp;gt;imageData, img-&amp;gt;width, img-&amp;gt;height, img-&amp;gt;widthStep,false);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Rishab Goel&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 00:48:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044017#M47182</guid>
      <dc:creator>Rishab_G_</dc:creator>
      <dc:date>2016-04-04T00:48:53Z</dc:date>
    </item>
    <item>
      <title>In your above code you are</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044018#M47183</link>
      <description>&lt;P&gt;In your above code you are&lt;/P&gt;

&lt;P&gt;allocate array of Ipoint pointers ipts.size()*sizeof(Ipoint *))&lt;BR /&gt;
	for each allocated pointer&lt;BR /&gt;
	&amp;nbsp; allocate space for Ipoint object&lt;BR /&gt;
	&amp;nbsp; copy Ipoint object from container to newly allocated space&lt;BR /&gt;
	end for&lt;BR /&gt;
	offload (your attempt at array of pointers)&lt;/P&gt;

&lt;P&gt;Change this to&lt;/P&gt;

&lt;P&gt;allocate blob of memory ipts.size()*sizeof(Ipoint)&lt;BR /&gt;
	allocate array of Ipoint pointers ipts.size()*sizeof(Ipoint *))&lt;BR /&gt;
	for each allocated pointer&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;array of&amp;nbsp;IpointPointers[index] = blob + index * sizeof(Ipoint)&lt;BR /&gt;
	&amp;nbsp; copy Ipoint object from container to newly pointed to space&lt;BR /&gt;
	end for&lt;BR /&gt;
	offload (the blob and count, etc but not the pointers&lt;BR /&gt;
	{ in offload)&lt;BR /&gt;
	allocate array of Ipoint pointers ipts.size()*sizeof(Ipoint *))&lt;BR /&gt;
	for each allocated pointer&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;array of&amp;nbsp;IpointPointers[index] = blob + index * sizeof(Ipoint)&lt;BR /&gt;
	end for&lt;BR /&gt;
	now use the array of objectes via the pointers&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;Note, the above assumes your code requires the array of pointers inside the offload. You could just as well allocated an array of type Ipoint and directly passed and used that.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 12:00:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044018#M47183</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-04-04T12:00:20Z</dc:date>
    </item>
    <item>
      <title>Hello Jim ,</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044019#M47184</link>
      <description>&lt;P&gt;Hello Jim ,&lt;/P&gt;

&lt;P&gt;Thanks for the suggestion .&lt;/P&gt;

&lt;P&gt;I tried your suggestion but experience the error as mentioned below. Please could u suggest if anything I did was wrong.Also added the code snippet below:&lt;/P&gt;

&lt;P&gt;Error:&lt;/P&gt;

&lt;P&gt;[Offload] [MIC 0] [File] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;src/surf.cpp&lt;BR /&gt;
	[Offload] [MIC 0] [Line] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;82&lt;BR /&gt;
	[Offload] [MIC 0] [Tag] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tag 0&lt;BR /&gt;
	offload error: process on the device 0 was terminated by signal 11 (SIGSEGV)&lt;/P&gt;

&lt;P&gt;Code Snippet:&lt;/P&gt;

&lt;P&gt;********************************&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Ipoint * t_ipts = &amp;amp;ipts[0];&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;int size = ipts.size();&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//Ipoint ** arr_ipts = (Ipoint **)malloc(ipts.size()*sizeof(Ipoint *));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;int b = sizeof(Ipoint);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint8_t * mem_chunk = (uint8_t*) malloc(sizeof(Ipoint)*ipts.size());&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; ipts.size(); i++)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//arr_ipts&lt;I&gt; = (Ipoint*) ;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;memcpy((mem_chunk + i*sizeof(Ipoint)), &amp;amp;ipts&lt;I&gt;, sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;float * tData = img-&amp;gt;imageData;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; int w = img-&amp;gt;width;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; int h = img-&amp;gt;height;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; int step = img-&amp;gt;widthStep;&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; printf ( "offload started \n" );&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Main SURF-64 loop assigns orientations and gets descriptors&lt;BR /&gt;
	#pragma offload target(mic:0) in(tData:length(img-&amp;gt;width*img-&amp;gt;height)) inout(mem_chunk:length(size*b)) optional&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; Ipoint ** arr_ipts = (Ipoint **)malloc(size*sizeof(Ipoint *));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; ipts_size; ++i)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Set the Ipoint to be described&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;int idx = i;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf ( "offload ipoint \n" );&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;arr_ipts&lt;I&gt; = (Ipoint*)(mem_chunk + i*sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Assign Orientations and extract rotation invariant descriptors&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;getOrientation(tData, img-&amp;gt;width, img-&amp;gt;height, img-&amp;gt;widthStep, arr_ipts&lt;I&gt;);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//getDescriptor(img-&amp;gt;imageData, img-&amp;gt;width, img-&amp;gt;height, img-&amp;gt;widthStep,false);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; free(arr_ipts);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; ipts.size(); i++)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;memcpy(&amp;amp;ipts&lt;I&gt;, (mem_chunk + i*sizeof(Ipoint)), sizeof(Ipoint));&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//free(arr_ipts&lt;I&gt;);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;free(mem_chunk);&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;********************************&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;Rishab&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 12:32:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044019#M47184</guid>
      <dc:creator>Rishab_G_</dc:creator>
      <dc:date>2016-04-05T12:32:01Z</dc:date>
    </item>
    <item>
      <title>I think the issue is you need</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044020#M47185</link>
      <description>&lt;P&gt;I think the issue is you need to pass into the offload the values of (and use the values of) img-&amp;gt;width, img-&amp;gt;height, img-&amp;gt;widthStep&lt;/P&gt;

&lt;P&gt;Also, as written, you do not need lpoint** arr_ipts&amp;nbsp;(though your actual code may require the array of pointers later). Note, you can construct the individual pointer with a cast and &lt;I&gt;&amp;nbsp;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;lpoint* arr_lpts =(lpoint*)mem_chunk; // pointer to base of array of lpoints&lt;BR /&gt;
	...&lt;BR /&gt;
	...arr_lpts&lt;I&gt;...;&lt;/I&gt;&lt;/P&gt;

&lt;P&gt;Then, if you continue to get SIGSEGV, you may have to see if you have alignment expectations that are not met. If so, then you may need to insert inter lpoint&amp;nbsp;pad bytes within the blob and then define a lpoint_padded object with lpoint type as base and pad as pad amount. Then use that when copying into blob and within the offload.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 14:32:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044020#M47185</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2016-04-05T14:32:30Z</dc:date>
    </item>
    <item>
      <title>Thanks Jim for the suggestion</title>
      <link>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044021#M47186</link>
      <description>&lt;P&gt;Thanks Jim for the suggestion I made img-&amp;gt;width , img-&amp;gt;height scalars and that worked.!!!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 20:13:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Is-it-possible-to-offload-a-string-array-to-xeon-phi/m-p/1044021#M47186</guid>
      <dc:creator>Rishab_G_</dc:creator>
      <dc:date>2016-04-06T20:13:27Z</dc:date>
    </item>
  </channel>
</rss>

