Visible to Intel only — GUID: GUID-5CB175DD-28D4-4877-83DB-445EC246FDF4
Visible to Intel only — GUID: GUID-5CB175DD-28D4-4877-83DB-445EC246FDF4
Kernel Argument Interfaces
By default, the kernel arguments are passed to your component through the same interface as the start signal (that is, either through the IP component CSR or through inputs synchronized to a ready/valid handshake). However, you can override this behavior. For example, you can select a register-mapped invocation interface with arguments passed through conduits, or you can select a streaming invocation interface with arguments passed through the register map.
The following code snippet demonstrates how to place the invocation interface in the CSR, and pass kernel arguments through conduit interfaces:
#include <sycl/ext/intel/prototype/interfaces.hpp>
using namespace sycl;
struct MyIP {
conduit int *input_a, *input_b, *input_c;
conduit int n;
register_map_interface void operator()() const {
for (int i = 0; i < n; i++) {
input_c[i] = input_a[i] + input_b[i];
}
}
};
The following code snippet demonstrates how to configure the kernel with a handshake invocation interface, and pass kernel arguments through the CSR:
#include <sycl/ext/intel/prototype/interfaces.hpp>
using namespace sycl;
struct MyIP {
register_map int *input_a, *input_b, *input_c;
register_map int n;
streaming_interface void operator()() const {
for (int i = 0; i < n; i++) {
input_c[i] = input_a[i] + input_b[i];
}
}
};