Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Signed mismatch for intrinsics? #1

Open
beamspease opened this issue May 19, 2017 · 2 comments
Open

Signed mismatch for intrinsics? #1

beamspease opened this issue May 19, 2017 · 2 comments

Comments

@beamspease
Copy link

Hi,

I noticed that the nvptx repo was using wrapping_add, which was curious. In looking into it, I noticed that the type of the intrinsics seems to differ from what the CUDA guide states. Is this intentional?

http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#built-in-variables

@japaric
Copy link
Contributor

japaric commented May 19, 2017

The LLVM definition use i32 so I'm sticking to that. If you are using C/C++ (and CUDA is C/C++ + some language extensions) I suppose it doesn't matter what LLVM (the backend) uses because the compiler will implicitly cast between integer types.

@beamspease
Copy link
Author

That makes sense. I'd assume that we're nowhere near 2,147,483,647 blocks so it probably doesn't matter right now for signed/unsigned.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants