hi,
I was wondering how internaly data are processed in multicore process.
if i got an array that need to read and share with multiple core using the same fonction. Does this array will be acceded without dead lock by all the core or will i need to inform the processor that the array is read-only.
Or Does the compilator recognize the read-only acces in this case.
Some explaination of how data are managed in multicore would be fine. Is this array will be copied for each core or shared by all the core. i got an médiatek 9200+ (1*ARM X3,3*ARM A715,4*ARM A510)
thanks.
Hi hterrolle,
It's definitely good to tell the compiler when an array is read-only as it can make significant optimisations if it knows this. Although it should be able to avoid deadlocks, it may be able to be more efficient, but even more it may help auto-vectorization into Neon or SVE which will give significant speedups. Sometimes it can work out that it's read-only by itself, but there's no harm in giving it the hint. In c/c++ that is using the __restrict__ keyword.https://developer.arm.com/documentation/101458/1930/Coding-best-practice/Coding-best-practice-for-auto-vectorization