+\usepackage{booktabs}
+\usepackage{textcomp}
+\usepackage{listings}
+
+\let\OLDlstinputlisting\lstinputlisting
+\renewcommand{\lstinputlisting}[2][]{\FloatBarrier\OLDlstinputlisting[#1]{#2}\FloatBarrier}
+
+
+\lstset{morekeywords={HALF4,HALF3,float2,float3,float4,half,half2,half3,half4,tex2D,dim3,endif,threadIdx,blockIdx,blockDim,gridDim,Dim3,__host__,__global__,__shared__,float}}
+\lstset{
+ language=C,
+ columns=fixed,
+ basicstyle=\footnotesize\ttfamily,
+ numbers=left,
+ firstnumber=1,
+ numberstyle=\tiny,
+ stepnumber=5,
+ numbersep=5pt,
+ tabsize=3,
+ extendedchars=true,
+ breaklines=true,
+ keywordstyle=\textbf,
+ frame=single,
+ % keywordstyle=[1]\textbf,
+ %identifierstyle=\textbf,
+ commentstyle=\color{white}\textbf,
+ stringstyle=\color{white}\ttfamily,
+ % xleftmargin=17pt,
+ % framexleftmargin=17pt,
+ % framexrightmargin=5pt,
+ % framexbottommargin=4pt,
+ backgroundcolor=\color{lightgray},
+ basicstyle=\scriptsize,
+ texcl=true
+ }