Line Drawing

Hello!

I’m trying to build an image processing tool with cuda.
Therefor i need to draw lines in my image (1D-Array).
What would be the best and what the easiest way to do that?

Thanks!
Stephan