File: distrib.h

package info (click to toggle)
haskell-ekg-core 0.1.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 140 kB
  • sloc: haskell: 585; ansic: 62; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "HsFFI.h"

struct distrib {
  StgInt64 count;
  StgDouble mean;
  StgDouble sum_sq_delta;
  StgDouble sum;
  StgDouble min;
  StgDouble max;
  volatile StgInt64 lock;
};

void hs_distrib_add_n(struct distrib* distrib, StgDouble val, StgInt64 n);

/*
 * Combine 'b' with 'a', writing the result in 'a'. Takes the lock of
 * 'b' while combining, but doesn't otherwise modify 'b'. 'a' is
 * assumed to not be used concurrently.
 */
void hs_distrib_combine(struct distrib* b, struct distrib* a);