simple_model_helper.h 720 Bytes
Newer Older
1
2
3
4
5
6
7
#ifndef SIMPLE_MODEL_HELPER_H
#define SIMPLE_MODEL_HELPER_H

#if defined (HAVE_CONFIG_H)
#  include "config.h"
#endif

8
#include <inttypes.h>
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <time.h>

void
var_scale(int datatype, double *mscale, double *mrscale);

static inline double
sign_flat(double v)
{
  if (v == 0.0)
    return 0.0;
  return v;
}

time_t
cditime2time_t(int date, int timeofday);
void
time_t2cditime(time_t t, int *date, int *timeofday);

27
28
29
30
31
32
33
34
35
36
#if defined (USE_MPI) && ! defined(HAVE_PPM_CORE)
struct PPM_extent
{
  int32_t first, size;
};

struct PPM_extent
PPM_uniform_partition(struct PPM_extent set_interval, int nparts,
                      int part_idx);

Thomas Jahns's avatar
Thomas Jahns committed
37
38
39
int
PPM_prime_factorization_32(uint32_t n, uint32_t **factors);

40
41
42
#endif

#endif