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

Function copy_string

compute/example/fizz_buzz.cpp:60–65  ·  view source on GitHub ↗

copy the string 's' with length 'n' to 'result' (just like strncpy())

Source from the content-addressed store, hash-verified

58
59 // copy the string 's' with length 'n' to 'result' (just like strncpy())
60 inline void copy_string(__constant const char *s, uint n, __global char *result)
61 {
62 while(n--){
63 result[n] = s[n];
64 }
65 }
66
67 // reverse the string [start, end).
68 inline void reverse_string(__global char *start, __global char *end)

Callers 1

fizz_buzz_copy_stringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected