Specifying Resource Binding

This pragma can be used for function callsites to manually specify resource binding.

The syntax of the pragma is:
#pragma SDS resource(ID)

The resource pragma is specified immediately preceding a call to a hardware function, directing the compiler to bind the caller to a specified accelerator instance.

The ID must be a compile time unsigned integer constant. For the same function, each unique ID represents a unique instance of the hardware accelerator.

Example 1

The following code snippet shows an example of using this pragma with a different ID:
    #pragma SDS resource(1)
    mmult(A, B, C);
    #pragma SDS resource(2)
    mmult(D, E, F);

In the above example, the first call to mmult will be bound to an accelerator with an ID of 1, and the second call to mmult will be bound to another accelerator with an ID of 2.