Loading...
Searching...
No Matches
complex.h
Go to the documentation of this file.
1#ifndef _BBM_COMPLEX_BACKBONE_CONCEPT_H_
2#define _BBM_COMPLEX_BACKBONE_CONCEPT_H_
3
4#include <concepts>
5
6/************************************************************************/
7/*! \file complex.h
8
9 \brief Additional requirements for the complex data-type (in addition to all
10 other backbone type requirements; see BBM_VALIDATE_BACKBONE in backbone.h).
11
12*************************************************************************/
13
14namespace bbm {
15 namespace concepts {
16 namespace backbone {
17
18 /******************************************************************/
19 /*! \brief Addiional requirements for complex data-type.
20 *****************************************************************/
21 template<typename T>
22 concept has_complex_functions = requires(T a)
23 {
25
26 { real(a) } -> std::convertible_to<value_t<T>>;
27 { imag(a) } -> std::convertible_to<value_t<T>>;
28 { conj(a) } -> std::same_as<T>;
29 };
30
31 } // end backbone namespace
32 } // end concepts namespace
33} // end bbm namespace
34
35#endif /* _BBM_COMPLEX_BACKBONE_CONCEPT_H_ */
Addiional requirements for complex data-type.
Definition: complex.h:22
Definition: util.h:25
Random number generator; built on top of Drjit.
Definition: backbone.h:53
Definition: aggregatebsdf.h:29