cuda: Fix self assignment in cudaCheckKernel macro
commit3b7d69680a61ec5d2174f0396e096fbb9a35bcff
authorTobias Grosser <tobias@grosser.es>
Fri, 1 Mar 2013 12:23:19 +0000 (1 13:23 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 1 Mar 2013 12:37:54 +0000 (1 13:37 +0100)
tree238dfaa4906521cef141a24c1dd0a85d5e765730
parent9dec37cec356a0af724d6863f6a3c8e3d1928f38
cuda: Fix self assignment in cudaCheckKernel macro

Passing a variable to a macro that has the same name as a
variable within the macro can cause surprising behavior. In our
case we created a self assignment 'e = (e)', which references the
new variable instead of the parameter that was passed into the
function. We fix this by including the macro name in the variables used
within the macro. This should reduce the probability of name clashes.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
cuda.c