Developer Guide

Intel® oneAPI DPC++/C++ Compiler Handbook for FPGAs

ID 785441
Date 10/24/2024
Public
Document Table of Contents

FPGA Accessor Properties

The following table summarizes FPGA accessor properties:

FPGA Accessor Properties
Property Description Example
buffer_location<index>

Instructs the host to allocate a buffer to a specific global memory type.

It identifies the index of the global memory type in the board_spec.xml file of your Custom Platform. If there is no global memory marked with "default=1" in the board_spec.xml file, then the index starts at 0 and follows the order in which the global memory appears in the board_spec.xml file. Otherwise, index 0 refers to the default memory and indices 1 and onwards follow the order in which the remaining global memories appear in the board_spec.xml file.

If you do not specify the buffer_location property, the host allocates the buffer to the default memory type automatically.

ext::oneapi::accessor_property_list PL{ext::intel::buffer_location<2>};
accessor accessor(buffer, cgh, read_only, PL);
no_alias

Notifies the compiler that all modifications to the memory locations accessed (directly or indirectly) by an accessor during kernel execution is done through the same accessor (directly or indirectly) and not by any other accessor or USM pointer in the kernel. This is an unchecked assertion by the programmer and results in an undefined behavior if it is violated.

ext::oneapi::accessor_property_list PL{ext::oneapi::no_alias};
accessor accessor(buffer, cgh, read_only, PL);
no_offset Notifies the compiler that the accessor will never contain an offset. This can enable the compiler to make assumptions about the alignment of the accessor that it could not make otherwise.
ext::oneapi::accessor_property_list PL{ext::oneapi::property::no_offset};
accessor accessor(buffer, cgh, read_only, PL);