Skip to content

GUPS: Fix overflow in type cast #57

@dmikushin

Description

@dmikushin

#49 adds CUDA GUPS to support this blog post

In posts/gups/gups.cu there is a typecasting typo while obtaining the problem size:

-    size_t n = (size_t)(1 << logn);
+   size_t n = ((size_t)1) << logn;

This fix is required in order to benchmark size n = 2^31.

More fixes are required to run n = 2^32 and further, but I don't have a clue yet 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions