Hi,

Can anyone kindly let me know how I can dynamically allocate SOA types?

Following is an example test.ispc:

struct anything {
    int start;
    int end;
};

static void
process_items(uniform const float input[],
              uniform int height, uniform int width,
              soa<8> anything a[])
{
}

export void
process_ispc(uniform const float input[],
             uniform int height, uniform int width)
{
    uniform const int length = height * width;
    soa<8> anything * uniform a = uniform new soa<8> anything[length];
    process_items(input, height, width, a);
    delete a;
}

This is the command line and error message:
$ ../bin/ispc.exe --arch=x86 --target=avx2-i32x8 -o test.obj test.ispc
Assertion failed: castIsValid(getOpcode(), S, Ty) && "Illegal BitCast", 
file c:\iusers\aneshlya\llvm_release\llvm-8.0\llvm\lib\ir\instructions.cpp, 
line 3268

I was using a prebuilt v1.12.0 Windows build if that matters.

Regards,
Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ispc-users/d0aa310b-66f9-4a39-9165-1bc6734ba6c4%40googlegroups.com.

Reply via email to