dcompute
dcompute copied to clipboard
Can not build with LDC 1.9.0 on Windows 10 x64
Building package dcompute in C:\Users\ivan\AppData\Local\dub\packages\dcompute-0.1.0\dcompute\
Performing "debug" build using C:\LDC\bin\ldc2.exe for x86_64.
dcompute 0.1.0: building configuration "library"...
C:\LDC\bin\..\import\std\array.d(2850,13): Error: TypeInfo cannot be used with -betterC
C:\LDC\bin\ldc2.exe failed with exit code 1.
Why is it trying to build with -betterC? that broke a while ago.
I've got the exactly same question. I'll check the dependencies later. Maybe they require the betterC option?
It looks like dcompute package 0.1.0 on code.dlang.org has it in options. Using ~master for now. But this should be either fixed or mentioned in the documentation. How can I help with that?
Looks like i need to either update that release or add a new release. Thanks for the offer though.
If you want to help (one of) the next things on my list is to add the OpenCL & CUDA API requirements as contracts (or just plain asserts) to the wrapper so that it is obvious where one using the library has stuffed up.
e.g. OpenCL's create buffer should become (from the documentation section on errors):
Buffer!T createBuffer(T)(T[] arr,Memory.Flags flags = (Memory.Flags.useHostPointer | Memory.Flags.readWrite))
{
import std.stdio;
assert(raw); // valid context
assert(EnumMembers!(Memory.Flags).canFind(flags); // valid flags
if(flags == Memory.Flags.useHostPtr || flags == Memory.Flags.copyHostPtr)
assert(arr); // need non-null buffer if using host buffer
else
assert(arr is null); //
Buffer!T ret;
auto len = memSize(arr);
ret.raw = clCreateBuffer(raw,flags,len,arr.ptr,cast(int*)&status);
ret.hostMemory = arr;
checkErrors(); // allocation can still fail or we could be OOM
return ret;
}
Any news on this? Getting the same error. Maybe it's time to add a new release and fix all of it?