You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yes. I think it would be good to have a module (probably in dcompute) that imports all the relevant dcompute symbols from ldc.attributes and ldc.dcomputetypes if version = LDC_DCompute and otherwise sets up proxies for the symbols so you can still compile without a dcompute enabled ldc.
yes. I think it would be good to have a module (probably in dcompute) that imports all the relevant dcompute symbols from ldc.attributes and ldc.dcomputetypes if version = LDC_DCompute and otherwise sets up proxies for the symbols so you can still compile without a dcompute enabled ldc.
@thewilsonator Why not to allow any generic code to be instantiated in a marked module?
?? Not sure what you mean. Any modules, regardless of its @compute'ness, can have templates. The section you quoted would be for enabling building with a non-dcompute enabled compiler (e.g. old LDC and DMD/GDC)
I mean that I do not understand why ndslice should be marked if it is completely generic. If we call a generic function from kernel function it can be automatically determinated that generic should be compiled for kernel
Actually that might work. I'm not quite sure how template instances end up in a given module's symbol table, but if it does because it is referenced by that module, then the code would suggest that that would work.
We would still need @compute modules that reference them, though.
Activity
thewilsonator commentedon Feb 28, 2017
Definitely.
@compute(CompileFor.hostAndDevice)to work on both the host and device9il commentedon Feb 28, 2017
Do you mean mir.ndslice should be marked?
thewilsonator commentedon Feb 28, 2017
yes. I think it would be good to have a module (probably in dcompute) that imports all the relevant dcompute symbols from
ldc.attributesandldc.dcomputetypesif version = LDC_DCompute and otherwise sets up proxies for the symbols so you can still compile without a dcompute enabled ldc.9il commentedon Mar 8, 2017
@thewilsonator Why not to allow any generic code to be instantiated in a marked module?
thewilsonator commentedon Mar 8, 2017
?? Not sure what you mean. Any modules, regardless of its
@compute'ness, can have templates. The section you quoted would be for enabling building with a non-dcompute enabled compiler (e.g. old LDC and DMD/GDC)9il commentedon Mar 8, 2017
I mean that I do not understand why ndslice should be marked if it is completely generic. If we call a generic function from kernel function it can be automatically determinated that generic should be compiled for kernel
thewilsonator commentedon Mar 8, 2017
Actually that might work. I'm not quite sure how template instances end up in a given module's symbol table, but if it does because it is referenced by that module, then the code would suggest that that would work.
We would still need
@computemodules that reference them, though.Add NdView!(T,N): N-dimensional strided device view
Add NdView!(T,N): N-dimensional strided device view