sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 17k | content stringlengths 1 200k |
|---|---|---|---|---|
c1e75759d52184df632d54311dd196a7de13d0bd41689aa05d47a7b877d75fcc | C | 456 | 18 | /*
* Copyright (C) 1993 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_scale.c function to scale (multiply by a scalar) the next vector
* in an array in-place.
* -- Bernd Feige 21.09.1993
*/
#include "array.h"
GLOBAL void
array_scale(array *thisarr... |
3cfdf4eccec8a2f2c5f89c7f843e555b5e56e0e775c233501a247c505d0ab57f | C | 460 | 31 | #include <dos.h>
union REGS inregs, outregs;
static unsigned pal[17] = {0, 4, 2, 14, 1, 5, 3, 7,
12, 10, 6, 9, 11, 13, 14, 15, 0};
extern unsigned int _cur_color;
vega_color(i)
int i;
{
_cur_color = (unsigned)i;
return(i);
}
vega_setpal()
{
unsigned i;
for (i = 0; i < 16; i++... |
b10cb69512925cadd91db3eca8d719230e59856cc87a8c0dc48c8ba703e66ccb | C | 460 | 18 | /*
* Copyright (C) 1993,1994 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_copy.c function to copy the contents of the first array into
* the second.
* -- Bernd Feige 20.09.1993
*/
#include "array.h"
GLOBAL void
array_copy(array *array1, array *ar... |
3a92d4ea321fc2f18947824f55564b9547efa3ba0067462fb2369f336aad3e59 | C | 461 | 16 | #if (__VEC__ < 10301) || (__ARCH__ < 11)
#error VX not supported
#endif
#include <vecintrin.h>
int main(int argc, char **argv)
{
__vector double x = vec_abs(vec_xl(argc, (double*)argv));
__vector double y = vec_load_len((double*)argv, (unsigned int)argc);
x = vec_round(vec_ceil(x) + vec_floor(y));
... |
155991e229622a3722873302c25a11d45d896304992bd3f87ff86f2112c74834 | C | 478 | 21 | #ifndef __VSX__
#error "VSX is not supported"
#endif
#include <altivec.h>
#if (defined(__GNUC__) && !defined(vec_xl)) || (defined(__clang__) && !defined(__IBMC__))
#define vsx_ld vec_vsx_ld
#define vsx_st vec_vsx_st
#else
#define vsx_ld vec_xl
#define vsx_st vec_xst
#endif
int main(void)
{
... |
a48dd3d5648711abdef8776d346f107ce6a500f579f3a4fa34361985efbf221f | C | 480 | 22 | #include "nr_zbrak.h"
void zbrak(double (*fx)(double), double x1, double x2, int n, double xb1[], double xb2[], int *nb)
{
int nbb, i;
double x, fp, fc, dx;
nbb = 0;
dx = (x2 - x1) / n;
fp = (*fx) (x = x1);
for (i = 1; i <= n; i++) {
fc = (*fx) (x += dx);
if (fc * fp < 0.0) {
... |
4cedd97de9af4f47bfd33421410199e173d28fd352b9c3d009eb8a2e5938f608 | C | 498 | 41 | #include "vogl.h"
/*
* prefposition_
*/
void
prefposition_(a, b, c, d)
int *a, *b, *c, *d;
{
prefposition((long)*a, (long)*b, (long)*c, (long)*d);
}
/*
* prefpo_ (same as prefposition_)
*/
void
prefpo_(a, b, c, d)
int *a, *b, *c, *d;
{
prefposition((long)*a, (long)*b, (long)*c, (long)*d);
}
/*
* prefsize_
... |
1a240667dfbac184e01f8d9b2604a55e159c4c8ae48e1e71bf8bb29a3eab8259 | C | 499 | 21 | #ifndef __VSX__
#error "VSX is not supported"
#endif
#include <altivec.h>
typedef __vector float fv4sf_t;
typedef __vector unsigned char vec_t;
int main(void)
{
__vector_quad acc0;
float a[4] = {0,1,2,3};
float b[4] = {0,1,2,3};
vec_t *va = (vec_t *) a;
vec_t *vb = (vec_t *) b;
__builtin_m... |
9cc7c8bdea484861437b13eb3189792d6b5d9ade94cbd4ca3f31780556b2c362 | C | 504 | 16 | #include <immintrin.h>
/**
* Test DQ mask operations due to:
* - MSVC has supported it since vs2019 see,
* https://developercommunity.visualstudio.com/content/problem/518298/missing-avx512bw-mask-intrinsics.html
* - Clang >= v8.0
* - GCC >= v7.1
*/
int main(void)
{
__mmask8 m8 = _mm512_cmpeq_epi64_mask(... |
ead5c8355129980fa561149b2fa0ab06ed9e8cd16677d58e3451a083e2455d91 | C | 529 | 19 | #ifdef _MSC_VER
#include <Intrin.h>
#endif
#include <arm_neon.h>
int main(int argc, char **argv)
{
float16_t *src = (float16_t*)argv[argc-1];
float *src2 = (float*)argv[argc-2];
float16x8_t vhp = vdupq_n_f16(src[0]);
float16x4_t vlhp = vdup_n_f16(src[1]);
float32x4_t vf = vdupq_n_f32(src2[0]... |
44aa222c31b88e495c24439173cfe76104ad059552b408edab25223e1a87a838 | C | 535 | 26 | /*
* Copyright (C) 1993,1996 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_mean function to return the mean of the next vector in the array
* -- Bernd Feige 16.09.1993
*/
#include "array.h"
GLOBAL DATATYPE
array_sum(array *thisarray) {
DATATYPE su... |
bae34c0663f476fb76943b22a23342eb899c2b9ba262c576fbada74cded29a3f | C | 561 | 17 | #define KERNEL_NAME pytorch_q8gemm_dq_sparse_1x4_ukernel_8x4_packedA_w32__sse2
#define W_INDEX_DTYPE uint32_t
#include "8x4c1x4-dq-packedA-sse2.h"
#undef KERNEL_NAME
#undef W_INDEX_DTYPE
#define KERNEL_NAME pytorch_q8gemm_dq_sparse_1x4_ukernel_8x4_packedA_w16__sse2
#define W_INDEX_DTYPE uint16_t
#include "8x4c1x4-dq-p... |
e4e929fa7d1eb46c15ae320ec06949f20fc5a943e31f981820ede521c41708a8 | C | 568 | 24 | /*
* Copyright (C) 1993 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_add.c function to scan the next elements of two arrays and
* return their sum.
*
* The state of the resulting matrix is indicated by array1->message.
*
* -- Bernd Feige 15.09.19... |
71a76fe4dca1d4cb93f3021e9c8122c4a7a19fe3d92f2441cdd0d6af246e28a6 | C | 575 | 62 | #include "vogl.h"
/*
* pnt_
*/
void
pnt_(x, y, z)
float *x, *y, *z;
{
pnt((Coord)*x, (Coord)*y, (Coord)*z);
}
/*
* pnts_
*/
void
pnts_(x, y, z)
short *x, *y, *z;
{
pnt((Coord)*x, (Coord)*y, (Coord)*z);
}
/*
* pnti_
*/
void
pnti_(x, y, z)
int *x, *y, *z;
{
pnt((Coord)*x, (Coord)*y, (Coord)*z);
}
/*
... |
440bcf41e8e00a46b4b1ad5708dced69153395062820daaf2a0b2774d71c5785 | C | 582 | 22 | /*
* Copyright (C) 1993 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_transpose transposes an array in memory, merely by swapping
* the definitions for vector and element skips.
* -- Bernd Feige 13.09.1993
*/
#include "array.h"
#define SWAP(a, b)... |
07ed1e2533c088cb82fbe9fc28bcf7c9525e865f371bd7e8035665d7725f15f2 | C | 592 | 29 | /*
* Copyright (C) 1994 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_abs functions to return the square and the absolute value of the
* next vector in the array
* -- Bernd Feige 24.01.1994
*/
#include <math.h>
#include "array.h"
GLOBAL DATATYPE
... |
4ea4e26874eec44adedbf9bd7eb1dc642caf0ffa67788acacf4094a3218f4133 | C | 595 | 21 | /* FUNCTION cross_hair */
/* Purina mouse chow: EMULATION! */
#include "cross.h" /* Structure CROSS_HAIR */
#include "defs.h" /* For status */
#include "termdef.h" /* GIN */
/* FUNCTION cross_hair */
char cross_hair(CROSS_HAIR *chp) {
char buf[20];
if (Status & COMMAND_MODE) { /* Don't look for mouse... |
6344a3b952f3877ba971b638ee28078e62a08c76d7c5bbf39dcc01eda71f8f1c | C | 600 | 19 | #ifdef _MSC_VER
#include <Intrin.h>
#endif
#include <arm_neon.h>
int main(int argc, char **argv)
{
// passing from untraced pointers to avoid optimizing out any constants
// so we can test against the linker.
float *src = (float*)argv[argc-1];
float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(... |
4d7b553622e6891edc736a1ba24adbf05878993ac6b50000b3aaf4d29ccbb259 | C | 607 | 33 | #include "vogl.h"
/*
* getgp
*
* return the current (x, y, z) graphics position
*/
void
getgp(Coord *x, Coord *y, Coord *z)
{
*x = vdevice.cpW[V_X];
*y = vdevice.cpW[V_Y];
*z = vdevice.cpW[V_Z];
}
/*
* getgpos
*
* Get the current graphics position after transformation by
* the current matrix.
*/
void
getg... |
a856350bf7d0633eccfdaffc8f4293767eef684dcd35599663624602b0c6337c | C | 609 | 21 | #ifdef _MSC_VER
#include <Intrin.h>
#endif
#include <arm_neon.h>
int main(int argc, char **argv)
{
float *src = (float*)argv[argc-1];
float32x4_t v1 = vdupq_n_f32(src[0]);
float32x4_t v2 = vdupq_n_f32(src[1]);
float32x4_t v3 = vdupq_n_f32(src[2]);
int ret = (int)vgetq_lane_f32(vfmaq_f32(v1, v2,... |
1efe303b6de4c02d86ea5aaa7ab72ae0d1382b49ebbc1c51ed1233af91d35c27 | C | 624 | 21 | #if (__VEC__ < 10303) || (__ARCH__ < 13)
#error VXE2 not supported
#endif
#include <vecintrin.h>
int main(int argc, char **argv)
{
int val;
__vector signed short large = { 'a', 'b', 'c', 'a', 'g', 'h', 'g', 'o' };
__vector signed short search = { 'g', 'h', 'g', 'o' };
__vector unsigned char len = ... |
a553ce85cbbcd322559c884e7071d73a5676a6ba09d4c51fd1781c72a84fa0d9 | C | 636 | 18 | #include <immintrin.h>
/**
* Test BW mask operations due to:
* - MSVC has supported it since vs2019 see,
* https://developercommunity.visualstudio.com/content/problem/518298/missing-avx512bw-mask-intrinsics.html
* - Clang >= v8.0
* - GCC >= v7.1
*/
int main(void)
{
__mmask64 m64 = _mm512_cmpeq_epi8_mask... |
12f2fd935de3cbafea2b955e51a2d6ca39837a2b99621b218152defcfc26253f | C | 646 | 27 | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <stdlib.h>
#include <pytorch_qnnpack.h>
#include <qnnpack/operator.h>
enum pytorch_qnnp_st... |
a29fb9b978688893963be2256a36fbc346c6179a8d53d96cc5e490f21b305b17 | C | 660 | 27 | #define NRANSI
#include "nr_amotr.h"
#include "nr_util.h"
double amotry(double **p, double y[], double psum[], int ndim, double (*funk)(double[]), int ihi, double fac)
{
int j;
double fac1, fac2, ytry, *ptry;
ptry = dvector(1, ndim);
fac1 = (1.0 - fac) / ndim;
fac2 = fac1 - fac;
for (j = 1; j ... |
0c0e52e6d571ca3f780f60d5a82d553ad02f7aae53c4840bf1e69049c5b37621 | C | 663 | 33 | /*
* Sets BIOS Video modes.
*
* This file is also a convienient place to declare some Global
* variables that get used in the *.asm Routines.
*/
unsigned int _buffer_segment = 0xA000; /* Current buffer being drawn to */
unsigned int _buffer_offset = 0; /* Current buffer being drawn to */
unsigned int _cur_mode = ... |
cbf93cd4ffb56fe1f1f0e79154313d5753bd25a912d333ef945289dd56d2984c | C | 675 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
9739e66a2c229b20fb39b319c6756c1a88e3fd5d15db82806110f33eba23b2f6 | C | 681 | 29 | /*
* student_t.c implements Student's t-test maximum t as function of
* probability p using functions from the numerical recipes.
*/
#include <optimize.h>
#include "stat.h"
static OPT_DTYPE onetrial(optimize_struct *ostruct) {
float df=((float *)ostruct->fixed_args)[0], p=((float *)ostruct->fixed_args)[1];
floa... |
e8c1c84ed0bbe94a5247dba1d128944699e4a4f90bcd3e6d6eb7174f8c41171a | C | 686 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
8f95d11ee994b9c72037d5cf6728d6514aa4abc36ef170925a6bd4866253274f | C | 689 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
dcf5ee71d23698823eb713bbcc537df53955bde4ff4140044d31af464fbf858c | C | 692 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
45602248f47c62415bc51043ba9c93acf4d9818fc3ec3383fc6cc89f43fdb06c | C | 694 | 39 | #include <stdlib.h>
#include <math.h>
#include "stat.h"
#define ITMAX 100
#define EPS 3.0e-7
float betacf(float a, float b, float x) {
float qap,qam,qab,em,tem,d;
float bz,bm=1.0,bp,bpp;
float az=1.0,am=1.0,ap,app,aold;
int m;
qab=a+b;
qap=a+1.0;
qam=a-1.0;
bz=1.0-qab*x/qap;
for (m=1;m<=ITMAX;m++) {
em=(f... |
1598f59c211cdbd7c23afdedaf5645a2bfe8f5ab1412c9f445a627033d2a38a4 | C | 696 | 31 |
/* insert copyright here */
#include "plot.h"
extern int current_fontsize; /* from fontsize.c */
extern char *current_font; /* from fontname.c */
XFontStruct *current_font_struct = NULL;
void setfont ()
{
char font_description[256];
if (!current_font) {
/* select default font */
fontnameX("default"... |
c946737630ed052faf62585f3fea44ce3de6d143e6819b3e840f7d4d90040025 | C | 697 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
5fa556c485cc469752081b073d7be8b77c93678779c8af418b549c40fdd60be4 | C | 705 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
43cc417c973796812e3b8ddbfe8576b641afbf64be20370c74839567d7dcd113 | C | 716 | 34 | /*
* Calculation of determinant using LU decomposition.
* Cf. Numerical Recipes (2.0), p. 49
* -- Bernd Feige 1.10.1993
*/
#include <stdio.h>
#include "array.h"
GLOBAL double
array_det(array *a) {
int j,n=a->nr_of_elements;
double det;
array y,indx;
if (a->nr_of_vectors!=n) return 0.0;
y.nr_of_elements=... |
f2ebe12af7bf29485ba738672b2930c88e8303962015aa307a5532afb2b5542a | C | 723 | 35 | /*
* Copyright (C) 1993 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* These functions do the obvious --
* they return (vector-wise) the max or min values of the array vectors.
* -- Bernd Feige 30.09.1993
*/
#include "array.h"
GLOBAL DATATYPE
array_max(ar... |
db21fbf7e0da429519db9cd7329292ef2b371b9b88adc38af65f83e98d39953e | C | 731 | 55 | #include "vogl.h"
/*
* rect_
*/
rect_(x1, y1, x2, y2)
float *x1, *y1, *x2, *y2;
{
rect(*x1, *y1, *x2, *y2);
}
/*
* rects_
*/
rects_(x1, y1, x2, y2)
short *x1, *y1, *x2, *y2;
{
rect((float)*x1, (float)*y1, (float)*x2, (float)*y2);
}
/*
* recti_
*/
recti_(x1, y1, x2, y2)
int *x1, *y1, *x2, *y2;
{
rect((... |
8e50e579adfdde8a7424e88c2609a63f22a6c805f3b4b70e6cf3a9f45f45692d | C | 749 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
c50fc871d17e6521595978cb7fca2c5d855f28009888e5a6feca3e649adf6d5d | C | 752 | 106 | #include <stdio.h>
#include "vogl.h"
/*
* makeobj_
*/
void
makeobj_(n)
int *n;
{
makeobj((Object)*n);
}
/*
* makeob_
*/
void
makeob_(n)
int *n;
{
makeobj((Object)*n);
}
/*
* closeobj_
*/
void
closeobj_()
{
closeobj();
}
/*
* closeo_
*/
void
closeo_()
{
closeobj();
}
/*
* delobj_
*/
void
delobj_(n)
... |
77decd45c6c986aa6f5119f0ef3c86d133ae1228ca5ef534838a8e4d61dbc316 | C | 755 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
41f87914952ff5959dfcfe73c64bd860892faac3e9b60683b8a91e5ff17cbf20 | C | 759 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
5682f1734a55ae14df8c8bfc2a5b03ac923f34235877e68be6ef84bae3c6025b | C | 762 | 25 | /* FILE _macros/bounds.c */
#include "../Deffs.h"
#include "../../event.h"
/* ******************************************************************** */
/* FUNCTION Check_Bounds150 */
/* Report which trials lack data in the specified interval */
void Check_Bounds150() {
int Begin = Get_Interval_Begin(1);
int End = ... |
01a34c28241ac60acca51c69101f3ddac97a754be230083d836b0080928072cc | C | 777 | 96 | #include "vogl.h"
/*
* backbuffer_
*/
void
backbuffer_(n)
int *n;
{
backbuffer(*n);
}
/*
* backbu_ (same as backbuffer_)
*/
void
backbu_(n)
int *n;
{
backbuffer(*n);
}
/*
* frontbuffer_
*/
void
frontbuffer_(n)
int *n;
{
frontbuffer(*n);
}
/*
* frontb_ (same as frontbuffer_)
*/
void
frontb_(n)
int *n;... |
2ee656f28f77559662edc6043f7d1dbca5939bb330d532e60ade546970f10898 | C | 779 | 20 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
282f9516e64299191e95a48c95fefc80f4acc22cc588b62d45918ab333b4cdbb | C | 784 | 36 | /*
* Copyright (C) 1993 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* findroot.c - simple root finding
*/
#include "optimize.h"
#define BED(a) (((OPT_DTYPE *)ostructp->opt_args)[0]=(a), (*ostructp->function)(ostructp)>0)
GLOBAL OPT_DTYPE
findroot(optimize_st... |
ad85bf9cac179e50746fcc42ac912be139afac4bd2f8d4e8c70caaa8e1d5f019 | C | 788 | 25 | #if (__VEC__ < 10302) || (__ARCH__ < 12)
#error VXE not supported
#endif
#include <vecintrin.h>
int main(int argc, char **argv)
{
__vector float x = vec_nabs(vec_xl(argc, (float*)argv));
__vector float y = vec_load_len((float*)argv, (unsigned int)argc);
x = vec_round(vec_ceil(x) + vec_floor(y));
... |
ae9ab9b1bae84bb88443dcf9e104d286f105129a5aacd56291604047352f2199 | C | 790 | 29 | /*
* Copyright (C) 1993-1995 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* mfxinfo.c - A small mfx application which uses mfx_infoout to print
* the file header information to stdout. Bernd Feige 10.02.1993
*/
#include <stdlib.h>
#include <stdio.h>
#include "... |
37a60f90490e0340046050ebf86332714c5d752d5ffc6277772db882d5110623 | C | 791 | 28 | /*
* Copyright (C) 2008 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/* Definition of `structure member description' arrays for the LabView format
* -- Bernd Feige 26.03.2008 */
#include <read_struct.h>
#include "LabView.h"
struct_member_description smd_LabView_... |
92c3d9afe8b720e4cff89ed8c333cff455f5931a94fd773d330300b33f323b13 | C | 808 | 97 | #include "vogl.h"
/*
* pushmatrix_
*/
void
pushmatrix_()
{
pushmatrix();
}
/*
* pushma_ (same as pushmatrix_)
*/
void
pushma_()
{
pushmatrix();
}
/*
* popmatrix_
*/
void
popmatrix_()
{
popmatrix();
}
/*
* popmat_ (same as popmatrix_)
*/
void
popmat_()
{
popmatrix();
}
/*
* getmatrix_
*/
void
getmatri... |
928369f177128a9c819b7072d49ae659dcbb87c2681c5d5b4fe58a89a06928f3 | C | 813 | 43 | #include <stdio.h>
#include "vogl.h"
static TokList *current;
/*
* newtokens
*
* returns the space for num tokens
*/
Token *
newtokens(int num)
{
TokList *tl;
Token *addr;
int size;
if (vdevice.tokens == (TokList *)NULL || num >= MAXTOKS - current->count) {
if ((tl = (TokList *)malloc(sizeof(TokList))) ==... |
f93f0f9b6d85e1ce49f2c89cc33f7ec6645135b88ea90dd00db03975c66200c2 | C | 816 | 66 | #include "vogl.h"
/*
* translate_
*/
translate_(x, y, z)
float *x, *y, *z;
{
translate(*x, *y, *z);
}
/*
* transl_ (same as translate_)
*/
transl_(x, y, z)
float *x, *y, *z;
{
translate(*x, *y, *z);
}
/*
* scale_
*
* Set up a scale matrix and premultiply it and
* the top matrix on the stack. Had to b... |
60de880f0b9900b2475559a9436b63fb5e0723f3dcc47fe0895f3e5e3ce59a45 | C | 817 | 22 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
9d752c4cbad296144bf94cc333ccccaa7d6ea899d1ed3465262dc8c6ac39dfdc | C | 818 | 27 | #ifdef _MSC_VER
#include <Intrin.h>
#endif
#include <arm_neon.h>
int main(int argc, char **argv)
{
float *src = (float*)argv[argc-1];
float32x4_t v1 = vdupq_n_f32(src[0]), v2 = vdupq_n_f32(src[1]);
/* MAXMIN */
int ret = (int)vgetq_lane_f32(vmaxnmq_f32(v1, v2), 0);
ret += (int)vgetq_lane_f... |
739d25bc8c1fa953ab538708b3f69ce30d18ce1188c8e084489b2fb3c199323f | C | 819 | 43 | #include "vogl.h"
static float Vcx, Vcy, Vsx, Vsy;
/*
* calcW2Vcoeffs
*
* Calculate the linear coeffs defining the mapping of world
* space to actual device space
*/
void
CalcW2Vcoeffs(void)
{
Vcx = (float)(vdevice.maxVx + vdevice.minVx) * 0.5;
Vcy = (float)(vdevice.maxVy + vdevice.minVy) * 0.5;
Vsx = (float... |
14d70c6dddce0c1bdfdff1d486000e5c437d5da2868f17aad7c22c826cfc5312 | C | 828 | 38 | /*
* Array inversion using LU decomposition.
* Cf. Numerical Recipes (2.0), p. 48
* -- Bernd Feige 1.10.1993
*/
#include <stdio.h>
#include "array.h"
GLOBAL void
array_inverse(array *a) {
int i,j,n=a->nr_of_elements;
array y, indx, col;
if (n!=a->nr_of_vectors) {
a->message=ARRAY_ERROR;
return;
}
y.n... |
516f9feecf120c492a231afe7394605d897090a353cdea220c07d26274e00857 | C | 832 | 29 | /*
* Copyright (C) 2012 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*{{{}}}*/
/* Definition of `structure member' arrays for the 'tucker' (EGI 'simple
* binary') format -- Bernd Feige 18.12.2012 */
#include <stdio.h>
#include <read_struct.h>
#include "tucker.h"... |
1369206d9762ab3f4a87c297e8372f7e82e6fbc1d7ceffd75516f9751403e691 | C | 833 | 44 | #include <stdio.h>
#include <stdlib.h>
#include "vogl.h"
static TokList *current;
/*
* newtokens
*
* returns the space for num tokens
*/
Token *
newtokens(int num)
{
TokList *tl;
Token *addr;
int size;
if (vdevice.tokens == (TokList *)NULL || num >= MAXTOKS - current->count) {
if ((tl = (TokList *)malloc(... |
3fe6078e3d971384a2b610643f00e04a13b11969d548d51783bda1f0ede4a5bb | C | 842 | 22 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
c4dd28d89473c8a9ddccf473de7f2bff2768416ce53688b3d09507848ad93eb2 | C | 852 | 70 | #include "vogl.h"
/*
* pushviewport_
*/
pushviewport_()
{
pushviewport();
}
/*
* pushvi_ (same as pushviewport_)
*/
pushvi_()
{
pushviewport();
}
/*
* popviewport_
*/
popviewport_()
{
popviewport();
}
/*
* popvie_ (same pushviewport_)
*/
popvie_()
{
popviewport();
}
/*
* viewport_
*/
viewport_(xlow, ... |
b503e9be2742bece817c10faeb3e85cc01a2e54dfda198b8051ed033d205aecb | C | 860 | 58 | #include <stdio.h>
#ifdef SGI
#include <gl.h>
#include <device.h>
#else
#include "vogl.h"
#include "vodevice.h"
#endif
/*
* getcharacter
*
* read in a character line from a hershey font file
*/
int
getcharacter(fp, no, pairs, buf)
FILE *fp;
int *no, *pairs;
char *buf;
{
int i;
char *p, tmp[10];
/*
* read... |
9f3673a5473c01f4edc3e20d47728ec5c8f1f69cb355433c3a1b2b747d9d3bfc | C | 868 | 22 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
2bd6a9e2471b43d86ddac10cda0860baf3853f12ebfac04914e27f6a4a0e7c3c | C | 872 | 33 | #include <math.h>
#include "nr_gaulg.h"
#define EPS 3.0e-11
void gauleg(double x1, double x2, double x[], double w[], int n)
{
int m, j, i;
double z1, z, xm, xl, pp, p3, p2, p1;
m = (n + 1) / 2;
xm = 0.5 * (x2 + x1);
xl = 0.5 * (x2 - x1);
for (i = 1; i <= m; i++) {
z = cos(M_PI * (i - ... |
dd961c2045598c35a777d2d809a49a4c73151ca00fdbb80ec84c44fcf810159f | C | 873 | 48 | #include "vogl.h"
/*
* scale
*
* Set up a scale matrix and premultiply it and
* the top matrix on the stack.
*
*/
void
scale(float x, float y, float z)
{
Token *tok;
if (!vdevice.initialised)
verror("scale: vogl not initialised");
if (vdevice.inobject) {
tok = newtokens(4);
tok[0].i = SCALE;
tok[... |
829345c185e10645ef316cb18b933000d463ed1432219f51b347934672dcd858 | C | 898 | 47 | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <assert.h>
#include <qnnpack/x8lut.h>
void pytorch_x8lut_ukernel__scalar(
size_t n,
... |
8bc0e900307c66122e70a73c96df497d86d000d46f47aeeee7da107f9c229ef8 | C | 904 | 26 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
25e0fa2e089988107724128f70488ea9253926562b569bfc259c3cdb4c083973 | C | 907 | 103 | #include "vogl.h"
#include "vodevice.h"
#include <stdio.h>
/*
* qdevice_
*/
void
qdevice_(dev)
int *dev;
{
qdevice((Device)*dev);
}
/*
* qdevic_ (same as qdevice_)
*/
void
qdevic_(dev)
int *dev;
{
qdevice((Device)*dev);
}
/*
* unqdevice_
*/
void
unqdevice_(dev)
int *dev;
{
unqdevice((Device)*dev);
}
/*
... |
8bcf1544042dddff76abaf78b63ee63c6de0d5fbd0b6e10db7780ddc1dbf0f04 | C | 909 | 66 | #include <stdio.h>
#ifdef SGI
#include <gl.h>
#include <device.h>
#else
#include "vogl.h"
#include "vodevice.h"
#endif
/*
* displays every character in a hershey font at 64 characters
* per screen. Note: this program reads the binary format as created
* by h2v.
*/
main(ac, av)
int ac;
char **av;
{
char dev[50];... |
73648c1c05f2385de8648ff9b69601cb041daa33080cceca9b901b45fb9b7194 | C | 915 | 39 | /*
* Copyright (C) 1999 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int
main(int argc, char **argv) {
struct tm timestruct;
time_t time_in_seconds;
if (argc!=7) {
fprintf(stderr, "Usage: %s day month y... |
ebebfce5fdb7cbc272896a4d3e23ee29d1dbc1a53e3335bb3edcaea74cd19959 | C | 916 | 69 | /* CIN source file */
#include "extcode.h"
/* Typedefs */
typedef struct {
int32 dimSizes[2];
float32 elt[1];
} TD2;
typedef TD2 **TD2Hdl;
typedef struct {
uInt16 S;
uInt16 DR;
uInt16 B;
uInt16 P;
uInt16 T;
uInt16 R;
uInt16 Time;
uInt16 TriggerOut;
uInt16 AUX;
uInt32 SecTot;
uInt32 SecDR;
TD2Hdl Samp... |
d653832b6a15ae71ef0e77c6add1ed548317664cad77e69ead75987a0dd80ad9 | C | 931 | 102 | #include "vogl.h"
/*
* curvebasis_
*/
void
curvebasis_(basisid)
int *basisid;
{
curvebasis((short)*basisid);
}
/*
* curveb_ (Same as curvebasis_)
*/
void
curveb_(basisid)
int *basisid;
{
curvebasis((short)*basisid);
}
/*
* curveprecision_
*/
void
curveprecision_(nsegments)
int *nsegments;
{
curveprecisio... |
b1ba0673d26671a42ea43186dcfbf447fff744953b45382db393fec062c844f5 | C | 940 | 35 | /*
* Copyright (C) 1998,2010,2026 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
#include "vogl.h"
static void
VGUI_devcpy_impl(void) {
}
/*
* _VGUI_devcpy
*
* copy the pc device into vdevice.dev. (as listed in drivers.c)
*
* In the Windows shared-library build,... |
0678223154bd9f2af6db3eb332b3ab1cb7829687bfe65b9785fe53e6662e7202 | C | 945 | 36 | /**
* Testing ASM VSX register number fixer '%x<n>'
*
* old versions of CLANG doesn't support %x<n> in the inline asm template
* which fixes register number when using any of the register constraints wa, wd, wf.
*
* xref:
* - https://bugs.llvm.org/show_bug.cgi?id=31837
* - https://gcc.gnu.org/onlinedocs/gcc/Mac... |
22d5c43e66cc99009a63b2a397c47e60c7f49447dc87ac3f7228b3424aa7f4ef | C | 948 | 80 | #ifdef SGI
#include "gl.h"
#include "device.h"
#else
#include "vogl.h"
#include "vodevice.h"
#endif
#ifndef TC
#include <math.h>
#else
extern double sin(), cos();
#endif
#ifndef PI
#define PI 3.14159261358979
#endif
#define STEP PI / 180.0
main()
{
float a;
int i;
float v[2];
short val;
winopen("bgnline/endli... |
7ff736674c7000a4c978add160c229d5d817615f10c9e3b15202a4321b78aa4a | C | 948 | 24 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
3d54e47334e91e55db4dcec840a942154f42ab85461befc98559d3d3f9feb750 | C | 959 | 25 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
89f89d9bbd65558b5e01551fe56690c19880365a2e300df135d443c866bacca1 | C | 963 | 47 | /*
* Routine to sort the vectors of array v in descending order of the
* elements of vector d, (not only) for eigenvalues/vectors
* Adapted from the Numerical Recipes (2.0)
* -- Bernd Feige 17.09.1993
*/
#include "array.h"
GLOBAL void
array_eigsrt(array *d, array *v) {
int n=d->nr_of_elements,k,j,i;
DATATY... |
790d98f5de72a3011eed4d051ce4767a186bc413e3070652e393ffe01dc75897 | C | 965 | 81 | #ifdef SGI
#include "gl.h"
#include "device.h"
#else
#include "vogl.h"
#include "vodevice.h"
#endif
#ifndef TC
#include <math.h>
#else
extern double sin(), cos();
#endif
#ifndef PI
#define PI 3.14159261358979
#endif
#define STEP PI / 180.0
main()
{
float a;
int i;
float v[2];
short val;
vinit("mswin");
winop... |
0b3ddf7ae02cf8c545b526f166689d5c3ff4a2fc41be12d7665d5b8629fa4ad5 | C | 990 | 56 | /*
* array_hpsort.c - Heap sort an array.
* Derived from Numerical Recipes (2.0)
* -- Bernd Feige 18.10.1993
*/
#include "array.h"
GLOBAL void
array_hpsort(array *a) {
unsigned long n=a->nr_of_elements,i,ir,j,l;
DATATYPE rra, hold, hold2;
if (n < 2) return;
l=(n >> 1);
ir=n-1;
for (;;) {
if (l > 0) {
... |
e919d997bb6c3deda87c58a779ce7878288c5e6b56ef7ea756cecdbac60580c6 | C | 999 | 30 | /* FILE printmac.c */
/* write out a register's data (spikes, H and V) */
#include "../defs.h"
#include "../array.h" /* Access registers directly */
#include "../sac.h"
#include "../_imports/deffs.h"
#include "../_imports/event.h" /* Stack instruction definitions*/
#include "../_imports/head.h" ... |
8ac237e7e826ec7aa7d908a793984fd571d6961e766b9bf02a111d5bf091be21 | C | 1,004 | 26 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
e7d543f1e6c42491cb95b63ee1d6a4655df86e6abf96bf6604acfc04072c7587 | C | 1,010 | 26 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
bd3597224d168a61aa4480cdd371b13192a62e29811c60087b51e523c8fa0228 | C | 1,026 | 26 | /* Copyright (C) 1989 Free Software Foundation, Inc.
Plot2ps is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone for the
consequences of using it or for whether it serves any particular purpose or
works at all, unless he says so in wri... |
dd5a1e308ecb2543a2aaff774178519afb07f54d2dedd6651ceaadb2624ed67c | C | 1,041 | 40 | /* This file is the fill routine, which is an extension to the plot library.
It changes the grey level of the fill patter for all closed of the following
drawing operations. */
#include "plot.h"
/* FILL_LEVEL is the intensity of the filler for closed paths. Intensity
ranges from 0 to 1. A value of 0 represe... |
f53a04a9ed717fee4a2ec6de954d9a09a16159854f213bc390e804bd5fb7f200 | C | 1,046 | 27 | /* FILE calc.c */
/* Specialized calculations */
/* FUNCTIONS:
FindIntercept Returns time of intercept given 4 points
*/
#include "defs.h" /* Misc constants */
#include "array.h" /* Array declarations */
/* ******************************************************************** */
/* FUNCTION ... |
b32b0c32779cc613ec49a907a5fecb3b954bd02618bec774242a57fe4ed06067 | C | 1,047 | 36 | /*
* linreg.c module to perform line fits on data; cf. Numerical Recipes p.524
* -- Bernd Feige 23.04.1993
*/
#include "bf.h"
/*
* the linreg function fits a line to the data pointed to by data and
* returns the coefficients in the places pointed to by linreg_constp
* and linreg_factp. The 'x axis' used ... |
bd17171d5c368f517d23fd3b78867fc730d7ddf7779aa8224172f5c37a542c99 | C | 1,049 | 32 | #if defined(DETECT_FEATURES) && defined(__INTEL_COMPILER)
/*
* Unlike GCC and CLANG, Intel Compiler exposes all supported intrinsics,
* whether or not the build options for those features are specified.
* Therefore, we must test #definitions of CPU features when option native/host
* is enabled v... |
9613149abda0caa813215c6cf3037f885e494149f34c59f51a39fe3f596e5c97 | C | 1,055 | 28 | /* plot2ps, a utility for converting Unix plot files into postscript.
Copyright (C) 1989 Free Software Foundation, Inc.
Plot2ps is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone for the
consequences of using it or for whether it s... |
8aaab6ac625c29cf3b25aaa8140b9a1b84eb5b38d30db1190beb6395abb2edd6 | C | 1,056 | 60 | /*
* minv4
*
* find the inverse of the 4 by 4 matrix b using gausian elimination
* and return it in a.
*
* (We don't actually use this yet in VOGL - maybe one day).
*/
minv4(a, b)
Matrix a, b;
{
float val, val2;
int i, j, k, ind;
Matrix tmp;
identmatrix(a);
copymatrix(tmp, b);
for (i = 0; i != 4; i++)... |
b89dd46716bf417e069278da509dd019992c1ca157777e0a59b38c171c702875 | C | 1,068 | 36 | /*
* Copyright (C) 1997 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/* Definition of `structure member description' arrays for the NeuroFile format
* -- Bernd Feige 26.09.1997 */
#include <stdio.h>
#include <read_struct.h>
#include "neurofile.h"
struct_member_d... |
37366d7696e15eabd0f43d30ec8e775f4ae3f6094ae79259482b1fb2a9df93bf | C | 1,071 | 32 | /*
* Copyright (C) 2008 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/* Definition of `structure member' arrays for the LabView format
* -- Bernd Feige 26.03.2008 */
#include <read_struct.h>
#include "LabView.h"
struct_member sm_LabView_TD1[]={
{sizeof(LabView_... |
c154ee7bbb14be97d9bc1f2cfcf51f4c35f2cf908440fd05f0f7f906573703fd | C | 1,077 | 27 | /* Copyright (C) 1989 Free Software Foundation, Inc.
plot is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY. No author or distributor accepts responsibility to
anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says ... |
d572beabe9cd3c9f4310583b29f9cc29724a2184f818c7b54f3d5b73b8b9522a | C | 1,082 | 33 | /* Copyright (C) 1989 Free Software Foundation, Inc.
plot is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY. No author or distributor accepts responsibility to
anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says ... |
e731f07e5b40af9df104eccf1f028732e04eafb6c77717b6401588ae0ad362ff | C | 1,102 | 64 |
/* round.c
*
* Round double to nearest or even integer valued double
*
*
*
* SYNOPSIS:
*
* double x, y, round();
*
* y = round(x);
*
*
*
* DESCRIPTION:
*
* Returns the nearest integer to x as a double precision
* floating point result. If x ends... |
ecc5d4525ce9b1d2fcf916ce7f9ee39ca443fcb19652535aa6f89a1df5360658 | C | 1,105 | 121 | #include "vogl.h"
/*
* draw_
*/
void
draw_(x, y, z)
float *x, *y, *z;
{
draw(*x, *y, *z);
}
/*
* draws_
*/
void
draws_(x, y, z)
short *x, *y, *z;
{
draw((float)*x, (float)*y, (float)*z);
}
/*
* drawi_
*/
void
drawi_(x, y, z)
int *x, *y, *z;
{
draw((float)*x, (float)*y, (float)*z);
}
/*
* draw2_
*/
voi... |
7691ce85a020adc4ed3297c2cb285392e9840bf88c183aebdef3411d20de43a8 | C | 1,107 | 120 | #include "vogl.h"
/*
* move_
*/
void
move_(x, y, z)
float *x, *y, *z;
{
move(*x, *y, *z);
}
/*
* moves_
*/
void
moves_(x, y, z)
short *x, *y, *z;
{
move((float)*x, (float)*y, (float)*z);
}
/*
* movei_
*/
void
movei_(x, y, z)
int *x, *y, *z;
{
move((float)*x, (float)*y, (float)*z);
}
/*
* move2_
*/
v... |
dff5ecc4db690dd7141c12ddb13d0cb8efb2b513cdfb1ca1604679d4d3f65216 | C | 1,108 | 49 | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <assert.h>
#include <fxdiv.h>
#include <qnnpack/u8lut32norm.h>
static inline uint32_t com... |
e04dd09d9d476b04b8fb4aed0f502567b265333290b5e06085c36f82fd9365f1 | C | 1,108 | 40 | /*
* Copyright (C) 1993,1994,2001 Bernd Feige
* This file is part of avg_q and released under the GPL v3 (see avg_q/COPYING).
*/
/*
* array_allocate.c function to allocate the memory storage sufficient to
* hold the number of memory elements defined in the array header
* NOTE -- element_skip has to be defined and... |
8cdde0cabaa4446e8d99e24290ef6a4b6ca967e90a1eb0bd512633d4adf1d424 | C | 1,110 | 28 | /* plot2ps, a utility for converting Unix plot files into postscript.
Copyright (C) 1989 Free Software Foundation, Inc.
Plot2ps is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY. No author or distributor accepts responsibility to anyone for the
consequences of using it or for whether it s... |
b2d36ea071ad9e8b9085f45f309de41ae586bc1b61e29dcf037016a494d5ebe5 | C | 1,113 | 39 | /* FILE namemac.c */
/* Name registers according to stack, class and stack name */
#include "../defs.h"
#include "../array.h" /* Access registers directly */
#include "../_imports/deffs.h"
#include "../_imports/event.h" /* Stack instruction definitions*/
#include <stdlib.h>
/* ********************... |
f6fcc1bf892729296c218cbc76d1a59fb609fe2aa95ded6d8798918a7158cb52 | C | 1,116 | 28 | /* Copyright (C) 1989 Free Software Foundation, Inc.
plot is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY. No author or distributor accepts responsibility to
anyone for the consequences of using it or for whether it serves any
particular purpose or works at all, unless he says ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.