source
stringlengths
3
92
c
stringlengths
26
2.25M
util.h
/* * This file is part of Quantum++. * * MIT License * * Copyright (c) 2013 - 2018 Vlad Gheorghiu (vgheorgh@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restr...
020_pi.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> double compute_partial_pi(long nr_tries, unsigned int *seed); int main() { const long nr_tries = 1000000; const int nr_blocks = 10; int num_threads = 1; double nr_success = 0.0; #pragma omp parallel default(none) shared(nr_success) shared(num_thr...
no_loop_1.c
#include <stdio.h> #include <omp.h> #pragma omp declare target int foo(int i) { return i+1; } #pragma omp end declare target int main() { int N = 100000; int a[N]; int b[N]; int i; for (i=0; i<N; i++) b[i]=i; for (i=0; i<N; i++) a[i]=0; int j; #pragma omp target teams distribute parallel fo...
main.c
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.c * Author: Alexandros Ioannidis * * Created on January 7, 2016, 1:35 PM */ #include <stdio.h> #include <stdl...
convolution_sgemm_pack8to4_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
convolution_1x1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_binop__ge_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
perturbations.c
/** @file perturbations.c Documented perturbation module * * Julien Lesgourgues, 23.09.2010 * * Deals with the perturbation evolution. * This mdule has two purposes: * * - at the beginning, to initialize the perturbations, i.e. to * integrate the perturbation equations, and store temporarily the terms * contri...
pr48591.c
/* PR middle-end/48591 */ /* { dg-do run { target __float128 } } */ /* { dg-options "-O0" } */ /* { dg-add-options __float128 } */ extern void abort (void); int main () { __float128 f = 0.0; int i; #pragma omp parallel for reduction(+:f) for (i = 0; i < 128; i++) f += 0.5Q; if (f != 64.0Q) abort...
search.h
// -*- C++ -*- // Copyright (C) 2007-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3...
agmgSetup.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus, Rajesh Gandham Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including w...
GB_unop__identity_int8_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
omp_hello.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { /* Uncomment the code below to manually set the number of threads */ // omp_set_dynamic(0); // omp_set_num_threads(5); int nthreads, tid; #pragma omp parallel private(nthreads, tid) { tid = omp_get...
GB_unaryop__lnot_int64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
schur_eliminator_impl.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2010, 2011, 2012 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // ...
GB_binop__ne_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
ocp_nlp_sqp_rti.c
/* * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl * * This file is part o...
GB_binop__eq_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
bins_dynamic.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Nelson Lafontaine // Carlos Roi...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "bicg.h" /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /*bic...
GB_binop__isge_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
tree.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/dataset.h> #include <LightGBM/meta.h> #include <string> #include <map> #includ...
test6.c
//#include<omp.h> int main() { #pragma omp parallel { int i, x; int y; #pragma omp for nowait for(i = 0; i < 10; i++) { #pragma omp critical (someName) printf("1.) Iteration %d with thread %d\n", i, omp_get_thread_num()); if(omp_get_thread_num()%2 == 0) sleep(5); } #pragma omp for nowait for(i = 0;...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "gesummv.h" /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /*...
connected_layer.c
#include "connected_layer.h" #include "batchnorm_layer.h" #include "convolutional_layer.h" #include "utils.h" #include "dark_cuda.h" #include "blas.h" #include "gemm.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> size_t get_connected_workspace_size(layer l) { #ifdef CUDNN return g...
distribution.h
#ifndef DISTRIBUTION_H #define DISTRIBUTION_H #include <cmath> #include <omp.h> const float delta_max = 1.0f; #pragma omp declare simd float dist_func(const float alpha, const float rn); #endif
Forces_PS.h
/* * force_ps.h * * Created on: Sep 20, 2016 * Author: isivkov */ #ifndef SRC_FORCES_PS_H_ #define SRC_FORCES_PS_H_ #include "../simulation_context.h" #include "../periodic_function.h" #include "../augmentation_operator.h" #include "../Beta_projectors/beta_projectors.h" #include "../Beta_projectors/beta_pr...
effects.c
#define _POSIX_C_SOURCE 200809 #include <omp.h> #include <stdlib.h> #include <stdbool.h> #include <dlfcn.h> #include <string.h> #include <errno.h> #include <sys/wait.h> #include <unistd.h> #include <spawn.h> #include "effects.h" #include "log.h" extern char **environ; static void blur_h(uint32_t *dest, uint32_t *src,...
jacobi-block-task.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
declare-pr90861.c
/* Verify that OpenACC 'declare' cleans up for VLAs. */ /* { dg-additional-options "-fdump-tree-gimple" } */ void f1 (void) { #define N_f1 1000 int A_f1[N_f1]; #pragma acc declare copy(A_f1) /* { dg-final { scan-tree-dump-times {#pragma omp target oacc_declare map\(to:A_f1} 1 gimple } } { dg-final { scan-tr...
mxEvaluatePostFunc2d.c
#include "mex.h" #include "mxSWE2d.h" #ifdef _OPENMP #include <omp.h> #endif #define NRHS 5 #define NLHS 1 #define NVAR 3 void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { /* check input & output */ if (nrhs != NRHS) { mexPrintf("Matlab:%s:InvalidNumberInput,\n", __FILE__); m...
sudoku.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> // Sudoku-Solver // May 2018: Sven Bingert, Triet Doan // // ------------------------------------------------------ // print the sudoku on screen // ------------------------------------------------------ void printsudoku(int n, int m, int field...
ofmo-integ.c
/** * @file ofmo-integ.c * Hartree-Fock分子軌道法、および、それに基づいたFMO法で * 必要となる各種分子積分を行うための最上位関数群を定義している * ファイル。 * */ /** * @defgroup integ 分子積分クラス * 通常のHartree-Fock(HF)分子軌道計算で用いる1電子積分(運動エネルギー * 積分、核-引力積分、重なり積分)や2電子積分だけでなく、FMO法に出現する * 4中心(3中心、2中心)の各種クーロン積分、および、カットオフテーブル * を作成する関数などを定義している。 * * @ingroup ofmo * * */...
8683.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
metric.c
/*--------------------------------------------------------------------------------- METRIC.C -Helper functions for metric tensors -Compute 4x4 matrix minor, adjoint, determinant and inverse -Compute connection coefficients -Raise and lower rank-1 tensors -Take dot product of a contravariant and covariant...
threads.c
#include <stdio.h> #include <omp.h> int main() { #pragma omp target parallel num_threads(1) printf ("Thread: %d\n", omp_get_thread_num()); return 0; }
main.c
/*BHEADER**************************************************************** * (c) 2007 The Regents of the University of California * * * * See the file COPYRIGHT_and_DISCLAIMER for a complete copyright * * notice and disclaimer...
topotherm.c
/* * Saturation function over ice and water */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <errno.h> #include <omp.h> #include "envphys_c.h" #include "envphys.h" // stephman boltzman constant #define STEF_BOLTZ 5.6697e-8 extern int errno; void topotherm( int ngrid, /* number of grid poin...
lu2lib.c
// // lu2lib.c // // J. Makino // Time-stamp: <11/06/20 17:50:32 makino> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <timerlib.h> #ifndef NOBLAS #ifdef MKL #include <mkl_cblas.h> #else #include <cblas.h> #endif #endif #ifdef USEGDR #include "gdrdgemm.h" #endif #define FTYPE double #include <em...
pi_final.c
/* * * And we've come full circle. The serial pi-program modified by 2-ish lines to become parallel * * Author: Matt Cufari * Version 1.0.0 * Date Created Jan 4 2021 * Date Last Modified Jan 4 2021 * */ #include <omp.h> #include <stdio.h> static int num_steps = 1000000; double step; int main(){ int i; d...
convolution_3x3_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // //...
primitives.h
#pragma once #include <vector> #include <cstdint> using namespace std; /* * Both Primitives Are Inclusive * histogram is for cache-aware thread-local histogram purpose * output should be different from the variables captured in function object f * size is the original size for the flagged prefix sum */ templat...
5298.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])...
mlp_example_f32_numa.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
core_zlag2c.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions mixed zc -> ds * **/ #include "core_blas.h" #include "core_lapack.h" #include "plasma_types.h" /**********************************************************************...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2014 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
BubbleSort_OpenMP.c
#include <stdio.h> #include <omp.h> #include <time.h> #include <stdlib.h> #define SIZE 2000 long array[SIZE]; double avg; void BubbleSort(int start, int end){ long temp = 0; for (long i = start ; i < end ; i++ ) { for (long j = start ; j < end ; j++) { if (array[j] > array[i]) { temp = array[j]; ...
tsv.c
/* This code is part of this project: Donato E, Ouyang M, * Peguero-Isalguez C. Triangle counting with a multi-core computer. * Proceedings of IEEE High Performance Extreme Computing Conference * (HPEC), 2018, 1-7. * * Copyright (c) 2018 Ming Ouyang * * Permission is hereby granted, free of charge, to any perso...
gamma_index_ivfpq.h
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This faiss source code is licensed under the MIT license. * https://github.com/facebookresearch/faiss/blob/master/LICENSE * * * The works below are modified based on faiss: * 1. Replace the static batch indexing with real time indexing * 2. Add the fin...
DRB011-minusminus-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
seriesSum.c
#include <stdio.h> #include <math.h> #include <omp.h> int main(){ int x, n, i, sum = 1; omp_set_dynamic(0); printf("Enter the values\nx = "); scanf("%d", &x); printf("N = "); scanf("%d", &n); int m = omp_get_num_procs(); omp_set_num_threads(m); // x^1 + x^2 + x^3 ...
intersectionFunctor.h
// Copyright 2014 Nicolas Mellado // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
func_1v.c
void func_1v(float* in, float* out, unsigned n){ unsigned i; #pragma omp target teams distribute parallel for map(to: in[0:n]) map(from: out[0:n]) for(i=0; i<n; ++i){ out[i]=2*in[i]; } }
GB_unaryop__ainv_uint32_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
for-6.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-ompexp" } */ /* LLVM LOCAL test not applicable */ /* { dg-require-fdump "" } */ extern void bar(int); void foo (int n) { int i; #pragma omp for schedule(runtime) for (i = 0; i < n; ++i) bar(i); } /* { dg-final { scan-tree-dump-times "GOMP_loop_...
transpose.c
/* * */ #include <stdlib.h> #include <complex.h> #include "np_helper.h" /* * matrix a[n,m] */ void NPdtranspose(int n, int m, double *a, double *at) { size_t i, j, j0, j1; for (j0 = 0; j0 < n; j0+=BLOCK_DIM) { j1 = MIN(j0+BLOCK_DIM, n); for (i = 0; i < m; i++) { ...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can ob...
explicit.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { #pragma omp atomic x++; #pragma omp barrier print_current_addre...
DRB041-3mm-parallel-no.c
/** * 3mm.c: This file is part of the PolyBench/C 3.2 test suite. * three steps of matrix multiplication to multiply four matrices. * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #include <unistd.h> #...
GB_binop__bxnor_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
3D.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
GB_unaryop__lnot_uint16_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
gemm.c
#include "gemm.h" #include "utils.h" #include "cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> void gemm_bin(int M, int N, int K, float ALPHA, char *A, int lda, float *B, int ldb, float *C, int ldc) { int i,j,k; for(i = 0; i < M; ++i){ for(k = 0; k < K; ++k){...
fill_nr_s8.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
mgl.h
/*************************************************************************** * mgl.h is part of Math Graphic Library * Copyright (C) 2007-2016 Alexey Balakin <mathgl.abalakin@gmail.ru> * * * * This program is free software; you can ...
GB_unaryop__lnot_bool_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
MkBase.h
#ifndef RecoTracker_MkFitCore_src_MkBase_h #define RecoTracker_MkFitCore_src_MkBase_h #include "Matrix.h" #include "PropagationMPlex.h" namespace mkfit { //============================================================================== // MkBase //===============================================================...
convolution_3x3_pack8to4_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
GB_AxB_dot2.c
//------------------------------------------------------------------------------ // GB_AxB_dot2: compute C=A'*B or C<!M>=A'*B in parallel, in place //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://...
reduction-clauseModificado.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main(int argc, char **argv) { int i, n=20, a[n],suma=10; if(argc < 2) { fprintf(stderr,"Falta iteraciones\n"); exit(-1); } n = atoi(argv[1]); if (n>20) {n=20; printf("n=%d",n);} for (i=0; i<...
cpu_stream.h
/* Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
integrator.h
/// @file integrator.h /// Numerical integration. /// @author Ralf Quast /// @date 2021 /// @copyright MIT License #ifndef INTEGRATOR_H #define INTEGRATOR_H #include <algorithm> #include <cmath> #include <valarray> #include <vector> #include "base.h" namespace especia { /// Numerical integration by means of rec...
GB_unop__lgamma_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
binarytrees.gcc-7.c
/* The Computer Language Benchmarks Game * http://shootout.alioth.debian.org/ * * contributed by Francesco Abbate */ #include <stdlib.h> #include <stdio.h> typedef off_t off64_t; #include <apr_pools.h> const size_t LINE_SIZE = 64; struct node { int i; struct node *left; struct node *right; }; int node_c...
encode_in_pgm.c
#include "PGM.h" #include <string.h> /*Refer Research paper:[https://sci-hub.ee/10.1007/s11220-019-0262-y] for formulation of layers.*/ void generate_layer_one(int *image, int *secret, int height, int width, int *p1, int *q1) { if (!(p1) | !(q1)) { printf("ERROR: Memory Allocation for first layer fail...
ten_tusscher_2004_epi_S2_11.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S2_11.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO...
GB_unop__ainv_uint8_uint8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
shortcut_layer.c
#include "shortcut_layer.h" #include "convolutional_layer.h" #include "dark_cuda.h" #include "blas.h" #include "utils.h" #include "gemm.h" #include <stdio.h> #include <assert.h> layer make_shortcut_layer(int batch, int n, int *input_layers, int* input_sizes, int w, int h, int c, float **layers_output, float **laye...
kernel_cpu.c
#ifdef __cplusplus extern "C" { #endif //========================================================================================================================================================================================================200 // DEFINE/INCLUDE //======================================================...
DRB040-truedepsingleelement-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
utils.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> void print_mat(int n , int** mat) { int i,j; for (i = 0; i < n; i++){ printf("%X: ",mat[i]); for (j = 0; j < n; j++){ printf("%d ",mat[i][j]); } printf("\n"); } printf("\n"); } void m...
kwallet_fmt_plug.c
/* KDE KWallet cracker patch for JtR. Written by Narendra Kangralkar * <narendrakangralkar at gmail.com> and Dhiru Kholia <dhiru at openwall.com>. * * Also see https://github.com/gaganpreet/kwallet-dump ;) * * This software is Copyright (c) 2013 by above authors and it is hereby * released to the general public u...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
hello-omp-pip.c
#include <stdio.h> #include <pip.h> int main( int argc, char **argv ) { int pipid, tid; pip_init( &pipid, NULL, NULL, 0 ); printf( "<%d> %s\n", pipid, pip_get_mode_str() ); #pragma omp parallel private(tid) { tid = omp_get_thread_num(); printf( "Hello from PiP-OMP thread %d:%d\n", pipid, tid ); } ...
sol2.c
/** * \file * \brief [Problem 23](https://projecteuler.net/problem=23) solution - * optimization using look-up array * \author [Krishna Vedala](https://github.com/kvedala) * * Optimization applied - compute & store abundant numbers once * into a look-up array. */ #include <stdio.h> #include <stdlib.h> #include ...
batchnorm_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
resample.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dynamic_fmt.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2009-2013. No copyright is claimed, and the software is hereby * placed in the public domain. In case this attempt to disclaim * copyright and place the software in the public domain is deemed * null and void, then the software is Copyright (...
GB_unaryop__identity_uint8_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ChMatrix.h
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
arrays.c
/** * module with tools for manipulating arrays * Julien Lesgourgues, 18.04.2010 */ #include "arrays.h" /** * Called by thermodynamics_init(); perturb_sources(). */ int array_derive( double * array, int n_columns, int n_lines, int index_x, /** from 0 to (n_columns-1) */ int index_y, int index...
GB_binop__land_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
convolution_sgemm_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...