I would like to color a few keywords in my slides under the listings environment
In the following contrived example, I would like to color the __shared__
word with orange and WIDTH with blue. How would I modify this?
\begin{frame}[fragile]
\lstset{language=C++,
basicstyle=\ttfamily\scriptsize,
keywordstyle=\color{blue}\ttfamily,
stringstyle=\color{red}\ttfamily,
commentstyle=\color{green}\ttfamily,
breakline=true
}
\begin{lstlisting}
__global__
void MatMulKernelFast(double* d_M,double* d_N,double* d_P,int WIDTH)
{
__shared__ double ds_M[TILE_WIDTH][TILE_WIDTH];
__shared__ double ds_N[TILE_WIDTH][TILE_WIDTH];
}
\end{lstlisting}
\end{frame}
Here is the output of the previous code