#pragma once
#ifdef _MSC_VER
#include <intrin.h>
#endif
#ifdef __hexagon__
#include <hexagon_protos.h>
XNN_INLINE static void xnn_prefetch_to_l2_linear(void *address, uint32_t size_fetch)
{
uint32_t info = HEXAGON_V64_CREATE_H(0, 0, size_fetch, 1);
Q6_l2fetch_AR(address, info);
}
XNN_INLINE static void xnn_prefetch_to_l2_box(void *address,
uint64_t stride,
uint64_t width,
uint64_t height,
uint64_t direction)
{
uint64_t info = HEXAGON_V64_CREATE_H(direction, stride, width, height);
Q6_l2fetch_AP(address, info);
}
#endif
#include "xnnpack/common.h"
XNN_INLINE static void xnn_prefetch_to_l1(const void* address) { … }