sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
ae2f8940d7a35bcd22bc1620a6793257659081024fdf32263a540e59efc59486
C
608
17
/* The tenth edition of cartEdits. Re-applies the encodeCcreCombined -> * cCREs supertrack migration from cartEdit9. This is needed because carts * saved between the cartVersion 9 rollout and the trackDb switch to the new * cCREs supertrack still reference encodeCcreCombined directly and were * already at version...
c0c5db3dda324b5cf5504a2d94c2db512b734f214dd387d2585c43e439d37faf
C
621
18
/* edwWebAuthLogout - A tiny little program to help manage Persona logouts. Specifically * a little CGI that unsets the email cookie. */ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #includ...
cd0eaa8135dcddc185c2fce8585b9a71641eb0967a83cd417f65181cd318bf72
C
622
36
#include <stdio.h> #include <stdlib.h> REAL perform_bin_op(REAL a, REAL b, char op) { switch(op){ case '+': return (a) + (b); case '-': return (a) - (b); case 'x': return (a) * (b); case '/': return (a) / (b); default: fprintf(stderr, "Bad op %c\n",op); exit(EXIT_FAILURE); } } in...
2ee432a6edc85c3a590228d4e9c03113ca53d8707215b379789b95175fa1a99b
C
625
21
#include "cs_mex.h" /* cs_utsolve: solve a lower triangular system U'*x=b */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Umatrix, *U ; double *x, *b ; if (nargout > 1 || nargin != 2) { mexErrMsgTxt ("Usage: x = cs_utsolve(U,b...
fcc4e33e8e08e52a87598800292e95cad1c24c8e37be8528a606f35db0361f2a
C
626
21
#include "cs_mex.h" /* cs_ltsolve: solve an upper triangular system L'*x=b */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Lmatrix, *L ; double *x, *b ; if (nargout > 1 || nargin != 2) { mexErrMsgTxt ("Usage: x = cs_ltsolve(L,...
5a282d1512b208e2eb396745a1c62b50869ca697fe35a894cbd3a67ea2bacd9e
C
631
31
#include "common.h" #include "genePred.h" #include "bed.h" void usage() { errAbort("genePredToBed - Convert genePred files to beds.\n" "usage:\n" " genePredToBed <input.genePred> <output.bed>\n"); } int main(int argc, char *argv[]) { FILE *out = NULL; struct genePred *gpList=NULL, *gp =NULL; struct bed *bed =...
46e9176b929190647b0c9982ed7947f61616aca65df9b2249fb7de2b02e3cd65
C
633
29
/* * * Copyright (C) 2007, Robert Oostenveld * * This implements Y=X by making a deep copy. A deep copy refers * to a copy in which all levels of data are copied. For example, a * deep copy of a cell-array copies each cell, and the contents of * the each cell (if any), and so on. * */ #include <math.h> #inclu...
b8b6bc7358125f96bf871931d62b7547f5cf6c230b6bf9e44d3864738fc67438
C
634
23
/* Regression test: pointer argument forwarding with --inst-func must not * trigger infinite recursion in getSizeOf. * * When a function takes a pointer argument and passes it to another function, * getSizeOf previously inspected users of the argument inside the function * rather than callers of the function, call...
5aa541773e26706c9f0b9f08d34c7ee649e26f33934edde7ba685db1156bf893
C
651
24
#include <dlfcn.h> #include <stdio.h> #include <stdlib.h> typedef void (*interflop_call_fn)(int id, ...); int main(void) { void *handle = dlopen("libinterflop_vfcwrapper.so", RTLD_NOW | RTLD_GLOBAL); if (!handle) { fprintf(stderr, "dlopen failed: %s\n", dlerror()); return 1; } interfl...
10709e5a3f65ddcddd77d1e22416fa328b3295b794288fb4c9130d6cb49e5df0
C
658
37
#include "vector.H" #include "IOstreams.H" using namespace Foam; int main() { Info<< vector::zero << endl << vector::one << endl << vector::dim << endl << vector::rank << endl; vector d(0.5, 0.5, 0.5); d /= mag(d); vector dSmall = (1e-100)*d; dSmall /= mag(dSmall); I...
38cfb946875e63934fd7432611782612854fdfccf1f2a81e7409dc6880e6f171
C
665
37
#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <sys/syscall.h> #include <sys/sysinfo.h> #include <unistd.h> #include "interflop/common/float_const.h" #define FMT(X) _Generic((X), double : "%.16e", float : "%.7e") #define N 12 int main(void) { REAL x; char *flt_fmt = FMT(x); char fmt[1024];...
8f89f21116bb3464b730d79b543cb62516dea2f7697b1dc0e5a996f94e09113a
C
673
28
/* hgsqlimport - Execute mysqlimport using passwords from .hg.conf. */ /* Copyright (C) 2011 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "options.h" #include "sqlProg.h" void usage() /* Explain usage an...
1e9d8db93c95454bb4051189b7c308fcfd4828a09522f5a8b895100363e62c57
C
678
39
#include "common.h" #include "cart.h" static char *edit3tracksCovid[] = { "covidMuts", "covidHgiGwasR4Pval", "covidHgiGwas" }; static char *edit3tracksAssembly[] = { "scaffolds", "ctgPos2", "stsMap" "traceClone" "fishClones" }; static char *edit3tracksMgcOrfeome[] = { "orfeomeMrna", "mgcFullMrna", }; void cartEd...
7b16d09205959fb3dec359ef791931520697aace3a908d55ce688add33f1e1cc
C
680
26
#include "cs.h" /* load a triplet matrix from a file */ cs *cs_load (FILE *f) { CS_INT i, j ; double x ; #ifdef CS_COMPLEX double xi ; #endif cs *T ; if (!f) return (NULL) ; /* check inputs */ T = cs_spalloc (0, 0, 1, 1, 1) ; /* allocate result */ #...
0b6cf58cdce6a5ad6388869a95192944ab9318b609380f79468bea5346c4096c
C
682
19
#include "cs.h" /* xi [top...n-1] = nodes reachable from graph of G*P' via nodes in B(:,k). * xi [n...2n-1] used as workspace */ int cs_reach (cs *G, const cs *B, int k, int *xi, const int *pinv) { int p, n, top, *Bp, *Bi, *Gp ; if (!CS_CSC (G) || !CS_CSC (B) || !xi) return (-1) ; /* check inputs */ n =...
6c88cdccdd9d61cee3d1d6cbd2e62ba86a49cbe19971186242761b04396cd324
C
682
39
/* Short short form of common.c. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "psLayHit.h" #define sqlUnsigned atoi /* String to unsigned. */ #define sqlSigned atoi /* String to signed. */ #define cloneString strdup /* Duplicate string onto heap. */ #define AllocVar(pt) (pt = malloc(size...
c3d9ddfd1237838c3cd3231382477bcaf910aaa07f53d69e5d089120b94b49c7
C
688
34
/* * Copyright (c) by Peter De Rijk (VIB - University of Antwerp) * See the file "license.txt" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #define _FILE_OFFSET_BITS 64 #define _GNU_SOURCE #include "cg.h" #include <stdio.h> #include <stdlib.h> #include <in...
07fbae2f7e5084a1985e489b4c97329dfb2852bafe1cf4c0fd8f40eb0507236c
C
692
32
#include <math.h> #include <stdio.h> #include <time.h> /* Archimedes method for computing PI using circumscribed polygons */ double archimedes(int N) { double ti, tii, fact, res; int i; /* Print header */ fprintf(stderr, " i Ai+1 Ti+1\n"); ti = 1. / sqrt(3.); fact = 1; for (i = 1; i <=...
787efa1486148f8e4889ebb80e58b0c42019d7d957489e57bd260b5e5fcad0b2
C
693
22
#include "cs_mex.h" /* z = cs_gaxpy (A,x,y) computes z = A*x+y */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Amatrix, *A ; double *x, *y, *z ; if (nargout > 1 || nargin != 3) { mexErrMsgTxt ("Usage: z = cs_gaxpy(A,x,y)") ; ...
49437ed6c6b518fb2ddb18d0c340fe63f104f43d62fc1c2c464629d16609aa9a
C
697
19
#include "cs.h" /* xi [top...n-1] = nodes reachable from graph of G*P' via nodes in B(:,k). * xi [n...2n-1] used as workspace */ CS_INT cs_reach (cs *G, const cs *B, CS_INT k, CS_INT *xi, const CS_INT *pinv) { CS_INT p, n, top, *Bp, *Bi, *Gp ; if (!CS_CSC (G) || !CS_CSC (B) || !xi) return (-1) ; /* check in...
a09cbe228bec5f2ad2609432618f0e872c18c7c23ecb5c46d1742d5b7b54f861
C
700
38
#include <float.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #define STRTOFLT(x) _Generic(x, float : strtof, double : strtod) REAL operation(REAL x, REAL y, char op) { switch (op) { case '+': return x + y; case '-': return x - y; case '*': return x * y; case '/...
fcbb90be5904a45323ac2fca8c9107882fd3e4acc2ca04ec8df61ffa053e5694
C
701
23
#include "cs_mex.h" /* cs_amd: approximate minimum degree ordering */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Amatrix, *A ; int *P, order ; if (nargout > 1 || nargin < 1 || nargin > 2) { mexErrMsgTxt ("Usage: p = cs_amd(A...
d0505c0b6cd105d57dd5906dc2a43661d43c87708c53c205664f01fbe1af7b42
C
712
40
/* hmmerFace.c - Interface between hmmer2 stuff and my stuff -jk */ #include "common.h" #include "squid.h" #include "config.h" #include "structs.h" #include "funcs.h" #include "globals.h" float random(float maxVal) { return (float)(rand())*maxVal/RAND_MAX; } void testHistogram() { struct histogram_s *hist; int fit;...
3cba1f5381569b3829806ed6c01b7c617acf93b7dca3e05c8b3a09e7530dd1a8
C
713
23
#include "cs_mex.h" /* cs_amd: approximate minimum degree ordering */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs_dl Amatrix, *A ; CS_INT *P, order ; if (nargout > 1 || nargin < 1 || nargin > 2) { mexErrMsgTxt ("Usage: p = cs...
9950504d3a5cbf0f1d1e966231ff7f022eb9d4fd4c60b65ec4648a16bab34335
C
718
28
/* Just a little one shot thing to add file sizes. */ #include "common.h" #include "portable.h" int main() { char *rootDir = "/projects/cc/hg/gs.2/g2g"; struct fileInfo *hiList, *loList, *hi, *lo; double size = 0; int count = 0, countOne; char pslDir[512]; hiList = listDirX(rootDir, "g2g.*", TRUE); for (hi = hiList;...
52c71941a00a0fddd55bd5517b36f9bfd11d36ece4c354b17990aacfd0029a7e
C
719
37
/* asmString - interface between generated assembly code and * strings */ #include "common.h" #include "../compiler/pfPreamble.h" struct _pf_string *_pfaNewString(char *s) { uglyf("Theoretically getting new string for %p %s\n", s, s); return _pf_string_from_const(s); } void _printString(struct _pf_string *string) /...
af1f0b62b5880682fc7395d7aaa9a2993e5ce9cf3e86983b9d7a68cbb6a6849b
C
726
21
/** @file new.c * @brief Template library C file. */ /*****************************************************************************/ #include "tpcclibConfig.h" /*****************************************************************************/ #include "tpcnew.h" /*************************************************...
98ce3584215e37f0f100ee02d6ce29a5c012386725184c55b21e5610d4acf2d3
C
735
37
#include "cs_mex.h" /* x = b(p) */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { int n, k, *p ; double *x, *b, *xx ; if (nargout > 1 || nargin != 2) { mexErrMsgTxt ("Usage: x = cs_pvec(b,p)") ; } b = mxGetPr (pargin [0])...
4f22d08d17a7e399554a9a1182c6e927600bc9886ff8e260f78eeb18e18c0f5f
C
736
39
#include "primitiveFields.H" #include "cpuTime.H" #include "IOstreams.H" #include "OFstream.H" using namespace Foam; int main() { const label nIter = 100; const label size = 1000000; Info<< "Initialising fields" << endl; vectorField vf1(size, vector::one), vf2(size, vector::one), ...
e6ad0689dbeaa0d5ed9fc5f0f9c3694a9b9cefd0136996cd89caeef809a3f076
C
737
37
#include "cs_mex.h" /* x(p) = b */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { int n, k, *p ; double *x, *b, *xx ; if (nargout > 1 || nargin != 2) { mexErrMsgTxt ("Usage: x = cs_ipvec(b,p)") ; } b = mxGetPr (pargin [0]...
47ff65bb3a6656aad510b2f54f189d945b2100c206e4d90085c5904b43981b16
C
738
21
/** @file bootstrap.c * @brief Basic bootstrap functions. */ /*****************************************************************************/ #include "tpcclibConfig.h" /*****************************************************************************/ #include "tpcbootstrap.h" /***********************************...
e35962ea3d32d0c2163f8ec0557f6733457839a4b0a77bce040dc443f07da03f
C
743
23
#include "cs.h" /* create a Householder reflection [v,beta,s]=house(x), overwrite x with v, * where (I-beta*v*v')*x = s*e1. See Algo 5.1.1, Golub & Van Loan, 3rd ed. */ double cs_house (double *x, double *beta, int n) { double s, sigma = 0 ; int i ; if (!x || !beta) return (-1) ; /* check inputs ...
e969093ee1bdb1017f400ddb770015644c183b7b8aa1bd57101d4c8f313d1291
C
751
17
/* annoGrateWigDb -- subclass of annoGrator for wiggle database table & file */ /* Copyright (C) 2014 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "annoGrateWigDb.h" #include "annoStreamWig.h" #include "wiggle.h" struct ann...
fbe56a1db4329a7943e129a790956f1b8d3cf90908a9738f0378cfc719753898
C
763
46
/* Simplified test case from OpenBlas */ #include <math.h> #define FLOAT double #define ONE 1.0 #define ZERO 0.0 void CNAME(FLOAT *DA, FLOAT *DB, FLOAT *C, FLOAT *S){ long double da = *DA; long double db = *DB; long double c; long double s; long double r, roe, z; long double ada = fabsl(da); long doubl...
556c046bc2d2428ab6dcb57e5d199ce016ff984173c9c1ab491f285293335ff7
C
773
38
/* pentStruct - output assembly language versions of structures. * This would be easier if gnu assembly were a little better.... */ #include "common.h" #include "pentStruct.h" void pentStructPrint(FILE *f) /* Output pentium structures to file */ { fprintf(f, "%s", "# Data Sizes\n" "byteSize = 1\n" "shortSize = 2\n" ...
ab72d0dc22e13a07247119fe262b1ad3d62e2617382a87b8a335279feb7cd399
C
774
26
/* Utility functions for web API programs */ /* Copyright (C) 2014 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "cheapcgi.h" #include "api.h" void apiOut(char *text, char *jsonp) /* Output content header...
fb79910e03f3dc345e06a5cc9c10e4620c58330be301140765ace3f88e53d5ec
C
788
25
#include "cs_mex.h" /* cs_multiply: sparse matrix multiply */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Amatrix, Bmatrix, *A, *B, *C, *D ; if (nargout > 1 || nargin != 2) { mexErrMsgTxt ("Usage: C = cs_multiply(A,B)") ; } ...
856fbdc0ff61a017f58f6c5ead75a7e258f7031e57b37170ddcfe339c4a6735e
C
790
39
#include "common.h" #include "cart.h" static char *edit1affyArchiveTracks[] = { "wgEncodeAffyRnaChip", "affyU133Plus2", "affyGnf1h", "affyExonArray", "affyU95", "affyU133", }; static char *edit1genePredArchiveTracks[] = { "geneid", "genscan", "augustusGene", "sgpGene", "nscanGene", "acembly", "sibGene", }; static ch...
ce4d194ff8824eca36f8172a48d278373f392175a1105adf1cd064c90821a76c
C
808
35
/* cacheQueue - a cache of synchronized message queues. * ParaFlow uses these to implement the thread synchronization * when parallel processing. */ #include "common.h" #include "synQueue.h" #include "cacheQueue.h" /* This is a synQueue that contains synQueues */ static struct synQueue *queueCache; struct synQueu...
650ffbde2d3e32ca014e19e571eb4812d8d0236d49cf7f2a0907e99c2cfd5247
C
809
63
/* asmLong - some run time routines for manipulating longs for * processors that don't directly support longs */ #include "common.h" #include "../compiler/pfPreamble.h" long long _pfLongMul(long long a, long long b) { return a*b; } long long _pfLongDiv(long long p, long long q) { return p/q; } long long _pfLongMo...
c16ade691616feed7765dcd429732b67898d5f14edac3b43f12bcd0606cde13d
C
811
23
/* ------------------------------------------------------------------------- */ /* AMD Copyright (c) by Timothy A. Davis, */ /* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ /* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl...
ecf74ce63fb8fc23bc48a1878eeda6519ad58bb13e21227483d7bb7f91b26e22
C
814
27
/* klu_simple: a simple KLU demo; solution is x = (1,2,3,4,5) */ #include <stdio.h> #include "klu.h" int n = 5 ; int Ap [ ] = {0, 2, 5, 9, 10, 12} ; int Ai [ ] = { 0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4} ; double Ax [ ] = {2., 3., 3., -1., 4., 4., -3., 1., 2., 2., 6., 1.} ; double b [ ] = {8., 45., ...
0e4cc6580f311f6867bf6361bc007a06dbc2d2bb65fbcc12ec53f41cb4306414
C
815
29
#include <stdio.h> int main(int argc, char * argv[]){ #ifdef DOUBLE /* exact operation: 0x1.0000000000000p+19 + 0x1.0000000000000p+46 = 0x1.0000002000000p+46 -*/ double a = 0x1.0000000000000p+19; double b = 0x1.0000000000000p+46 ; printf("%.13a\n", a+b); #endif #ifdef DOUBLE_POW2 /* exact ope...
dac9c0502df7e2b20828bd2c54acbc534705ab81fcbb3d973ab5acf569c8f993
C
815
43
#include <float.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #define STRTOFLT(x) _Generic(x, float : strtof, double : strtod) #define FMT(x) _Generic(x, float : "%.6a\n", double : "%.13a\n") REAL operation(REAL x, REAL y, char op) { switch (op) { case '+': return x + y; ca...
882d7dce51cde6812f6cce037e2310eefd498c4cdf9b16e018309c47bd655430
C
820
24
/* ========================================================================== */ /* === MATLAB/rand48.c ====================================================== */ /* ========================================================================== */ /* METIS uses drand48 and srand48, which conform to the SVID standard. The ...
dafd8b8fa6fcc20d7aae5e44109c64464a4145d3ce30e5caad047210bfee49e0
C
842
42
#include <stdio.h> #include <stdlib.h> #include <interflop/interflop.h> #ifndef REAL #error "REAL type not defined" #endif #ifndef N #error "Number of repetitions not defined" #endif void binary32_test(int p) { float x = 0.1f; fprintf(stderr, "Before %.6a\n", x); interflop_call(INTERFLOP_INEXACT_ID, FFLOAT, &...
533c834dbdbd0119d24fce0d93944daf24a1d7433c7ff1673e1147afaa7aabd3
C
854
26
#include "cs.h" /* x=A\b where A is symmetric positive definite; b overwritten with solution */ int cs_cholsol (int order, const cs *A, double *b) { double *x ; css *S ; csn *N ; int n, ok ; if (!CS_CSC (A) || !b) return (0) ; /* check inputs */ n = A->n ; S = cs_schol (order, A) ; ...
4f2007013cf70b095e194c40d758c53be28a8cd2d93019b3910e0375bf2034ab
C
855
28
#include "cs_mex.h" /* cs_cholsol: solve A*x=b using a sparse Cholesky factorization */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs *A, Amatrix ; double *x, *b ; int order ; if (nargout > 1 || nargin < 2 || nargin > 3) { ...
3932f3f139f4c09d591a96d2fb570e6bc9c09093c82fb106dd71ed0cc32730ed
C
858
26
#include "cs.h" /* x=A\b where A is unsymmetric; b overwritten with solution */ int cs_lusol (int order, const cs *A, double *b, double tol) { double *x ; css *S ; csn *N ; int n, ok ; if (!CS_CSC (A) || !b) return (0) ; /* check inputs */ n = A->n ; S = cs_sqr (order, A, 0) ; ...
42e2a7efac26b31651dc0d0c07b7b44ae26380de9c362f0b21b3f4a3ce7b21d6
C
860
24
/* ------------------------------------------------------------------------- */ /* CAMD, Copyright (c) Timothy A. Davis, Yanqing Chen, */ /* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ /* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://...
7149f020d99af16107726f3946dd7c491bdeb172291c33736b4fdf68a645d47d
C
866
30
#include "cs.h" /* create a Householder reflection [v,beta,s]=house(x), overwrite x with v, * where (I-beta*v*v')*x = s*e1 and e1 = [1 0 ... 0]'. * Note that this CXSparse version is different than CSparse. See Higham, * Accuracy & Stability of Num Algorithms, 2nd ed, 2002, page 357. */ CS_ENTRY cs_house (CS_ENTRY ...
73e60a9ce7ab3c74e4d9bcc5923af1ae578bcaa9d457ba4136ba6a6dd48660cb
C
869
26
#include "cs.h" /* x=A\b where A is symmetric positive definite; b overwritten with solution */ CS_INT cs_cholsol (CS_INT order, const cs *A, CS_ENTRY *b) { CS_ENTRY *x ; css *S ; csn *N ; CS_INT n, ok ; if (!CS_CSC (A) || !b) return (0) ; /* check inputs */ n = A->n ; S = cs_schol (orde...
2fdd4b1bddd1442e44b72495e38aca265b8615643f5767b231d25f859912b4e9
C
871
38
/* maf - stuff to process maf tracks. */ /* Copyright (C) 2011 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "hash.h" #include "linefile.h" #include "dystring.h" #include "portable.h" #include "obscure.h"...
e8d751107059eff462d85575325094ab73216ec29441cfb432268b9e82a3d818
C
873
26
#include "cs.h" /* x=A\b where A is unsymmetric; b overwritten with solution */ CS_INT cs_lusol (CS_INT order, const cs *A, CS_ENTRY *b, double tol) { CS_ENTRY *x ; css *S ; csn *N ; CS_INT n, ok ; if (!CS_CSC (A) || !b) return (0) ; /* check inputs */ n = A->n ; S = cs_sqr (order, A, 0)...
2b197c64c492623636d15ee46cfcfe788ead159abd5740550de5f29b5ea8455c
C
874
40
#include "point.H" #include "triangle.H" #include "tetrahedron.H" #include "IOstreams.H" using namespace Foam; int main() { triangle<point, point> tri ( vector(0, 0, 0), vector(1, 0, 0), vector(1, 1, 0) ); Info<< "tri circumCentre = " << tri.circumCentre() << endl; Info<< ...
7de26b9be549ec114bb703fef18180b395392d4159702380c62832009669837b
C
877
22
#include "cs.h" /* x = x + beta * A(:,j), where x is a dense vector and A(:,j) is sparse */ int cs_scatter (const cs *A, int j, double beta, int *w, double *x, int mark, cs *C, int nz) { int i, p, *Ap, *Ai, *Ci ; double *Ax ; if (!CS_CSC (A) || !w || !CS_CSC (C)) return (-1) ; /* check inputs */ ...
0549d686937f56a28d1ca9991b73ccf33c8b13d2ba6cded6d58fa6dd04753aef
C
879
24
/* ========================================================================== */ /* === colamd_global.c ====================================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
3e2574715b2503918cb889ee17e862b2a86b4991e42812fc318a3d5ab8b98cc5
C
885
37
/* * test_sve_vectorization/test.c * * Loops that the AArch64 loop vectorizer turns into scalable vectors * (<vscale x N x T>) when SVE is enabled, e.g. with -march=native on an SVE * CPU. Verificarlo must keep them instrumentable (fixed-width vectors) or, * when scalable vectors are forced, leave them native wit...
edbdcfa2b06a9c48988e795b3c4ec1b26ed4a0ab6d31113842cafefec140db98
C
886
26
#include "cs_mex.h" /* cs_droptol: remove small entries from A */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Amatrix, *C, *A ; int j, k ; double tol ; if (nargout > 1 || nargin != 2) { mexErrMsgTxt ("Usage: C = cs_dropto...
8be9b46744b20f9998b9bd01d93cad727284048c1d8987b7ca37e5748502b7f6
C
889
22
#include "cs.h" /* return a random permutation vector, the identity perm, or p = n-1:-1:0. * seed = -1 means p = n-1:-1:0. seed = 0 means p = identity. otherwise * p = random permutation. */ int *cs_randperm (int n, int seed) { int *p, k, j, t ; if (seed == 0) return (NULL) ; /* return p = NULL (ident...
59a43e4ee73d2c65c44e8705bc244e83ca0206ed1363f0508a0770e586c8074d
C
890
35
#include "cs.h" #ifdef MATLAB_MEX_FILE #define malloc mxMalloc #define free mxFree #define realloc mxRealloc #define calloc mxCalloc #endif /* wrapper for malloc */ void *cs_malloc (int n, size_t size) { return (malloc (CS_MAX (n,1) * size)) ; } /* wrapper for calloc */ void *cs_calloc (int n, size_t size) { ...
42d91d27f135928e3bfd7f8cf0d34a11b43759d7e7662a6287dfcc5417f9e638
C
893
30
#include "cs_demo.h" /* cs_test: read a matrix and run cs_demo2 and cs_demo3, using malloc tests. */ #include "cstcov_malloc_test.h" int main (int argc, char **argv) { FILE *f ; problem *Prob ; int trials, ok, demo ; if (argc < 2) return (-1) ; printf ("cs_test, file: %s\n", argv [1]) ; for (d...
05e1ed4a4829d372197cb9b73be7cfb6e420cfc414b6371fdabc0a624e94b266
C
894
39
/* * Copyright (c) by Peter De Rijk (VIB - University of Antwerp) * See the file "license.txt" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #define _FILE_OFFSET_BITS 64 #define _GNU_SOURCE #include "cg.h" #include <stdio.h> #include "tools.h" #include "deb...
c47ba7e71479a8ceb5b777b6a8af08d82b4c113f1d90159d152de57d7fc6398a
C
898
29
#include "cs_mex.h" /* cs_symperm: symmetric permutation of a symmetric sparse matrix. */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Amatrix, *A, *C, *D ; int ignore, n, *P, *Pinv ; if (nargout > 1 || nargin != 2) { mexErrMs...
a4078d900761340c874012ce9a54c8767c08dccc7ab552c6cb12b870da6149b6
C
899
37
#include<errno.h> #include<stdlib.h> #include<pandaseq-plugin.h> HELP("Filter out sequences that have mismatches in the overlap region.", "completely_miss_the_point:mismatches"); VER_INFO("1.0"); static bool check_func( PandaLogProxy logger, const panda_result_seq *sequence, void *user_data) { (void) logger; r...
70bdcbd75d64ce20fb8c8c10c8c52e0f5e35ab6cb6cc837ca5801cbe300e37ba
C
901
22
#include "cs.h" /* x = x + beta * A(:,j), where x is a dense vector and A(:,j) is sparse */ CS_INT cs_scatter (const cs *A, CS_INT j, CS_ENTRY beta, CS_INT *w, CS_ENTRY *x, CS_INT mark, cs *C, CS_INT nz) { CS_INT i, p, *Ap, *Ai, *Ci ; CS_ENTRY *Ax ; if (!CS_CSC (A) || !w || !CS_CSC (C)) return (-1) ; ...
e503211d517574042a0f0b6dbdbc400ad5cd8a83b3f167c20eb0311834dd2d10
C
901
41
/* * Copyright (c) by Peter De Rijk (VIB - University of Antwerp) * See the file "license.txt" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #define _FILE_OFFSET_BITS 64 #define _LARGEFILE64_SOURCE 1 #include "cg.h" #include <stdio.h> #include <stdint.h> #i...
a89d6879899c0b7f772ce3e53e8456355f7036b7816fc31cc13f93c408817beb
C
902
35
#include "cs.h" #ifdef MATLAB_MEX_FILE #define malloc mxMalloc #define free mxFree #define realloc mxRealloc #define calloc mxCalloc #endif /* wrapper for malloc */ void *cs_malloc (CS_INT n, size_t size) { return (malloc (CS_MAX (n,1) * size)) ; } /* wrapper for calloc */ void *cs_calloc (CS_INT n, size_t size) ...
016504320b868526edfaea2288c418347e0283814ad1923cdedf477f32b14236
C
903
37
#include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include "../../interflop_stdlib.c" int main() { for (int i = -150; i < 128; i++) { float a = fpow2i(i); float b = exp2f(i); if (b - a != 0) { fprintf(stderr, "==================\n"); fprintf(stderr, "i : %d\n"...
571528dff795e4b8a3cf777e84086f6391715ce7ef8ae3daa0656fd631f9f6e1
C
906
41
/* * * Copyright (C) 2006-2007, Robert Oostenveld * * This implements [y] = abs(x) * * This function does not check the occurence of integer overflowing. * */ #include <math.h> #include "mex.h" void mexFunction (int nlhs, mxArray * plhs[], int nrhs, const mxArray * prhs[]) { size_t M, N; UINT64_T *x, *y; ...
6df8d15e892dc3cda7b2d8d734e87f7a5c0d5d7fc10068f705b7db01dcdca532
C
907
22
#include "cs.h" /* return a random permutation vector, the identity perm, or p = n-1:-1:0. * seed = -1 means p = n-1:-1:0. seed = 0 means p = identity. otherwise * p = random permutation. */ CS_INT *cs_randperm (CS_INT n, CS_INT seed) { CS_INT *p, k, j, t ; if (seed == 0) return (NULL) ; /* return p =...
8e619aba332046e7abe615c40bbac6511fc80cdbe92eaf3a15d07d5768d393dd
C
917
24
#include "cs.h" /* depth-first search and postorder of a tree rooted at node j */ int cs_tdfs (int j, int k, int *head, const int *next, int *post, int *stack) { int i, p, top = 0 ; if (!head || !next || !post || !stack) return (-1) ; /* check inputs */ stack [0] = j ; /* place j on the s...
aaa3dcf47d95b6429ab8f0816385cc61d3044081eb1e4737eeb7a3a432a936de
C
925
25
/* Written in 2015 by Sebastiano Vigna ([email protected]) To the extent possible under law, the author has dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. See <http://creativecommons.org/publicdomain/zero/1.0/...
b7e9d785958420ab348f28fd71d638369ebdd30dc2352878d723716e73733526
C
932
34
#include "cs_mex.h" /* cs_print: print the contents of a sparse matrix. */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { CS_INT brief ; if (nargout > 0 || nargin < 1 || nargin > 2) { mexErrMsgTxt ("Usage: cs_print(A,brief)") ; } ...
ffea0b5cf687cff5f21a4ca364bc0404f895081d7b913c604fdb5eaa3904f90a
C
935
28
#include "cs_mex.h" /* cs_randperm: random permutation. p=cs_randperm(n,0) is 1:n, * p=cs_randperm(n,-1) is n:-1:1. p = cs_randperm (n,seed) is a random * permutation using the given seed (where seed is not 0 or -1). * seed defaults to 1. A single seed always gives a repeatable permutation. * Use p = cs_randperm...
adcd94a8500914b5b7cd41226b3bf40242653971a87a11a888b5c438a4abb787
C
941
24
#include "cs.h" /* depth-first search and postorder of a tree rooted at node j */ CS_INT cs_tdfs (CS_INT j, CS_INT k, CS_INT *head, const CS_INT *next, CS_INT *post, CS_INT *stack) { CS_INT i, p, top = 0 ; if (!head || !next || !post || !stack) return (-1) ; /* check inputs */ stack [0] = j ; ...
a53da5d2e7cafe6f6ccd700d8908e667256ce7bd5bf81224705081ca87be46bb
C
942
35
/* method - UCSC Known Genes Method. */ /* Copyright (C) 2011 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "hash.h" #include "linefile.h" #include "dystring.h" #include "spDb.h" #include "web.h" #include ...
a9ac59333806746841dcf636a3f4a59112d600286c54fe9030f6300d851d0abc
C
942
25
#include "cs.h" /* drop entries for which fkeep(A(i,j)) is false; return nz if OK, else -1 */ int cs_fkeep (cs *A, int (*fkeep) (int, int, double, void *), void *other) { int j, p, nz = 0, n, *Ap, *Ai ; double *Ax ; if (!CS_CSC (A) || !fkeep) return (-1) ; /* check inputs */ n = A->n ; Ap = A->p ; Ai...
8df707ef5f0fe21b94657c0b037a80d5345fa31c827416fca226ac4dc58a6a5f
C
949
28
#include "cs_mex.h" /* cs_randperm: random permutation. p=cs_randperm(n,0) is 1:n, * p=cs_randperm(n,-1) is n:-1:1. p = cs_randperm (n,seed) is a random * permutation using the given seed (where seed is not 0 or -1). * seed defaults to 1. A single seed always gives a repeatable permutation. * Use p = cs_randperm...
5be4eedcf780c56b1aa0ec107f5621423ba11c257b37a8c9afd2bc2ed16bee6e
C
950
30
#include "cs_mex.h" /* cs_permute: permute a sparse matrix */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs Amatrix, *A, *C, *D ; int ignore, *P, *Q, *Pinv ; if (nargout > 1 || nargin != 3) { mexErrMsgTxt ("Usage: C = cs_permut...
3ca9f9c7f28009edc619d131ed619db290ffd97c7679cb12b1b0774d80f31dfb
C
952
32
/* bedMethyl - stuff to handle Hi-C stuff in table browser. */ /* Copyright (C) 2019 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "hash.h" #include "jksql.h" #include "grp.h" #include "trackDb.h" #include...
f2ff8694ec5250ba79a3c591d54559fe69b47a0d4beeb603229fe994b03a8719
C
956
25
/* ========================================================================== */ /* === ccolamd_global.c ===================================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
6570c33b98610b66feddc022ad534e6ba1f1f43c0adcc7d2493bd38c9e39cfb1
C
961
40
#include "checkMeshQuality.H" #include "polyMesh.H" #include "cellSet.H" #include "faceSet.H" #include "motionSmoother.H" #include "surfaceWriter.H" #include "checkTools.H" Foam::label Foam::checkMeshQuality ( const polyMesh& mesh, const dictionary& dict, const autoPtr<surfaceWriter>& writer ) { label ...
da7abcb6cae1457d3cf2f9053d0dd5b677e9924e1f15a67854264a796da5f9ae
C
961
25
#include "cs.h" /* drop entries for which fkeep(A(i,j)) is false; return nz if OK, else -1 */ CS_INT cs_fkeep (cs *A, CS_INT (*fkeep) (CS_INT, CS_INT, CS_ENTRY, void *), void *other) { CS_INT j, p, nz = 0, n, *Ap, *Ai ; CS_ENTRY *Ax ; if (!CS_CSC (A) || !fkeep) return (-1) ; /* check inputs */ n = A-...
254519dc70a0e4a9d0e8652820315dc8c691a86339ef0b522ba8563bf1ef8dd4
C
970
34
#include "cstcov_malloc_test.h" int malloc_count = INT_MAX ; /* wrapper for malloc */ void *cs_malloc (int n, size_t size) { if (--malloc_count < 0) return (NULL) ; /* pretend to fail */ return (malloc (CS_MAX (n,1) * size)) ; } /* wrapper for calloc */ void *cs_calloc (int n, size_t size) { if (--malloc_...
3304fdac8bb605354af75a618970a7f213c56e1f4541fc14d94617321d456ad3
C
973
46
/* cdwAddStep - Add a step to pipeline. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "jksql.h" #include "cdw.h" #include "cdwLib.h" #include "cdwStep.h" void usage() /* Explain usage and exit. */ { errAbort( "cdwAddStep - Add a step to pipeline\n" "usage:\n" " cd...
66d336f8497c857d53808f8a3030811027eba9694cf9e343901ca71d2fae3613
C
976
44
/* * test_vector_reduction/test.c * * Floating-point sum and product loops. The loop vectorizer turns them into * llvm.vector.reduce.fadd/fmul: with -ffast-math on every target, and even * without it on AArch64 (strict, in-order reductions). The arithmetic done by * these intrinsics must be instrumented. */ #inc...
554de2c8322d8a51f037b1cb597071cca8ca82064f2aa56f37846cb6dced9e52
C
982
44
#include<stdlib.h> #include<pandaseq-plugin.h> HELP("Ensure the minimum score of all the output bases is above a certain PHRED value.", "min_phred:value"); VER_INFO("1.0"); static bool check_func( PandaLogProxy logger, const panda_result_seq *sequence, void *user_data) { size_t it; (void) logger; for (it = 0...
7c488957fb897f0750477d869345bd2cba4b12265c5a6fb7b7a95a88cd3bc7d2
C
982
34
#include "cstcov_malloc_test.h" int malloc_count = INT_MAX ; /* wrapper for malloc */ void *cs_malloc (CS_INT n, size_t size) { if (--malloc_count < 0) return (NULL) ; /* pretend to fail */ return (malloc (CS_MAX (n,1) * size)) ; } /* wrapper for calloc */ void *cs_calloc (CS_INT n, size_t size) { if (--m...
aee407508ba79603e90986bc7e3b76364d0b252fc0e75c70b2a382cd07c32279
C
982
34
/* ========================================================================== */ /* === KLU_free_symbolic ==================================================== */ /* ========================================================================== */ /* Free the KLU Symbolic object. */ #include "klu_internal.h" Int KLU_free...
f9249c339e1079dfc5dbbb8fc229fd0daa4d2ad72c3258b2b5964f473692e5d5
C
985
31
#include "cs_mex.h" /* cs_qrsol: solve least squares or underdetermined problem */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { cs *A, Amatrix ; double *x, *b ; int k, order ; if (nargout > 1 || nargin < 2 || nargin > 3) { me...
9205dcefc06e19dc31b68576b68d18fc0485e66c45599c5b527d54b2292facb8
C
992
32
/* Test harness: dump a gif of ce4.gc5Base, chrI:4001-5000. */ /* Copyright (C) 2011 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "cheapcgi.h" #include "cart.h" #include "hvGfx.h" #include "hgTracks.h" #i...
bedc1a41283b11964a7a518d98656b4c4d12374af1652ac3a1996e2e090ba1c7
C
992
28
#include "cs_mex.h" /* cs_add: sparse matrix addition */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { double alpha, beta ; cs Amatrix, Bmatrix, *A, *B, *C, *D ; if (nargout > 1 || nargin < 2 || nargin > 4) { mexErrMsgTxt ("Usage:...
6c4746d7c1124cf15a86b9bedc3d9bbb26dbeef935f0346d0ac44aa161c5cdd6
C
993
49
/* numbers.c Some numerically oriented built-in functions. */ #include "common.h" #include "portable.h" #include "../compiler/pfPreamble.h" #include "numbers.h" void pf_randInit(_pf_Stack *stack) /* Change random number stream by initializing it with the current time. */ { srand(clock1000()); rand(); } void pf_rando...
bf1824973f75e6fef18b2d3c0ef2bdf7bb2559f7f3fbc91defdb469752dc1632
C
995
42
/* * Copyright (c) by Peter De Rijk (VIB - University of Antwerp) * See the file "license.txt" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #define _FILE_OFFSET_BITS 64 #define _GNU_SOURCE #include "cg.h" #include <stdio.h> #include "tools.h" #include "deb...
c055af6c8c6cc96861ef804da923f661d7d04204121889bf8e2dcfa20bc1fc60
C
997
22
#include "cs.h" /* C = compressed-column form of a triplet matrix T */ cs *cs_compress (const cs *T) { int m, n, nz, p, k, *Cp, *Ci, *w, *Ti, *Tj ; double *Cx, *Tx ; cs *C ; if (!CS_TRIPLET (T)) return (NULL) ; /* check inputs */ m = T->m ; n = T->n ; Ti = T->i ; Tj = T->p ; Tx = T->x...
415fd7b499841825dcd36be7481403a5b2fa34c254b22569bd3ee3b9a1d0c5e1
C
1,005
22
#include "cs.h" /* C = compressed-column form of a triplet matrix T */ cs *cs_compress (const cs *T) { CS_INT m, n, nz, p, k, *Cp, *Ci, *w, *Ti, *Tj ; CS_ENTRY *Cx, *Tx ; cs *C ; if (!CS_TRIPLET (T)) return (NULL) ; /* check inputs */ m = T->m ; n = T->n ; Ti = T->i ; Tj = T->p ; Tx =...
746acbc080f3d9c39ee12dfdb3913b867cf2bfd8bfc68664fa8b9d36639b2fcd
C
1,006
41
#include "cs_mex.h" /* A = cs_sparse2 (i,j,x), removing duplicates and numerically zero entries, * and returning A sorted (test cs_entry) */ void mexFunction ( int nargout, mxArray *pargout [ ], int nargin, const mxArray *pargin [ ] ) { double *Tx ; cs *A, *C, *T ; int k, m, n, nz, *Ti, *Tj...
03ab6ce69cfa0ad67aee232dce3ade1786fd547d287de28be95850bc2abfec31
C
1,008
44
/* cdwCreateUser - Create a new user from email/password combo.. */ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "jksql.h"...
0daa1fa95facbb41c328a1b04e9305bfa6bde9a2c1761704269a99fa9c031ea6
C
1,008
44
/* edwCreateUser - Create a new user from email/password combo.. */ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "jksql.h"...