Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/embree/common/simd/avx512.h
9912 views
1
// Copyright 2009-2021 Intel Corporation
2
// SPDX-License-Identifier: Apache-2.0
3
4
#pragma once
5
6
#include "../sys/platform.h"
7
#include "../sys/intrinsics.h"
8
#include "../math/constants.h"
9
#include "../sys/alloc.h"
10
#include "varying.h"
11
12
#include "vboolf16_avx512.h"
13
#include "vint16_avx512.h"
14
#include "vuint16_avx512.h"
15
#include "vfloat16_avx512.h"
16
17
#include "vboold8_avx512.h"
18
#include "vllong8_avx512.h"
19
#include "vdouble8_avx512.h"
20
21
namespace embree
22
{
23
////////////////////////////////////////////////////////////////////////////////
24
/// Prefetching
25
////////////////////////////////////////////////////////////////////////////////
26
27
#define PFHINT_L1 0
28
#define PFHINT_L2 1
29
#define PFHINT_NT 2
30
31
template<const unsigned int mode>
32
__forceinline void prefetch(const void * __restrict__ const m)
33
{
34
if (mode == PFHINT_L1)
35
_mm_prefetch((const char*)m,_MM_HINT_T0);
36
else if (mode == PFHINT_L2)
37
_mm_prefetch((const char*)m,_MM_HINT_T1);
38
else if (mode == PFHINT_NT)
39
_mm_prefetch((const char*)m,_MM_HINT_NTA);
40
}
41
}
42
43