intersection

I have 2 array of geometry lines, A, B. Each line in A need to find the lines in B intersected with it. The parallel algorithm I have thought is that each thread assess a line in A, and testing the intersection with lines in B. But of course, this involves too many expensive calculations and I try to avoid it. In the CPU implementation I generate a grid and plot the lines into it using Bresenham algorithm, so only limited lines need to be test.

Is it possible to do similar approach in cuda? Maybe I can store the data in the texture because it looks like a grid, but i am not sure.