Strings in CUDA Using C-Style strings in CUDA

Is it possible to use C-Style strings in CUDA without getting one of these wonderful warnings?

“sample2.cpp3.i”, line 7: Advisory: Cannot tell what pointer points to, assuming global memory space

This comes from doing the following.


iolib::output().format(“%d: start barriering\n”).arg(iolib::getRank()).finish();

device OutputStream & OutputStream::format(const char * const s)
{
ptr = reinterpret_cast<char * >(memory);
fmt = s;
for (fmtLen = 0; s[fmtLen] != 0; ++fmtLen) { }
return * this;
}

Pasted from sample2.cpp3.i:

3274 # 7 “samples/sample2.cu”
3275 auto struct _ZN5iolib12OutputStreamE *__T28;
3276 # 8 “samples/sample2.cu”
3277 auto struct _ZN5iolib12OutputStreamE *__T29;
3278 # 9 “samples/sample2.cu”
3279 auto long long __T210;
3280 # 10 “samples/sample2.cu”
3281 auto struct _ZN5iolib12OutputStreamE __T211;
3282 # 6 “samples/sample2.cu”
3283 _ZN5iolib4initENS_15_GPUInitRequestE(((
((_ZN5iolib14GPUInitRequestE *)(&libParam)))));
3284 # 7 “samples/sample2.cu”
3285 {
3286 # 7 “samples/sample2.cu”
3287 __T28 = (((__T26 = (_ZN5iolib12OutputStream6formatEPKc((_ZN5iolib6outputEv()), ((const char )“%d: start barriering\n”)))) , (__T27 = ( _ZN5iolib7getRankEv()))) , ((((((long long *)((__T26->ptr)))) = __T27) , ((__T26->ptr) += 8UL)) , __T26));
3288 # 7 “samples/sample2.cu”
3289 {
3290 # 7 “samples/sample2.cu”
3291 _ZN5iolib12OutputStream5flushEv(__T28);
3292 # 7 “samples/sample2.cu”
3293 }
3294 # 7 “samples/sample2.cu”
3295 }