Blender V5.0
types_uchar2.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#pragma once
6
7#include "util/types_base.h"
8
10
11#ifndef __KERNEL_NATIVE_VECTOR_TYPES__
12struct uchar2 {
14
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};
31
33{
34 uchar2 a = {x, y};
35 return a;
36}
37#endif /* __KERNEL_NATIVE_VECTOR_TYPES__ */
38
unsigned char uchar
#define util_assert(statement)
#define ccl_device_inline
#define __forceinline
#define CCL_NAMESPACE_END
__forceinline uchar operator[](int i) const
uchar x
uchar y
__forceinline uchar & operator[](int i)
i
Definition text_draw.cc:230
ccl_device_inline uchar2 make_uchar2(const uchar x, const uchar y)