ROCK  1.11.5
Relativistic Oscillator Calculation Kit
crock.h
Go to the documentation of this file.
1 #ifndef ROCK_CROCK_H
7 #define ROCK_CROCK_H
8 
9 #include "types.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #include <stddef.h>
16 #include <stdint.h>
17 
18 #if defined(_MSC_VER) || (defined(__GNUC__) && defined(_WIN32))
19 #ifdef BUILD_CROCK_DLL
20 #define CROCK_API __declspec(dllexport)
21 #else
22 #define CROCK_API __declspec(dllimport)
23 #endif
24 #elif defined(__GNUC__)
25 #define CROCK_API __attribute__((__visibility__("default")))
26 #endif
27 
28 #ifdef CROCK_SUPPRESS_API
29 #undef CROCK_API
30 #endif
31 
32 #ifndef CROCK_API
33 #define CROCK_API
34 #endif
35 #ifdef __GNUC__
36 #define ROCK_MALLOC __attribute__((__malloc__))
37 #define ROCK_PURE __attribute__((__pure__))
38 #define ROCK_CONST __attribute__((__const__))
39 #define ROCK_NODISCARD __attribute__((__warn_unused_result__))
40 #define ROCK_UNUSED __attribute__((__unused__))
41 #else
42 #define ROCK_MALLOC
43 #define ROCK_PURE
44 #define ROCK_CONST
45 #define ROCK_NODISCARD
46 #define ROCK_UNUSED
47 #endif
48 
50 #define ROCK_MASK_BLT_VAR_UZ 0x00000001
51 #define ROCK_MASK_BLT_TAYLOR 0x00000002
53 #define ROCK_MASK_BLT_CALI_CYC_PHASE 0x00000004
56 #define ROCK_MASK_BLT_CALI_GC_AZI 0x00000008
60 #define ROCK_MASK_BLT_CALI_GC_R 0x00000010
63 #define ROCK_MASK_BLT_B_RF_PERP 0x00000020
66 #define ROCK_MASK_BLT_DOPPLER ROCK_MASK_BLT_B_RF_PERP
68 #define ROCK_MASK_BLT_TREAT_BEAM_INIT_AS_RAW_IMPORT 0x00010000
79 #define ROCK_MASK_BLT_SRC_MONOHARM 0x40000000
86 #define ROCK_MASK_BLT_MONOGC 0x80000000
89 #define ROCK_MASK_BLT_DEBUG ROCK_MASK_BLT_MONOGC
92 
94 #define ROCK_MASK_BLT_ALL_FEATURES \
95  (ROCK_MASK_BLT_VAR_UZ | ROCK_MASK_BLT_TAYLOR \
96  | ROCK_MASK_BLT_CALI_CYC_PHASE | ROCK_MASK_BLT_CALI_GC_AZI \
97  | ROCK_MASK_BLT_CALI_GC_R | ROCK_MASK_BLT_B_RF_PERP)
98 
107 #define ROCK_FOREACH(X) for (size_t i##X = 0; i##X < (dim_##X); ++i##X)
108 
110 #define ROCK_FOREACH_1(X) for (size_t i##X = 1; i##X < (dim_##X); ++i##X)
111 
113 #define ROCK_IF_RETURN(IF_VAL, RET_VAL) \
114  do { \
115  if (IF_VAL) \
116  return RET_VAL; \
117  } while (0)
118 
125 CROCK_API
126 int cr_numa_bless(
127  void *restrict buf,
128  size_t sizeof_type,
129  size_t dim_shape,
130  const size_t *restrict shape
131 );
132 
134 #define CR_NUMA_BLESS(type, buf, ...) \
135  cr_numa_bless( \
136  (buf), (size_t)sizeof(type), \
137  (size_t)(sizeof((size_t[]){__VA_ARGS__}) / sizeof(size_t)), \
138  (size_t[]){__VA_ARGS__} \
139  )
140 
181 struct cr_cache {
182  void (*free)(struct cr_cache *self);
183 };
184 
185 CROCK_API
188 int cr_version_major(void);
189 
190 CROCK_API
193 int cr_version_minor(void);
194 
195 CROCK_API
198 int cr_version_patch(void);
199 
201 CROCK_API
202 ROCK_PURE
204 const char *cr_errmsg(int err);
205 
206 CROCK_API
209 int cr_simd_lanes(void);
210 
233 CROCK_API
235 int cr_make_mag_axis(
236  size_t dim_coil,
237  const real *restrict z_min,
238  const real *restrict z_max,
239  const real *restrict r_min,
240  const real *restrict r_max,
241  const real *restrict ampere_turns,
242  size_t dim_z,
243  const real *restrict vn_z,
244  real *restrict vn_mag_axis
245 );
246 
250 CROCK_API
251 ROCK_PURE
253 size_t cr_stride_real(size_t dim);
254 
258 CROCK_API
259 ROCK_PURE
261 size_t cr_stride_cplx(size_t dim);
262 
266 CROCK_API
268  size_t dim_m,
269  const int16_t *restrict vm_num,
270  size_t dim_z,
271  const real *restrict vn_geo_rout,
272  real *restrict mvn_mod
273 );
274 
281 CROCK_API
283  size_t dim_m,
284  const int16_t *restrict vm_num,
285  size_t dim_z,
286  const real *restrict vn_geo_rout,
287  const real *restrict vn_geo_rin,
288  real *restrict mvn_mod
289 );
290 
297 CROCK_API
299  size_t dim_m,
300  const int16_t *restrict vm_num,
301  size_t dim_z,
302  const real *restrict vn_geo_rout,
303  const real *restrict vn_geo_rin,
304  const real *restrict vn_geo_rel_w,
305  const real *restrict vn_geo_depth,
306  real *restrict mvn_mod
307 );
308 
314 CROCK_API
316  size_t dim_m,
317  const int16_t *restrict vm_num,
318  size_t dim_z,
319  const real *restrict vn_geo_rout,
320  const real *restrict vn_geo_rel_w,
321  const real *restrict vn_geo_depth,
322  real *restrict mvn_mod
323 );
324 
332 CROCK_API
334  size_t dim_m,
335  size_t dim_z,
336  const real *restrict vn_z,
337  const cplx *restrict mvn_env,
338  real *restrict opt_vm_energy
339 );
340 
349 CROCK_API
351  size_t dim_m,
352  size_t dim_z,
353  const real *restrict vn_z,
354  const cplx *restrict mvn_env_new,
355  const cplx *restrict mvn_env_old,
356  real *restrict opt_vm_energy_diff
357 );
358 
375 CROCK_API
377  const real *restrict opt_ptr_ref_z,
378  size_t dim_m,
379  size_t dim_z,
380  const real *restrict vn_z,
381  const real *restrict mvn_mod,
382  cplx *restrict vm_freq
383 );
384 
400 CROCK_API
402  size_t dim_m,
403  const real *restrict opt_vm_freq_init,
404  size_t dim_z,
405  size_t opt_iz_min_fcut,
406  const real *restrict vn_z,
407  const real *restrict mvn_mod,
408  const real *restrict tdm_c,
409  const real *restrict mv_tdm_zk,
410  cplx *restrict vm_cfreq
411 );
412 
423 CROCK_API
425  size_t dim_z,
426  size_t opt_iz_min_fcut,
427  const real *restrict vn_z,
428  const real *restrict vn_mod,
429  const real *restrict tdm_c,
430  const real *restrict tdm_zk,
431  size_t dim_freq,
432  size_t *restrict out_dim_freq,
433  cplx *restrict out_cfreq
434 );
435 
446 CROCK_API
448  size_t dim_m,
449  const cplx *restrict vm_rfc,
450  size_t dim_z,
451  const real *restrict vn_z,
452  const real *restrict mvn_mod,
453  cplx *restrict mvn_env
454 );
455 
458 CROCK_API
459 ROCK_PURE
462  size_t dim_z, const real *restrict vn_z, const real *restrict vn_mod
463 );
464 
471 CROCK_API
473  size_t dim_z,
474  const real *restrict vn_z,
475  const real *restrict vn_mod,
476  size_t dim_freq,
477  real *restrict freq,
478  real *restrict ampl
479 );
480 
489 CROCK_API
491  int max_iter,
492  size_t dim_z,
493  const real *restrict vn_z,
494  const real *restrict vn_mod,
495  const real *restrict tdm_c,
496  const real *restrict tdm_zk,
497  size_t dim_freq,
498  real *restrict freq,
499  real *restrict ampl
500 );
501 
508 CROCK_API
509 int cr_make_fem(
510  size_t dim_m,
511  size_t dim_z,
512  const real *restrict vn_z,
513  const real *restrict mvn_mod,
514  real *restrict tdm_c,
515  real *restrict mv_tdm_zk
516 );
517 
532 CROCK_API
533 int cr_step_field(
534  real dt,
535  size_t dim_m,
536  const real *restrict vm_cf,
537  const cplx *restrict vm_bc,
538  size_t dim_z,
539  const real *restrict tdm_c,
540  const real *restrict mv_tdm_zk,
541  const cplx *restrict mvn_src,
542  const real *restrict opt_mvn_losscoef,
543  cplx *restrict vm_bd,
544  cplx *restrict mvn_env,
545  real *restrict opt_vm_cp,
546  real *restrict opt_vm_df,
547  struct cr_cache *restrict *restrict opt_pp_cache
548 );
549 
553 CROCK_API
554 void cr_make_bc_simple(
555  size_t dim_m,
556  const real *restrict vm_freq,
557  size_t dim_z,
558  const real *restrict mvn_mod,
559  cplx *restrict vm_bc
560 );
561 
563 CROCK_API
564 void cr_init_bp(
565  size_t dim_m,
566  size_t dim_z,
567  const cplx *restrict mvn_env,
568  real *restrict vm_bp
569 );
570 
574 CROCK_API
576  real dt,
577  size_t dim_m,
578  const real *restrict vm_cf,
579  size_t dim_z,
580  const real *restrict mvn_mod,
581  const cplx *restrict mvn_env,
582  real *restrict vm_bp,
583  cplx *restrict vm_bc
584 );
585 
598 CROCK_API
599 void cr_init_bd(
600  size_t dim_m,
601  const cplx *restrict vm_bc,
602  size_t dim_z,
603  const cplx *restrict mvn_env,
604  cplx *restrict vm_bd
605 );
606 
607 CROCK_API ROCK_MALLOC void *cr_malloc(size_t size);
608 CROCK_API void cr_free(void *ptr);
609 
621 CROCK_API
622 void cr_make_potential(
623  real pot_outer,
624  real opt_pot_inner,
625  const real *restrict beam_init,
626  size_t dim_z,
627  const real *restrict vn_mag_axis,
628  const real *restrict vn_rhocd,
629  const real *restrict vn_r_outer,
630  const real *restrict opt_vn_r_inner,
631  real *restrict vn_pot
632 );
633 
649 CROCK_API
650 int cr_make_bcc(
651  real r_center,
652  real r_span,
653  size_t dim_m,
654  const int16_t *restrict vm_num,
655  size_t dim_z,
656  const real *restrict vn_mag_axis,
657  const real *restrict mvn_mod,
658  size_t dim_bcc,
659  real *restrict nvmh_bcc
660 );
661 
696 CROCK_API
697 int cr_shoot_beamlet(
698  uint32_t options,
699  real beam_offset_x,
700  const real *restrict beam_init,
701  size_t dim_m,
702  const int16_t *restrict vm_num,
703  const real *restrict vm_cf,
704  const real *restrict vm_cp,
705  size_t dim_z,
706  const real *restrict vn_z,
707  const real *restrict vn_pot,
708  const real *restrict vn_mag_axis,
709  const real *restrict mvn_mod,
710  const cplx *restrict mvn_env,
711  size_t dim_b,
712  size_t dim_bcc,
713  real bcc_r_center,
714  real bcc_r_span,
715  const real *restrict nvmh_bcc,
716  uint32_t *seed,
717  real *restrict vn_rhocd,
718  cplx *restrict mvn_src,
719  real *restrict opt_vn_mrs,
720  real *restrict opt_vn_blt_avg,
721  real *restrict opt_bvn_blt_trj,
722  struct cr_cache *restrict *restrict opt_pp_cache
723 );
724 
732 CROCK_API
733 void cr_make_power_out(
734  size_t dim_m,
735  const real *restrict vm_cf,
736  size_t dim_z,
737  const real *restrict mvn_mod,
738  const cplx *restrict mvn_env,
739  real *restrict opt_vm_pout_left,
740  real *restrict opt_vm_pout_right
741 );
742 
757 CROCK_API
759  real r,
760  real d,
761  real w,
762  int16_t num_azi,
763  int16_t num_rad,
764  real *restrict opt_array_chi
765 );
766 
782 CROCK_API
784  real d,
785  real w,
786  int16_t num_azi,
787  int16_t num_rad,
788  real *restrict opt_array_chi
789 );
790 
795 CROCK_API
796 void cr_make_uload(
797  size_t dim_m,
798  size_t dim_z,
799  const cplx *restrict mvn_env,
800  const real *restrict mvn_uuload,
801  real *restrict vn_uload
802 );
803 
811 CROCK_API
812 void cr_make_uuload(
813  size_t dim_m,
814  const int16_t *restrict vm_num,
815  const real *restrict vm_freq,
816  size_t dim_z,
817  const real *restrict vn_radius,
818  const real *restrict mvn_mod,
819  real *restrict mvn_uuload
820 );
821 
825 CROCK_API
826 int cr_tdm_solve(
827  size_t systems,
828  size_t rows,
829  const cplx *restrict multi_mat,
830  const cplx *restrict multi_vec,
831  cplx *restrict multi_x
832 );
833 
839 CROCK_API
840 void cr_make_df(
841  real elapsed_time,
842  size_t dim_m,
843  size_t dim_z,
844  const cplx *restrict mvn_new_env,
845  real *restrict mvn_old_env_phase,
846  real *restrict vm_df
847 );
848 
856 CROCK_API
857 int cr_refine_z(
858  real weight,
859  size_t dim_z,
860  const real *restrict vn_z,
861  const real *restrict vn_mrs,
862  size_t dim_z_new,
863  real *restrict vn_z_new
864 );
865 
869 CROCK_API
871  size_t systems,
872  size_t rows,
873  const cplx *restrict multi_mat,
874  const cplx *restrict multi_vec,
875  cplx *restrict multi_x
876 );
877 
879 CROCK_API
881  real dt,
882  size_t dim_m,
883  const real *restrict vm_cf,
884  const cplx *restrict vm_bc,
885  size_t dim_z,
886  const real *restrict tdm_c,
887  const real *restrict mv_tdm_zk,
888  const cplx *restrict mvn_src,
889  cplx *restrict vm_bd,
890  cplx *restrict mvn_env,
891  real *restrict opt_vm_cp,
892  real *restrict opt_vm_df,
893  struct cr_cache *restrict *restrict opt_pp_cache
894 );
895 
897 CROCK_API
899  real dt,
900  size_t dim_m,
901  const real *restrict vm_cf,
902  const cplx *restrict vm_bc,
903  size_t dim_z,
904  const real *restrict tdm_c,
905  const real *restrict mv_tdm_zk,
906  const cplx *restrict mvn_src,
907  cplx *restrict vm_bd,
908  cplx *restrict mvn_env,
909  real *restrict opt_vm_cp,
910  real *restrict opt_vm_df,
911  struct cr_cache *restrict *restrict opt_pp_cache
912 );
913 
914 #ifdef __cplusplus
915 }
916 #endif
917 
918 #endif
CROCK_API int cr_find_cold_resonance(size_t dim_m, const real *restrict opt_vm_freq_init, size_t dim_z, size_t opt_iz_min_fcut, const real *restrict vn_z, const real *restrict mvn_mod, const real *restrict tdm_c, const real *restrict mv_tdm_zk, cplx *restrict vm_cfreq)
CROCK_API ROCK_CONST ROCK_NODISCARD int cr_version_major(void)
CROCK_API void cr_make_power_out(size_t dim_m, const real *restrict vm_cf, size_t dim_z, const real *restrict mvn_mod, const cplx *restrict mvn_env, real *restrict opt_vm_pout_left, real *restrict opt_vm_pout_right)
CROCK_API int cr_tdm_solve(size_t systems, size_t rows, const cplx *restrict multi_mat, const cplx *restrict multi_vec, cplx *restrict multi_x)
void(* free)(struct cr_cache *self)
Definition: crock.h:182
CROCK_API int cr_step_field(real dt, size_t dim_m, const real *restrict vm_cf, const cplx *restrict vm_bc, size_t dim_z, const real *restrict tdm_c, const real *restrict mv_tdm_zk, const cplx *restrict mvn_src, const real *restrict opt_mvn_losscoef, cplx *restrict vm_bd, cplx *restrict mvn_env, real *restrict opt_vm_cp, real *restrict opt_vm_df, struct cr_cache *restrict *restrict opt_pp_cache)
CROCK_API int cr_step_field_gpu(real dt, size_t dim_m, const real *restrict vm_cf, const cplx *restrict vm_bc, size_t dim_z, const real *restrict tdm_c, const real *restrict mv_tdm_zk, const cplx *restrict mvn_src, cplx *restrict vm_bd, cplx *restrict mvn_env, real *restrict opt_vm_cp, real *restrict opt_vm_df, struct cr_cache *restrict *restrict opt_pp_cache)
Doc see the CPU version.
CROCK_API real cr_make_chi_TE_corr_ins(real r, real d, real w, int16_t num_azi, int16_t num_rad, real *restrict opt_array_chi)
#define ROCK_MALLOC
Definition: crock.h:42
CROCK_API int cr_find_all_cold_resonances(size_t dim_z, size_t opt_iz_min_fcut, const real *restrict vn_z, const real *restrict vn_mod, const real *restrict tdm_c, const real *restrict tdm_zk, size_t dim_freq, size_t *restrict out_dim_freq, cplx *restrict out_cfreq)
CROCK_API int cr_tdm_solve_offload(size_t systems, size_t rows, const cplx *restrict multi_mat, const cplx *restrict multi_vec, cplx *restrict multi_x)
#define ROCK_NODISCARD
Definition: crock.h:45
CROCK_API void cr_update_bc_simple(real dt, size_t dim_m, const real *restrict vm_cf, size_t dim_z, const real *restrict mvn_mod, const cplx *restrict mvn_env, real *restrict vm_bp, cplx *restrict vm_bc)
CROCK_API int cr_make_bcc(real r_center, real r_span, size_t dim_m, const int16_t *restrict vm_num, size_t dim_z, const real *restrict vn_mag_axis, const real *restrict mvn_mod, size_t dim_bcc, real *restrict nvmh_bcc)
CROCK_API real cr_make_chi_TE_corr_holl_imp(real d, real w, int16_t num_azi, int16_t num_rad, real *restrict opt_array_chi)
#define ROCK_CONST
Definition: crock.h:44
double real
Definition: types.h:13
CROCK_API int cr_shoot_beamlet(uint32_t options, real beam_offset_x, const real *restrict beam_init, size_t dim_m, const int16_t *restrict vm_num, const real *restrict vm_cf, const real *restrict vm_cp, size_t dim_z, const real *restrict vn_z, const real *restrict vn_pot, const real *restrict vn_mag_axis, const real *restrict mvn_mod, const cplx *restrict mvn_env, size_t dim_b, size_t dim_bcc, real bcc_r_center, real bcc_r_span, const real *restrict nvmh_bcc, uint32_t *seed, real *restrict vn_rhocd, cplx *restrict mvn_src, real *restrict opt_vn_mrs, real *restrict opt_vn_blt_avg, real *restrict opt_bvn_blt_trj, struct cr_cache *restrict *restrict opt_pp_cache)
CROCK_API int cr_make_mode_corr_ins(size_t dim_m, const int16_t *restrict vm_num, size_t dim_z, const real *restrict vn_geo_rout, const real *restrict vn_geo_rin, const real *restrict vn_geo_rel_w, const real *restrict vn_geo_depth, real *restrict mvn_mod)
CROCK_API void cr_free(void *ptr)
CROCK_API int cr_numa_bless(void *restrict buf, size_t sizeof_type, size_t dim_shape, const size_t *restrict shape)
Set the data of buf to zero.
CROCK_API int cr_make_cold_envelope(size_t dim_m, const cplx *restrict vm_rfc, size_t dim_z, const real *restrict vn_z, const real *restrict mvn_mod, cplx *restrict mvn_env)
CROCK_API int cr_make_mode_coax(size_t dim_m, const int16_t *restrict vm_num, size_t dim_z, const real *restrict vn_geo_rout, const real *restrict vn_geo_rin, real *restrict mvn_mod)
CROCK_API ROCK_PURE ROCK_NODISCARD size_t cr_stride_cplx(size_t dim)
Calculate stride including padding.
CROCK_API int cr_refine_z(real weight, size_t dim_z, const real *restrict vn_z, const real *restrict vn_mrs, size_t dim_z_new, real *restrict vn_z_new)
Remap vn_z into vn_z_ne considering the mesh refinement score.
CROCK_API void cr_make_potential(real pot_outer, real opt_pot_inner, const real *restrict beam_init, size_t dim_z, const real *restrict vn_mag_axis, const real *restrict vn_rhocd, const real *restrict vn_r_outer, const real *restrict opt_vn_r_inner, real *restrict vn_pot)
CROCK_API int cr_deprecated_make_cold_spectrum(size_t dim_z, const real *restrict vn_z, const real *restrict vn_mod, size_t dim_freq, real *restrict freq, real *restrict ampl)
CROCK_API void cr_init_bd(size_t dim_m, const cplx *restrict vm_bc, size_t dim_z, const cplx *restrict mvn_env, cplx *restrict vm_bd)
#define ROCK_PURE
Definition: crock.h:43
CROCK_API ROCK_CONST ROCK_NODISCARD int cr_version_patch(void)
CROCK_API void cr_make_uload(size_t dim_m, size_t dim_z, const cplx *restrict mvn_env, const real *restrict mvn_uuload, real *restrict vn_uload)
CROCK_API int cr_deprecated_search_cold_resonance(const real *restrict opt_ptr_ref_z, size_t dim_m, size_t dim_z, const real *restrict vn_z, const real *restrict mvn_mod, cplx *restrict vm_freq)
CROCK_API int cr_make_mode_holl(size_t dim_m, const int16_t *restrict vm_num, size_t dim_z, const real *restrict vn_geo_rout, real *restrict mvn_mod)
CROCK_API void cr_make_df(real elapsed_time, size_t dim_m, size_t dim_z, const cplx *restrict mvn_new_env, real *restrict mvn_old_env_phase, real *restrict vm_df)
CROCK_API ROCK_NODISCARD int cr_make_mag_axis(size_t dim_coil, const real *restrict z_min, const real *restrict z_max, const real *restrict r_min, const real *restrict r_max, const real *restrict ampere_turns, size_t dim_z, const real *restrict vn_z, real *restrict vn_mag_axis)
Make a vector of B-field on axis of solenoids.
double _Complex cplx
Definition: types.h:14
CROCK_API ROCK_PURE ROCK_NODISCARD size_t cr_stride_real(size_t dim)
Calculate stride including padding.
CROCK_API ROCK_PURE ROCK_NODISCARD const char * cr_errmsg(int err)
CROCK_API ROCK_CONST ROCK_NODISCARD int cr_version_minor(void)
CROCK_API real cr_make_stored_energy_diff(size_t dim_m, size_t dim_z, const real *restrict vn_z, const cplx *restrict mvn_env_new, const cplx *restrict mvn_env_old, real *restrict opt_vm_energy_diff)
Calculate the difference of stored energy.
CROCK_API real cr_make_stored_energy(size_t dim_m, size_t dim_z, const real *restrict vn_z, const cplx *restrict mvn_env, real *restrict opt_vm_energy)
CROCK_API ROCK_PURE ROCK_NODISCARD size_t cr_guess_dim_cold_spectrum(size_t dim_z, const real *restrict vn_z, const real *restrict vn_mod)
#define CROCK_API
Definition: crock.h:33
CROCK_API void cr_make_uuload(size_t dim_m, const int16_t *restrict vm_num, const real *restrict vm_freq, size_t dim_z, const real *restrict vn_radius, const real *restrict mvn_mod, real *restrict mvn_uuload)
CROCK_API int cr_make_mode_corr_holl_imp(size_t dim_m, const int16_t *restrict vm_num, size_t dim_z, const real *restrict vn_geo_rout, const real *restrict vn_geo_rel_w, const real *restrict vn_geo_depth, real *restrict mvn_mod)
CROCK_API int cr_make_cold_spectrum(int max_iter, size_t dim_z, const real *restrict vn_z, const real *restrict vn_mod, const real *restrict tdm_c, const real *restrict tdm_zk, size_t dim_freq, real *restrict freq, real *restrict ampl)
CROCK_API int cr_make_fem(size_t dim_m, size_t dim_z, const real *restrict vn_z, const real *restrict mvn_mod, real *restrict tdm_c, real *restrict mv_tdm_zk)
CROCK_API void cr_init_bp(size_t dim_m, size_t dim_z, const cplx *restrict mvn_env, real *restrict vm_bp)
Read the detailed description!
Definition: crock.h:181
CROCK_API ROCK_CONST ROCK_NODISCARD int cr_simd_lanes(void)
CROCK_API int cr_step_field_offload(real dt, size_t dim_m, const real *restrict vm_cf, const cplx *restrict vm_bc, size_t dim_z, const real *restrict tdm_c, const real *restrict mv_tdm_zk, const cplx *restrict mvn_src, cplx *restrict vm_bd, cplx *restrict mvn_env, real *restrict opt_vm_cp, real *restrict opt_vm_df, struct cr_cache *restrict *restrict opt_pp_cache)
Doc see the CPU version.
CROCK_API void cr_make_bc_simple(size_t dim_m, const real *restrict vm_freq, size_t dim_z, const real *restrict mvn_mod, cplx *restrict vm_bc)
CROCK_API ROCK_MALLOC void * cr_malloc(size_t size)