I’m trying to port my CUDA project to clang. Thanks for the fantastic work,
clang is a charm to work with.
One problem however, maybe you guys can help me out. I already posted this
to cfe-users but no answer so far.
I need to allocate memory for a class in a CUDA kernel on the heap.
So I created a myclass** in the host program, pass it to the kernel and attempt to
allocate with new. Works fine in nvcc, in clang I get the error
 % clang++ -std=c++14 -o test_new_device test_new_device.cu -L/Developer/NVIDIA/CUDA-8.0/lib -lcudart
ptxas fatal : Unresolved extern function '_Znwm'
clang-4.0: error: ptxas command failed with exit code 255 (use -v to see invocation)
I’m on osx 10.12.5, using
% clang++ --version
clang version 4.0.0 (tags/RELEASE_400/final 297808)
Thread model: posix