MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / reverse_string

Function reverse_string

compute/example/fizz_buzz.cpp:68–77  ·  view source on GitHub ↗

reverse the string [start, end).

Source from the content-addressed store, hash-verified

66
67 // reverse the string [start, end).
68 inline void reverse_string(__global char *start, __global char *end)
69 {
70 while(start < end){
71 char tmp = *end;
72 *end = *start;
73 *start = tmp;
74 start++;
75 end--;
76 }
77 }
78
79 // second-pass kernel which copies the fizz-buzz string for each number to
80 // buffer using the previously calculated offsets.

Callers 1

fizz_buzz_copy_stringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected