Re: [PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-02-02 Thread Artem Belevich via cfe-commits
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:

Re: [PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-02-02 Thread Justin Lebar via cfe-commits
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,

Re: [PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-01-27 Thread Justin Lebar via cfe-commits
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); } +

[PATCH] D16638: [CUDA] Added device-side std::{malloc/free}

2016-01-27 Thread Artem Belevich via cfe-commits
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