Loading...
Searching...
No Matches
Namespaces | Functions
control.h File Reference

Data and flow control. More...

#include <concepts>
#include "util/multirange_for.h"
#include "backbone/type_traits.h"
#include "backbone/horizontal.h"

Go to the source code of this file.

Namespaces

namespace  backbone
 Random number generator; built on top of Drjit.
 

Functions

template<typename NEWTYPE , typename OLDTYPE >
constexpr NEWTYPE cast (OLDTYPE &&val)
 cast
 
template<typename RET , typename C >
requires std::ranges::range<C> && std::convertible_to<bbm::iterable_value_t<C>, RET>
constexpr RET lookup (C &&container, size_t idx, bool mask=true)
 lookup
 
template<typename VAL , typename C >
requires std::ranges::range<C> && std::convertible_to<VAL, bbm::iterable_value_t<C>>
constexpr void set (C &&container, size_t idx, VAL &&value, bool mask=true)
 set
 
template<typename C , typename PRED >
requires std::ranges::range<C> && std::is_invocable_r_v<bool, PRED, bbm::iterable_value_t<C>>
constexpr size_t binary_search (C &&container, PRED &&predicate, bool mask=true)
 binary_search
 
select
template<typename T , typename U >
requires requires(std::decay_t<T> a, std::decay_t<U> b) {{a+b};}
constexpr auto select (bool mask, const T &a, const U &b)
 
template<typename T , typename U , size_t N>
requires requires(value_t<T> a, value_t<U> b) {{a+b};}
constexpr auto select (const array< bool, N > &mask, const T &a, const U &b)
 
template<typename T , typename U >
requires (!is_complex_v<U>) && requires(value_t<T> a, value_t<U> b) {{a+b};}
constexpr auto select (const array< bool, 2 > &mask, const complex< T > &z, const U &u)
 
template<typename T , typename U >
requires (!is_complex_v<U>) && requires(value_t<T> a, value_t<U> b) {{a+b};}
constexpr auto select (const array< bool, 2 > &mask, const U &u, const complex< T > &z)
 

Detailed Description

Data and flow control.