<?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>Persistent notes &#187; code</title>
	<atom:link href="http://alexkr.com/notes/source-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexkr.com</link>
	<description>Alexander Krivutsenko&#039;s online journal</description>
	<lastBuildDate>Fri, 01 Oct 2010 08:16:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sample SCTP code for Linux</title>
		<link>http://alexkr.com/source-code/339/sample-sctp-code-for-linux/</link>
		<comments>http://alexkr.com/source-code/339/sample-sctp-code-for-linux/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 08:37:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[protocols]]></category>

		<guid isPermaLink="false">http://alexkr.com/?p=339</guid>
		<description><![CDATA[Instruction about compiling SCTP code on Linux]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/339/sample-sctp-code-for-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cache efficient matrix multiplication</title>
		<link>http://alexkr.com/source-code/140/cache-efficient-matrix-multiplication/</link>
		<comments>http://alexkr.com/source-code/140/cache-efficient-matrix-multiplication/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 15:24:35 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[big]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[c]]></category>

		<guid isPermaLink="false">http://alexkr.com/source-code/140/cache-efficient-matrix-multiplication/</guid>
		<description><![CDATA[Regardless of cache coherency problem in multithreaded environment one must think about cache efficiency when operating on various memory locations.

It is amazing how good cache efficient code performs.
As a classical example there is matrix multiplication problem.
When values are stored in memory in row major form you have good sequential access to the elements inside one [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/140/cache-efficient-matrix-multiplication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to read keyboard input asynchronously</title>
		<link>http://alexkr.com/source-code/135/stdin-asynchronously/</link>
		<comments>http://alexkr.com/source-code/135/stdin-asynchronously/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 17:35:15 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[c]]></category>

		<guid isPermaLink="false">http://alexkr.com/raw-thoughts/135/stdin-asynchronously/</guid>
		<description><![CDATA[Sometimes it is necessary for console application to read keyboard inputs in asynchronous way.

This short example shows how things are done on Windows and Linux:


#ifdef WIN32
 #include &#60;conio.h&#62;
#else
 #include &#60;sys/time.h&#62;
 #include &#60;stdio.h&#62;
 #include &#60;stdlib.h&#62;
 #include &#60;unistd.h&#62;
#endif
int main(int argc, char* argv[])
{
 while(1)
 {
#ifdef WIN32
  if (kbhit()){
   return getc(stdin);
  }else{
   Sleep(1000);
 [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/135/stdin-asynchronously/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some C++ fun with 2 in power N</title>
		<link>http://alexkr.com/source-code/134/some-c-fun-with-2-in-power-n/</link>
		<comments>http://alexkr.com/source-code/134/some-c-fun-with-2-in-power-n/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 16:22:21 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[cpp]]></category>

		<guid isPermaLink="false">http://alexkr.com/source-code/134/some-c-fun-with-2-in-power-n/</guid>
		<description><![CDATA[There is one very famous task to design an algorithm which calculates 2 in power N.

Obvious solution will require N operations so it is not something we are thinking about.

If you look at the example: 2^6 = 2*2*2*2*2*2 you will notice that it can be done faster: 2^6 = (2^3)*(2^3).

in other words:


long compute2N(long n)
{
	if (n==0) [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/134/some-c-fun-with-2-in-power-n/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implementing Gauss Seidel iterative solver</title>
		<link>http://alexkr.com/source-code/132/implementing-gauss-seidel-iterative-solver/</link>
		<comments>http://alexkr.com/source-code/132/implementing-gauss-seidel-iterative-solver/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 13:58:09 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[blah-blah]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://alexkr.com/source-code/132/implementing-gauss-seidel-iterative-solver/</guid>
		<description><![CDATA[Here I would use notation Ax=b for system of linear equations, where A is a square matrix, x is vector of unknowns and b is vector of right hand side values.
Gaussian elimination as direct method for solving large system of linear equations would take 2*(n^3/3) + O(n^2) time, so it has roughly O(n^3) complexity.
Cholesky decomposition [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/132/implementing-gauss-seidel-iterative-solver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intuitive understanding of ODE solvers</title>
		<link>http://alexkr.com/source-code/127/intuitive-understanding-of-ode-solvers/</link>
		<comments>http://alexkr.com/source-code/127/intuitive-understanding-of-ode-solvers/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 17:35:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[big]]></category>
		<category><![CDATA[blah-blah]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://alexkr.com/source-code/127/intuitive-understanding-of-ode-solvers/</guid>
		<description><![CDATA[There are explicit and implicit numerical solvers for ODE initial value problem.
When one solves initial value problem (or Cauchy problem) for ordinary differential equations (ODE) numerically that means we get a sequence of approximated function values y(n) starting with fist given value y(0) for a given interval and with a given discretization rate (timestep).


 dy/dx [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/127/intuitive-understanding-of-ode-solvers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drawing Koch curve</title>
		<link>http://alexkr.com/source-code/122/drawing-koch-curve/</link>
		<comments>http://alexkr.com/source-code/122/drawing-koch-curve/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 03:01:44 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[big]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://alexkr.com/source-code/122/drawing-koch-curve/</guid>
		<description><![CDATA[What is so special about Koch curve or Koch snowflake?
This is one of the oldest fractals which was found as an example of a continuous functions which is not differentiable.
The difference between Koch curve and Koch snowflake is that snowflake implies that curve is built among the lines of a equilateral triangle.
Further description here is [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/122/drawing-koch-curve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non blocking stack</title>
		<link>http://alexkr.com/source-code/119/non-blocking-stack/</link>
		<comments>http://alexkr.com/source-code/119/non-blocking-stack/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 12:27:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[big]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[multithreading]]></category>

		<guid isPermaLink="false">http://alexkr.com/source-code/119/non-blocking-stack/</guid>
		<description><![CDATA[Non blocking algorithms are based on the idea that processor hardware can provide a way to implement some thread unsafe operations in an atomic way. Usually only few such operations are needed to implement non blocking data container.
On Intel platform Windows API provides implementation of interlocked functions which perform thread unsafe operations in an atomic [...]]]></description>
		<wfw:commentRss>http://alexkr.com/source-code/119/non-blocking-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

