Array initialization

32 views
Skip to first unread message

Tomek

unread,
Nov 5, 2019, 6:38:25 AM11/5/19
to Intel SPMD Program Compiler Users
Hi,

I'd like to initialise like this:

float array[576] = {0.};

This compiles, but does it work?

Thank you:)
Tomek


Dmitry Babokin

unread,
Nov 6, 2019, 3:54:01 PM11/6/19
to ispc-...@googlegroups.com
Tomek,

It will initialize first value to the constant that you've supplied and the rest will be zero-initialized.

Compile your code to see what's going on:
> ispc --emit-llvm-text t.ispc -o -

Dmitry.

--
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 ispc-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ispc-users/c7e32903-1345-4c58-a9c7-00e21e7a3726%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages