Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Also for SIMD-enabled functions it is not allowed to have side effects except writes by their ...

mikeitexpert
New Contributor II
476 Views

Hi Everybody,

I am new to vector programming and I am studying here and there just to better understand the details ...

There is a statement which isn't clear to me enough saying ... "Also for SIMD-enabled functions it is not allowed to have side effects except writes by their arguments. This rule can be violated by non-vector function calls, so be careful executing such calls in SIMD-enabled functions."

What does the above mean by "side effects except writes by their arguments. "?

I would appreciate any comments / elaboration.

Regards

 

https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/optimization-and-programming-guide/vectorization/explicit-vector-programming/user-mandated-or-simd-vectorization.html

 

mikeitexpert_0-1617360854476.png

 

0 Kudos
1 Solution
RahulV_intel
Moderator
443 Views

Hi,


Side-effect basically means that that a  SIMD-enabled function cannot change any state outside of the function. (Like modifying a variable outside its local environment is not permitted)


Thanks,

Rahul


View solution in original post

2 Replies
RahulV_intel
Moderator
444 Views

Hi,


Side-effect basically means that that a  SIMD-enabled function cannot change any state outside of the function. (Like modifying a variable outside its local environment is not permitted)


Thanks,

Rahul


RahulV_intel
Moderator
428 Views

Hi,


Thanks for accepting the solution. Intel will no longer monitor this thread. Further discussions on this thread will be considered community only.


Regards,

Rahul


0 Kudos
Reply