File: not-thread-h

package info (click to toggle)
eigensoft 8.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,936 kB
  • sloc: ansic: 33,392; perl: 717; makefile: 104; sh: 10
file content (49 lines) | stat: -rw-r--r-- 887 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _THREAD_ 
#define _THREAD_

#include <admutils.h>

// globals defined in smartpca.c
extern int ldregress;
extern int minallelecnt;
extern int maxmissing;
extern int numthreads;
extern double ldlimit;

extern pthread_mutex_t mutex_xtx;
extern pthread_mutex_t mutex_nkill;


typedef struct thread_args  {

  int mythreadnum;

  SNP **xsnplist;
  double *xmean;
  double *xfancy;
  int *xindex;
  int *xtypes;

  int numindivs;
  int nrows;
  int ncols;
  int blocksize;
  int weightmode;

  int nkill;     // out
  int nused;     // out

  double *XTX;

} thread_args_t;


void *thread_function(void *args);

thread_args_t *pack_args(int mythreadnum, SNP **xsnplist, double *xmean, double *xfancy, int *xindex, int *xtypes, double *XTX, 
  int numindivs, int nrows, int ncols, int blocksize, int weightmode); 

void unpack_args(thread_args_t *ta, int *nkill, int *nused);

#endif