Blender V5.0
types_uint2.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 uint2 {
14
15# ifndef __KERNEL_GPU__
17 {
18 util_assert(i < 2);
19 return *(&x + i);
20 }
21
23 {
24 util_assert(i < 2);
25 return *(&x + i);
26 }
27# endif
28};
29
31{
32 uint2 a = {x, y};
33 return a;
34}
35#endif /* __KERNEL_NATIVE_VECTOR_TYPES__ */
36
unsigned int uint
#define util_assert(statement)
#define ccl_device_inline
#define __forceinline
#define CCL_NAMESPACE_END
__forceinline uint operator[](uint i) const
Definition types_uint2.h:16
uint x
Definition types_uint2.h:13
__forceinline uint & operator[](uint i)
Definition types_uint2.h:22
uint y
Definition types_uint2.h:13
i
Definition text_draw.cc:230
ccl_device_inline uint2 make_uint2(const uint x, const uint y)
Definition types_uint2.h:30