Blender
V5.3
source
blender
blenlib
BLI_unroll.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#pragma once
10
11
#include <cstdlib>
12
#include <utility>
13
14
namespace
blender
{
15
16
template
<
class
Fn,
size_t
...
I
>
17
constexpr
void
unroll_impl
(Fn
fn
, std::index_sequence<I...>
/*indices*/
)
18
{
19
(
fn
(
I
), ...);
20
}
21
27
template
<
int
N,
class
Fn>
constexpr
void
unroll
(Fn
fn
)
28
{
29
unroll_impl
(
fn
, std::make_index_sequence<N>());
30
}
31
32
}
// namespace blender
blender::fn
Definition
BKE_attribute.hh:30
blender
BMesh Iterators.
Definition
ANIM_action.hh:30
blender::unroll_impl
constexpr void unroll_impl(Fn fn, std::index_sequence< I... >)
Definition
BLI_unroll.hh:17
blender::unroll
constexpr void unroll(Fn fn)
Definition
BLI_unroll.hh:27
I
#define I
Definition
node_texture_proc.cc:30
Generated on
for Blender by
doxygen
1.18.0