<?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 When the data you want to in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Offload-program-with-STL-vector/m-p/1052003#M50402</link>
    <description>&lt;P&gt;When the data you want to pass between the host and the coprocessor is not bit-wise copyable, as in this case, you need to use the virtual shared memory offload model. Check out the sample code that comes with the compilers (which installs in /opt/intel/composerxe/Samples/en_US/C++/mic_samples/shrd_sampleCPP by default) and the section on shared memory programming in the C++ User's Guide in the &lt;A href="https://software.intel.com/en-us/intel-software-technical-documentation"&gt;Intel® Software Documentation Library&lt;/A&gt; (https://software.intel.com/en-us/node/522494 for the 15.0 version of the compiler.)&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jul 2015 06:37:05 GMT</pubDate>
    <dc:creator>Frances_R_Intel</dc:creator>
    <dc:date>2015-07-02T06:37:05Z</dc:date>
    <item>
      <title>Offload program with STL vector</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-program-with-STL-vector/m-p/1052002#M50401</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've got a problem with my program. It's simple code which show my problem.&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#pragma offload_attribute (push, target(mic))
#include &amp;lt;vector&amp;gt;
#include "offload.h"
#include &amp;lt;stdio.h&amp;gt;
#pragma offload_attribute (pop)

class A
{
	public:
	A() {}
	std::vector&amp;lt;int&amp;gt; V;
};


int main()
{
	A* wsk = new A();
	wsk-&amp;gt;V.push_back(1);
	
	#pragma offload target(mic) in(wsk)
	{
		printf("%d", wsk-&amp;gt;V[0]);
		
		printf("END OFFLOAD");
	}
		
	return 0;
}&lt;/PRE&gt;

&lt;P&gt;I've got a class object with STL vector which is container for data needed to computation.&amp;nbsp;I would like to create object on host, initialize data for computation on host too, then i want to move &lt;SPAN style="font-size: 13.0080003738403px; line-height: 19.5120010375977px;"&gt;class object to do&lt;/SPAN&gt;&amp;nbsp;computation on Intel Xeon Phi coprocessor. In result i got error:&lt;/P&gt;

&lt;P&gt;offload error: process on the device 0 was terminated by signal 11 (SIGSEGV)&lt;/P&gt;

&lt;P&gt;Why it doesn't work correctly? How to transfer STL vector to coprocessor?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2015 14:43:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-program-with-STL-vector/m-p/1052002#M50401</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2015-06-24T14:43:36Z</dc:date>
    </item>
    <item>
      <title>When the data you want to</title>
      <link>https://community.intel.com/t5/Software-Archive/Offload-program-with-STL-vector/m-p/1052003#M50402</link>
      <description>&lt;P&gt;When the data you want to pass between the host and the coprocessor is not bit-wise copyable, as in this case, you need to use the virtual shared memory offload model. Check out the sample code that comes with the compilers (which installs in /opt/intel/composerxe/Samples/en_US/C++/mic_samples/shrd_sampleCPP by default) and the section on shared memory programming in the C++ User's Guide in the &lt;A href="https://software.intel.com/en-us/intel-software-technical-documentation"&gt;Intel® Software Documentation Library&lt;/A&gt; (https://software.intel.com/en-us/node/522494 for the 15.0 version of the compiler.)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2015 06:37:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Offload-program-with-STL-vector/m-p/1052003#M50402</guid>
      <dc:creator>Frances_R_Intel</dc:creator>
      <dc:date>2015-07-02T06:37:05Z</dc:date>
    </item>
  </channel>
</rss>

