My 2 cents: I'd suggest working with "varying float" and "varying anything" rather than 'soa<8> float' and 'soa<8> anything'.
-Brian On Sunday, October 27, 2019 at 11:25:35 PM UTC-7, Dmitry Babokin wrote: > > Hi Alex, > > soa<> support is quite buggy, this is yet another problem in the > collection of soa<> problems. We need either to solve them at once or > deprecate soa<> support. Could you please file an issue with this problem? > > Dmitry. > > On Thu, Oct 24, 2019 at 9:08 AM Alex Yuan <[email protected] <javascript:>> > wrote: > >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ispc-users/d0aa310b-66f9-4a39-9165-1bc6734ba6c4%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ispc-users/d0aa310b-66f9-4a39-9165-1bc6734ba6c4%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/5e6a7a55-900c-4f2d-86c4-f4d92cbbbef9%40googlegroups.com.
