%% \usepackage{pgfplots}
%% \usepackage{pgf}
%% \usepackage{tikz}
%% \usepackage{listings}
%% \usepackage{subfigure}
%% \usepackage{amsfonts,amssymb}
%% \usepackage{graphicx}

%\definecolor{lightgray}{rgb}{0.98,0.98,0.98}
%\definecolor{gray}{rgb}{0.3,0.3,0.3}

% lstlisting settings
%\lstset{language=c++, tabsize=4, extendedchars=false, numbers=left,stepnumber=1, breaklines=true, basicstyle=\scriptsize\ttfamily,commentstyle=\color{gray}\rm,frame=single,showstringspaces=false,morekeywords={HALF4, HALF3, float2, float3, float4, half, half2, half3, half4, tex2D,dim3, endif,threadIdx, blockIdx, blockDim, gridDim, Dim3, __host__, __global__,__shared__,float},backgroundcolor=\color{lightgray},keywordstyle=\bfseries\ttfamily,numberstyle=\tiny}

%\lstset{morekeywords={HALF4,HALF3,float2,float3,float4,half,half2,half3,half4,tex2D,dim3,endif,threadIdx,blockIdx,blockDim,gridDim,Dim3,__host__,__global__,__shared__,float}}


% This is for tikz/pgf plots
\usetikzlibrary{arrows,positioning,shapes,shadows}
%\usetikzlibrary{external}
%\tikzexternalize[prefix=tikz/]
\pgfplotsset{compat=newest}
\pgfplotsset{plot coordinates/math parser=false}
\newlength\figureheight
\newlength\figurewidth
\newcommand{\tikzfigure}[5]{                %
\begin{figure}[h!t]                         %
\begin{center}                              %
\setlength\figurewidth{#2\textwidth}        %
\setlength\figureheight{#3\textwidth}       %
\input{#1}                                  %
\caption{#4}\label{#5}                      %
\end{center}                                %
\end{figure}}

\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
           rectangle,
           rounded corners,
           draw=black, very thick,
           text width=6.5em,
           minimum height=2em,
           text centered},
    % Define arrow style
    pil/.style={
           ->,
           thick,
           shorten <=2pt,
           shorten >=2pt,}
}

%\newcommand{\todo}[1]{\textcolor[rgb]{0.88,0.00,0.00}{Todo: #1}}
%\newcommand{\stefan}[1]{\textcolor[rgb]{0.66,0.66,0.22}{Stefan says: #1}}
%\newcommand{\allan}[1]{\textcolor[rgb]{0.88,0.00,0.88}{Allan says: #1}}
%\newcommand{\bernd}[1]{\textcolor[rgb]{0.00,0.88,0.88}{Bernd says: #1}}

% Math stuff

