Scope of Restrict Keyword in Inline Function - 2022.1 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
Release Date
2022-05-25
Version
2022.1 English

When there are no other accesses within the scope, declaring the restrict pointer has no performance benefits.

Figure 1. Working Example with No Performance Benefits

In a special case, you can have non-aliasing accesses, as in the following example. Here the parent pointer, p, is used but points to a different location and therefore this is acceptable.

Figure 2. Special Case—Non-aliasing Accesses