Blender V4.3
types_uchar2_impl.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifndef __UTIL_TYPES_UCHAR2_IMPL_H__
6#define __UTIL_TYPES_UCHAR2_IMPL_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#ifndef __KERNEL_NATIVE_VECTOR_TYPES__
15# ifndef __KERNEL_GPU__
17{
18 util_assert(i >= 0);
19 util_assert(i < 2);
20 return *(&x + i);
21}
22
24{
25 util_assert(i >= 0);
26 util_assert(i < 2);
27 return *(&x + i);
28}
29# endif
30
32{
33 uchar2 a = {x, y};
34 return a;
35}
36#endif /* __KERNEL_NATIVE_VECTOR_TYPES__ */
37
39
40#endif /* __UTIL_TYPES_UCHAR2_IMPL_H__ */
unsigned char uchar
#define util_assert(statement)
Definition defines.h:98
#define ccl_device_inline
#define CCL_NAMESPACE_END
__forceinline uchar operator[](int i) const
ccl_device_inline uchar2 make_uchar2(uchar x, uchar y)