Is the clause __assume_aligned(x, y) deprecated in oneAPI? This causes the error above, but seemed to be a valid statement in XE Compiler 19.2.
If it is still a valid clause, which section of the documention describes the correct usage?
Thanks for reaching out to us.
assume_aligned(x,y) is not deprecated.
You can check the below link for further assistance
Can you please let us know by oneAPI which compiler are you referring?
The assume_aligned(x,y) works perfectly fine with icpc.
With icpx/dpcpp you can use __builtin_assume_aligned (ptr, offset)
Eg : float* ax = (float*)__builtin_assume_aligned(x, 64);
or you can use __attribute__((assume_aligned(<alignment>[,<offset>])) on a function declaration to specify that the return value of the function (which must be a pointer type) has the specified offset, in bytes, from an address with the specified alignment. The offset is considered to be zero if omitted.
Basically, we do not need any directives included to use __assume_aligned(x, 64). You can try using __builtin_assume_aligned(x, 64) instead, because it does the same work.
May I know if you are using command line or the Visual Studio 2019 IDE . And also let me know if you have Intel oneAPI Base Toolkit or Intel oneAPI HPC Toolkit installed in your system? These inputs might help us in resolving the issue faster.
When we are compiling codes using Intel oneAPI DPC++ compiler, we can use __declspec(align(n)) prior to __assume_aligned(x,n).
There are various other ways to align data, you can follow the below link
While using __assume_aligned for C++ in Visual studio 2019 try switching to intel compiler i.e. Intel C++ compiler 19.2 .
You can do that by Right click on solution of project->Properties->General->Platform Toolset.
In the above case we can simply use __assume_align(a,n).
Please let us know if you require any other assistance from our side.
Hope we were able to resolve your issue. If you need any additional information, please submit a new query as this thread will no longer be monitored.