HiRep 0.1
Loading...
Searching...
No Matches
random_generic.h
Go to the documentation of this file.
1/***************************************************************************\
2* Copyright (c) 2023, Sofie Martins *
3* All rights reserved. *
4\***************************************************************************/
5
11#ifndef RANDOM_GENERIC_H
12#define RANDOM_GENERIC_H
13
14#include "random.h"
15#include "utils.h"
16
17#define random_field(s1) \
18 _Generic((s1), \
19 spinor_field *: gaussian_spinor_field((spinor_field *)s1), \
20 spinor_field_flt *: gaussian_spinor_field_flt((spinor_field_flt *)s1), \
21 scalar_field *: gaussian_scalar_field((scalar_field *)s1), \
22 suNg_field *: random_u((suNg_field *)s1), \
23 suNf_field *: random_u_f((suNf_field *)s1), \
24 suNfc_field *: random_suNfc_field_cpu((suNfc_field *)s1), \
25 suNg_field_flt *: random_suNg_field_flt_cpu((suNg_field_flt *)s1), \
26 suNf_field_flt *: random_suNf_field_flt_cpu((suNf_field_flt *)s1), \
27 suNg_scalar_field *: random_suNg_scalar_field_cpu((suNg_scalar_field *)s1), \
28 suNg_av_field *: random_suNg_av_field_cpu((suNg_av_field *)s1), \
29 gtransf *: random_gtransf_cpu((gtransf *)s1), \
30 clover_term *: random_clover_term_cpu((clover_term *)s1), \
31 clover_force *: random_clover_force_cpu((clover_force *)s1), \
32 staple_field *: random_staple_field_cpu((staple_field *)s1))
33
34#endif