I am writing a CUDA kernel in which I'm using the string
data type in C++. However, the compiler is throwing the following error :
error: calling a host function("std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator =") from a __device__/__global__ function("doDecompression") is not allowed
Are strings not allowed within a kernel? if not, what is the workaround to allocate space for a char array within a kernel?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…