<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tunç Bahçecioğlu &#187; std</title>
	<atom:link href="http://www.tuncbahcecioglu.com/posts/tag/std/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tuncbahcecioglu.com</link>
	<description>carpe omnium</description>
	<lastBuildDate>Tue, 26 Oct 2010 13:43:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>send std::string with mpi</title>
		<link>http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 02:12:45 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[mpi]]></category>
		<category><![CDATA[std]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/</guid>
		<description><![CDATA[The idea is to send the size of the string first and then allocate the storage on the reciever. Here is an example with broadcast. string s = "before"; int size = 0; if (myRank == 0) { s = "after"; size = s.size(); } BroadCast(&#38;size,1); if (myRank != 0) s.resize(size); BroadCast(s.data(),size); delphi and mpi, [...]]]></description>
			<content:encoded><![CDATA[<p>The idea is to send the size of the string first and then allocate the storage on the reciever. Here is an example with broadcast.</p>
<pre class="brush:cpp">string s = "before";
int size = 0;
if (myRank == 0)
{
   s = "after";
   size = s.size();
}
BroadCast(&amp;size,1);
if (myRank != 0) s.resize(size);
BroadCast(s.data(),size);</pre>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/" title="delphi and mpi, closer look 2">delphi and mpi, closer look 2</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/" title="Delphi and mpi in 4 steps">Delphi and mpi in 4 steps</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/" title="MPI Debugging with Visual Studio">MPI Debugging with Visual Studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/" title="DELPHI and MPI, closer look 1">DELPHI and MPI, closer look 1</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/pugg/" title="pugg">pugg</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/installing-boost-for-visual-studio/" title="Installing boost for visual studio">Installing boost for visual studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/" title="A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems">A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

