Skip to content

Bug: cuda __constant__ memory declaration doesn't work #3

@SimeonEhrig

Description

@SimeonEhrig

Problem

The following code doesn't works in cuda mode:

[cling]$ __constant__ int array[1024];

The following error is thrown:

input_line_3:2:2: error: __constant__ variables must be global
 __constant__ int array[1024];
 ^
/usr/local/cuda-8.0/include/host_defines.h:195:22: note: expanded from macro '__constant__'
        __location__(constant)

possible cause

The bug should be inside the cling instance. Maybe the following source code will jited internal:

void __cling_Un1Qu31(void* vpClingValue) {
 __constant__ int array[1024];
;
}
__constant__ int array[1024];

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions