I'm passing 2 global arrays of 2D points into my kernel, and then in the kernel, i'm accessing the global arrays multiple times (and passing them into other functions).

For example:

Code :
 
kernel FooBar(global float2 *array1, global float2 *array2)
{
  int i = get_global_id(0);
  int j = get_global_id(1);
 
  float pt1x = array1[i].x;
  float pt1y = array1[i].y;
 
  float pt2x = array2[j].x;
  float pt2y = array2[j].y;
 
  // do some calcs 
 
  float ans1 = SomeFunction(array1);
  float ans2 = SomeFunction(array2);
 
  // and so on.........
}

Is it better to copy these arrays into local memory? How does one do this? Are there any limitations i need to know about (such as memory issues?).

Thanks