<?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>4Geeks.de &#187; c++</title>
	<atom:link href="http://www.4geeks.de/blog/archives/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.4geeks.de/blog</link>
	<description>-.-</description>
	<lastBuildDate>Sun, 14 Mar 2010 21:00:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Molecular Dynamics</title>
		<link>http://www.4geeks.de/blog/archives/2009/02/molecular-dynamics/</link>
		<comments>http://www.4geeks.de/blog/archives/2009/02/molecular-dynamics/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 21:22:27 +0000</pubDate>
		<dc:creator>ebo</dc:creator>
				<category><![CDATA[Uni]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[molecular dynamics]]></category>
		<category><![CDATA[numeric]]></category>

		<guid isPermaLink="false">http://www.4geeks.de/?p=184</guid>
		<description><![CDATA[I created a little video with the md simulation, I&#8217;m working on for my diploma thesis. It simulates condensing Argon atoms using 8 cpus and around 130 cpu hours. Parallelization was done with Space-Filling curves. I used around 500 thousand particles &#8230; try that with your standard O(n2) algorithms.
Condensing Argon
Of course I used some fanciful [...]]]></description>
			<content:encoded><![CDATA[<p>I created a little video with the md simulation, I&#8217;m working on for my diploma thesis. It simulates condensing Argon atoms using 8 cpus and around 130 cpu hours. Parallelization was done with <a href="http://en.wikipedia.org/wiki/Space_filling_curve">Space-Filling curves</a>. I used around 500 thousand particles &#8230; try that with your standard O(n<sup>2</sup>) algorithms.</p>
<p><a href="http://www.youtube.com/watch?v=J43ERHsH8Do">Condensing Argon</a></p>
<p>Of course I used some fanciful coloring.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.4geeks.de/blog/archives/2009/02/molecular-dynamics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The fastest sparse grid code ever.</title>
		<link>http://www.4geeks.de/blog/archives/2008/01/the-fastest-sparse-grid-code-ever/</link>
		<comments>http://www.4geeks.de/blog/archives/2008/01/the-fastest-sparse-grid-code-ever/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 21:51:04 +0000</pubDate>
		<dc:creator>ebo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Use The Source]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[sparse grid]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://www.4geeks.de/archives/2008/01/the-fastest-sparse-grid-code-ever/</guid>
		<description><![CDATA[In my strive for even faster code, I finally followed a vague idea I had: There are those template things in c++. So I began writing grid generation code and had a hard time with it. Mainly because I did not know the mighty typename keyword.
In the end I was successful:
Creating a grid with 1.5 [...]]]></description>
			<content:encoded><![CDATA[<p>In my strive for even faster code, I finally followed a vague idea I had: There are those template things in c++. So I began writing grid generation code and had a hard time with it. Mainly because I did not know the mighty <a href="http://www.cppreference.com/keywords/typename.html">typename</a> keyword.</p>
<p>In the end I was successful:</p>
<p>Creating a grid with 1.5 mio points takes around 8.5 secs with the old code and around 2.5 secs with the new templated code. The only catch is, that you have to know the dimension at compile time, but if you do something like CFD, that&#8217;s not  a problem.</p>
<p>Next stop: Calculating hierarchical surplus.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.4geeks.de/blog/archives/2008/01/the-fastest-sparse-grid-code-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling Python functions from SWIG/C++</title>
		<link>http://www.4geeks.de/blog/archives/2007/10/calling-python-functions-from-swigc/</link>
		<comments>http://www.4geeks.de/blog/archives/2007/10/calling-python-functions-from-swigc/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 19:39:46 +0000</pubDate>
		<dc:creator>ebo</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Uni]]></category>
		<category><![CDATA[Use The Source]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swig]]></category>

		<guid isPermaLink="false">http://www.4geeks.de/archives/2007/10/calling-python-functions-from-swigc/</guid>
		<description><![CDATA[To make it more easy to integrate my Sparse Grid framework into existing applications (like those almighty financial applications where one function evaluation takes a whole day to calculate) and of course for easier development/testing, I searched for a way to call python callables from my swig-wrapped c++ code.
Lets first have a look in the [...]]]></description>
			<content:encoded><![CDATA[<p>To make it more easy to integrate my Sparse Grid framework into existing applications (like those almighty financial applications where one function evaluation takes a whole day to calculate) and of course for easier development/testing, I searched for a way to call python callables from my swig-wrapped c++ code.</p>
<p>Lets first have a look in the swig <a href="http://www.swig.org/Doc1.3/SWIG.html#SWIG_nn30">documentation</a>:</p>
<blockquote><p>SWIG provides full support for function pointers provided that the callback functions are defined in C and not in the target language.</p></blockquote>
<p>That&#8217;s unfortunate. Further <a href="http://www.google.com">research</a> revealed that there is indeed a (rather hackish) way to manage that.</p>
<p>First we define a function for setting the a callback:</p>
<blockquote><p>void setCallback(PyObject* obj) ;</p></blockquote>
<p>Now SWIG expects a wrapped PyObject-object, which we don&#8217;t have. That behavior can be overwritten be defining a custom typemap. The easiest possible solution would be:</p>
<blockquote><p>%typemap(in) PyObject* {<br />
$1 = $input;<br />
}</p></blockquote>
<p>All you have to do now is to check the object in your previously defined function and grab a reference to it. Read the <a href="http://docs.python.org/">Python documentation</a> on how to do that.</p>
<p>Overall rating: Working, but not very portable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.4geeks.de/blog/archives/2007/10/calling-python-functions-from-swigc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
