Blender V4.3
types_float8.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2017 Intel Corporation
2 * SPDX-FileCopyrightText: 2018-2022 Blender Foundation
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 * Originally by Intel Corporation, modified by the Blender Foundation. */
7
8#pragma once
9
10#ifndef __UTIL_TYPES_H__
11# error "Do not include this file directly, include util/types.h instead."
12#endif
13
15
16/* float8 is a reserved type in Metal that has not been implemented. For
17 * that reason this is named vfloat8 and not using native vector types. */
18
19#ifdef __KERNEL_GPU__
20struct vfloat8
21#else
22struct ccl_try_align(32) vfloat8
23#endif
24{
25#ifdef __KERNEL_AVX__
26 union {
27 __m256 m256;
28 struct {
29 float a, b, c, d, e, f, g, h;
30 };
31 };
32
33 __forceinline vfloat8();
34 __forceinline vfloat8(const vfloat8 &a);
35 __forceinline explicit vfloat8(const __m256 &a);
36
37 __forceinline operator const __m256 &() const;
38 __forceinline operator __m256 &();
39
40 __forceinline vfloat8 &operator=(const vfloat8 &a);
41
42#else /* __KERNEL_AVX__ */
43 float a, b, c, d, e, f, g, h;
44#endif /* __KERNEL_AVX__ */
45
46#ifndef __KERNEL_GPU__
47 __forceinline float operator[](int i) const;
48 __forceinline float &operator[](int i);
49#endif
50};
51
52ccl_device_inline vfloat8 make_vfloat8(float f);
54make_vfloat8(float a, float b, float c, float d, float e, float f, float g, float h);
55ccl_device_inline vfloat8 make_vfloat8(const float4 a, const float4 b);
56
57ccl_device_inline void print_vfloat8(ccl_private const char *label, const vfloat8 a);
58
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.
local_group_size(16, 16) .push_constant(Type b
const char * label
#define ccl_private
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define ccl_try_align(...)
#define __forceinline
ccl_device_inline vfloat8 make_vfloat8(float f)
ccl_device_inline void print_vfloat8(ccl_private const char *label, const vfloat8 a)