tra updated this revision to Diff 46729.
tra added a comment.
Added few more device-side system calls and related wrapper functions.
Added nothrow attributes on malloc/free.
http://reviews.llvm.org/D16638
Files:
lib/Headers/__clang_cuda_runtime_wrapper.h
Index:
jlebar added inline comments.
Comment at: lib/Headers/__clang_cuda_runtime_wrapper.h:215
@@ +214,3 @@
+// Device-side CUDA system calls.
+//
http://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#system-calls
+
It seems that only vprintf,
jlebar accepted this revision.
This revision is now accepted and ready to land.
Comment at: lib/Headers/__clang_cuda_cmath.h:222
@@ +221,3 @@
+__DEVICE__ void free(void *__ptr) { return ::free(__ptr); }
+__DEVICE__ void *malloc(size_t __size) { return ::malloc(__size); }
+
tra created this revision.
tra added a reviewer: jlebar.
tra added a subscriber: cfe-commits.
In addition to math functions, we also need to support std::malloc and
std::free to match NVCC behavior.
http://reviews.llvm.org/D16638
Files:
lib/Headers/__clang_cuda_cmath.h