Declare array as global variable

37 views
Skip to first unread message

Andrea Madaschi

unread,
Mar 11, 2025, 11:12:27 AMMar 11
to ArrayFire Users
Is there a way to declare an array as a global variable?

I would like to declare an array as a global variable in a dll.
Is there a way?

John Melonakos

unread,
Mar 11, 2025, 4:52:40 PMMar 11
to ArrayFire Users
Have you tried it? I'm curious what happens. I'm not sure that we've tested this.

Andrea Madaschi

unread,
Mar 12, 2025, 2:53:18 AMMar 12
to ArrayFire Users
Yes, I tried.
Declaring for example "af::array a;" in the global variable section, the dll compiles without any problem or warning.
When I try to load it, it gets stuck in the execution of that command.
So I have to kill the execution of my program.

Do you know a way to declare an "af array" that can be shared among functions inside the dll?

Thank you
Andrea
Reply all
Reply to author
Forward
0 new messages