typedef struct Data { int index; int ptr; int pad[2]; } Data, *DataPtr; inline void swap(__global Data *data, int left, int right ) { Data tmp = data[left]; data[left] = data[right]; data[right] = tmp; } void bubble_sort(__global Data *data, int begin, int end) { for (int count=0;countcount;c--) { if (data[c].index