Blender  V3.3
types_float8.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Original code Copyright 2017, Intel Corporation
3  * Modifications Copyright 2018-2022 Blender Foundation. */
4 
5 #ifndef __UTIL_TYPES_FLOAT8_H__
6 #define __UTIL_TYPES_FLOAT8_H__
7 
8 #ifndef __UTIL_TYPES_H__
9 # error "Do not include this file directly, include util/types.h instead."
10 #endif
11 
13 
14 /* float8 is a reserved type in Metal that has not been implemented. For
15  * that reason this is named float8_t. */
16 
17 #ifdef __KERNEL_GPU__
18 struct float8_t
19 #else
20 struct ccl_try_align(32) float8_t
21 #endif
22 {
23 #ifdef __KERNEL_AVX2__
24  union {
25  __m256 m256;
26  struct {
27  float a, b, c, d, e, f, g, h;
28  };
29  };
30 
31  __forceinline float8_t();
32  __forceinline float8_t(const float8_t &a);
33  __forceinline explicit float8_t(const __m256 &a);
34 
35  __forceinline operator const __m256 &() const;
36  __forceinline operator __m256 &();
37 
38  __forceinline float8_t &operator=(const float8_t &a);
39 
40 #else /* __KERNEL_AVX2__ */
41  float a, b, c, d, e, f, g, h;
42 #endif /* __KERNEL_AVX2__ */
43 
44 #ifndef __KERNEL_GPU__
45  __forceinline float operator[](int i) const;
46  __forceinline float &operator[](int i);
47 #endif
48 };
49 
50 ccl_device_inline float8_t make_float8_t(float f);
51 ccl_device_inline float8_t
52 make_float8_t(float a, float b, float c, float d, float e, float f, float g, float h);
53 
55 
56 #endif /* __UTIL_TYPES_FLOAT8_H__ */
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
SIMD_FORCE_INLINE btVector3 & operator[](int i)
Get a mutable reference to a row of the matrix as a vector.
Definition: btMatrix3x3.h:157
#define ccl_device_inline
Definition: cuda/compat.h:34
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
#define __forceinline
CCL_NAMESPACE_BEGIN struct ccl_try_align(32) float8_t
Definition: types_float8.h:20
ccl_device_inline float8_t make_float8_t(float f)