mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-11 05:16:19 +03:00

If the special dcompute pointer types get instantiated in host code for any reason, ldc holds on to the llvm type created during the host codegen phase during the device codegen phase and won't mark the proper address space.
16 lines
323 B
D
16 lines
323 B
D
@compute(CompileFor.deviceOnly)
|
|
module inputs.kernel;
|
|
|
|
import ldc.dcompute;
|
|
@kernel void k_foo(GlobalPointer!float x_in)
|
|
{
|
|
SharedPointer!float shared_x;
|
|
PrivatePointer!float private_x;
|
|
ConstantPointer!float const_x;
|
|
*shared_x = *x_in;
|
|
*private_x = *x_in;
|
|
*x_in = *const_x;
|
|
|
|
*x_in = *shared_x;
|
|
*x_in = *private_x;
|
|
}
|