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

Unnecessary wrapping_add? #4

@beamspease

Description

@beamspease

I noticed that you're manually calling wrapping_* for arithmetic operations in the PTX kernels. Shouldn't overflow wrap around already?

Note that I also noticed that it appears the intrinsics use signed for these variables (for which overflow would be undefined in C, although defined as wraparound in RFC 560 for Rust) but are defined as using unsigned (defined as wraparound in both C and Rust) in the CUDA programming manual. I filed a ticket in that library about this.

https://github.com/nox/rust-rfcs/blob/master/text/0560-integer-overflow.md
japaric-archived/nvptx-builtins#1

Feel free to close the ticket if it isn't relevant - I don't typically do GPGPU programming and this was the easiest way for me to provide feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions