source
stringlengths
3
92
c
stringlengths
26
2.25M
valid.yolo3.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_128_136_136_64_3_3.h" #include "gen_ukr_A4B2gemm_1_128_136_136_64_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 136; int Ny = 136; int Nh = 3; long ...
omp_dtrmm_batch.c
/** * @file omp_dtrmm_batch.c * * @brief BBLAS omp_dtrmm_batch double routine. * BBLAS is a software package provided by Univ. of Manchester, * Univ. of Tennessee. * * @version 1.0.0 * @author Samuel D. Relton * @author Pedro V. Lara * @author Mawussi Zounon * @date 2016-02-20 * **/ #ifndef DOX...
GB_unaryop__lnot_int8_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...
parallel_random_walk.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <math.h> #include <time.h> #include <limits.h> #include <errno.h> #include "pcg.h" #define GRID_SIZE 10240 #define NSTEPS 320000 #define D_NSTEPS 0 #define NMARKERS 1000000 #define TOLERANCE 0.01 struct mrk{ int id; int thread; int team; ...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
project.c
//----------------------------------------------------------------------------- // project.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/19/14 (Build 5.1.000) // 04/14/14 (Build 5.1.004) // 09/15/14 (Build 5.1.007) // 03/19/15 (Build 5.1.008) // ...
Fig_11.6_hist.c
// sample compile command: "gcc -fopenmp -c Fig_11.6_hist.c" to generate *.o object file #include <omp.h> #include <math.h> //#include "random.h" //seed() and drandom() extern double drandom(); extern void seed(double low_in, double hi_in); #define num_trials 1000000 // number of x values #def...
GB_binop__minus_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
csr_mult_double.h
// Copyright 2021 Igor Rukhovich #ifndef MODULES_TASK_2_RUKHOVICH_I_CSR_MULT_DOUBLE_CSR_MULT_DOUBLE_H_ #define MODULES_TASK_2_RUKHOVICH_I_CSR_MULT_DOUBLE_CSR_MULT_DOUBLE_H_ #include <omp.h> #include <random> #include <stdexcept> #include <utility> #include <vector> class RandomDouble { public: static double Next(...
GB_Global.c
//------------------------------------------------------------------------------ // GB_Global: global values in GraphBLAS //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-2...
convolution_1x1_pack8_fp16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 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_unop__identity_fp32_fc32.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...
pbkdf2_hmac_sha256_fmt_plug.c
/* This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * Based on hmac-sha512 by magnum * * Minor fixes, format uni...
imageconv.h
#include <pybind11/numpy.h> #include <pybind11/stl.h> #include <pybind11/pybind11.h> #include <stdlib.h> #include <stdint.h> #include <iostream> #include "fast2dconv.h" #if defined(ENABLE_OPENMP) #include <omp.h> #else typedef int omp_int_t; inline omp_int_t omp_get_thread_num() { return 0; } inline omp_int_t omp...
clause-2.c
/* PR c/34506 */ /* { dg-do compile } */ #define p parallel void foo (int x) { #pragma omp p num_threads (4) if (1) private (x) ; #pragma omp p num_threads(4)if(1)private(x) ; #pragma omp p num_threads (4), if (1) , private (x) ; #pragma omp p num_threads(4),if(1),private(x) ; #pragma omp p, num_threa...
kmeans.h
// This file is part of OpenMVG, an Open Multiple View Geometry C++ library. // Copyright (c) 2017 Romuald Perrot. // 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 obtain one at http://mozilla.org/MPL/2.0/. ...
matmul.c
#include "matrix.h" /** \brief Computes matrix multiplication * * \param[in] A First input matrix * \param[in] B Second input matrix * \param[in] result Matrix to store the result * \return \f$ \mathbf{A}\mathbf{B} \f$ * */ MATRIX mat_mul(MATRIX A, MATRIX B, MATRIX result) { int i, j, k, m, n, o, p; m ...
task-taskgroup-unrelated.c
/* * task-taskgroup-unrelated.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-e...
rose_doall.c
#include "omp.h" void foo() { int i; int a[100]; #pragma omp parallel for private (i) for (i = 0; i <= 99; i += 1) { a[i] = a[i] + 1; } } /* * ..= a[i]+1 // read * a[i] == // write * non-loop carried anti-dependence : Write-after-Read * dep SgExprStatement:a[i] =((a[i]) + 1); SgExprStat...
scan_xp.h
#ifndef SCAN_QUERY_SCANXP #define SCAN_QUERY_SCANXP #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <omp.h> //OpenMP #include <iostream> #include <vector> #include <fstream> #include <set> #include <atomic> //CAS #include "set-inter/csr_set_intersection_serial.h" #include "set-inter/...
pi-v1.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
pyfr_driver_asp_reg.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
pt.h
////////////////////////////////////////////////////////////////////////////////// // // // trueke // // A multi-GPU implementation of the exchange Monte Carlo method. ...
main.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, const char * argv[]) { int n = 100; if (argc == 1) { printf("Use: %s <número de items>\n", argv[0]); exit(0); } else { n = atoi(argv[1]); } int suma = 0; int i; int numeros[n]; ...
DRACC_OMP_009_Counter_wrong_critical_yes.c
/* Concurrent access on a counter with the wrong lock, by utilising OpenMP critical directives. Atomicity Violation. Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams. Although they are able to interrupt each other leading to a wrong result. Inter and Intra ...
convolution_sgemm_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 // //...
raytracer.c
/* ************ RAYTRACER.C ************************* * * Proyecto 2: Ray Tracing Basico * * Prof.: * Francisco J. Torres Rojas PhD * * Autor: * Andres Aguilar Umana * 200928927 * * 1 de Abril 2012 * ****************************************************/ #include <raytracer.h> #include <...
mxnet_op.h
/*! * Copyright (c) 2017 by Contributors * \file mxnet_op.h * \brief * \author Junyuan Xie */ #ifndef MXNET_OPERATOR_MXNET_OP_H_ #define MXNET_OPERATOR_MXNET_OP_H_ #include <mxnet/base.h> #include <algorithm> namespace mxnet { namespace op { namespace mxnet_op { #ifdef __CUDA_ARCH__ __constant__ const float PI = ...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b) #...
DRB035-truedepscalar-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...
main.c
// Lid-driven Cavity with explicit, central difference Artificial // Compressibility method. See Ferziger Computational Methods for Fluid // Dynamics, section 7.4.3. Travis Burrows. #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> // Simulation Parameters #define N 50 // Number of poi...
taskgroup.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #include "callback.h" #include <unistd.h> #include <stdio.h> int main() { int condition=0; int x=0; #pragma omp parallel num_threads(2) { #pragma omp master { #pragma om...
LB_friction-test.c
/** * @file LB_D1Q3_2-components.c * @author Kent S. Ridl * @date 2 December 2017 * * The module _LB_D1Q3_2-components.c_ contains the code to run a lattice Boltzmann simulation. It also contains the definitions of all externs from the header * file _LB_D1Q3_2-components.h_. */ #include "LB_friction-test.h" ...
GB_unop__trunc_fp64_fp64.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...
remarks_parallel_in_target_state_machine.c
// RUN: %clang_cc1 -verify=host -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -Rpass=openmp-opt -Rpas...
jacobi.c
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define U(i,j) (u[i][j]) #define Uold(i,j) (uold[i][j]) #define F(i,j) (f[i][j]) void jacobi (int n, double dx, double omega, double **u, double **f, double tol, int maxit); double** dalloc_matrix(int n, int m)...
TinyErode.h
// SPDX-License-Identifier: MIT // _______ _ ______ _ // |__ __(_) | ____| | | // | | _ _ __ _ _| |__ _ __ ___ __| | ___ // | | | | '_ \| | | | __| | '__/ _ \ / _` |/ _ \ // | | | | | | | |_| | |____| | | (_) | (_| | __/ // |_| |_|_| |_...
repeat_base.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2015, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
burgers1d_b.c
/* Generated by TAPENADE (INRIA, Ecuador team) Tapenade 3.14 (r7079) - 5 Oct 2018 09:55 */ #include "mystack.h" /* Differentiation of fmax in reverse (adjoint) mode: gradient of useful results: fmax b with respect to varying inputs: b */ void fmax_b(double a, double b, double *bb, double fm...
GB_unop__identity_fc32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
5779.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...
DRB059-lastprivate-orig-no.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...
rawKeccak_512_fmt_plug.c
/* Keccak-512 cracker patch for JtR. Hacked together during January of 2013 * by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This file is part of John the Ripper password cracker, * Copyright (c) 2012 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. */ #if FMT_EXTERNS_H extern s...
GB_unaryop__abs_uint32_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
softmax.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
GB_unop__atanh_fc64_fc64.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...
GB_unop__isnan_bool_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
tgroup.c
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, * check out http://www.gromacs.org for more information. * Copyright (c) 2012,2013, by the GROMACS development team, l...
maxwell_zeroBC.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
imutil.c
/* ----------------------------------------------------------------------------- * imutil.c * ----------------------------------------------------------------------------- * Copyright (c) 2015-2017 Blaine Rister et al., see LICENSE for details. * ---------------------------------------------------------------------...
omp_mm.c
/****************************************************************************** * FILE: omp_mm.c * DESCRIPTION: * OpenMp Example - Matrix Multiply - C Version * Demonstrates a matrix multiply using OpenMP. Threads share row iterations * according to a predefined chunk size. * AUTHOR: Blaise Barney * LAST REVISED:...
guess.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #define _DISP 0 void disp(int * num1){ #ifndef _DISP printf( "num: %d %d %d %d\n",num1[0],num1[1],num1[2],num1[3]); #endif } inline void num2p(int seqn, int * nump){ //数字转为数组,并用指针传出 int i; for(i=0; i<4; i++) nump[i]=0; i=3; while(seqn){...
homomorphic_functions.c
long long int sk[NUM_PRIME][4096]; long long int pk0[NUM_PRIME][4096], pk1[NUM_PRIME][4096]; long long int rlk00[NUM_PRIME][4096], rlk01[NUM_PRIME][4096], rlk10[NUM_PRIME][4096], rlk11[NUM_PRIME][4096]; long long int rlk20[NUM_PRIME][4096], rlk21[NUM_PRIME][4096], rlk30[NUM_PRIME][4096], rlk31[NUM_PRIME][4096], rlk40[N...
cgaditherfs2.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <omp.h> #include "common.h" extern int opt_alt; // RYGb extern int opt_balt; // bias2 extern int opt_calt; // bias1 typedef struct { size_t i; img_t img; float* c,* l; float* err; } tddata_t; #define CLAMP(X, MIN, M...
crivo.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> #define NUM_THREADS 1 int main(int argc, char *argv[]) { long long n; int raizN; double inicio, fim; long long primos = 0; int *array; // 0 = é primo. 1 = não é primo omp_set_num_threads(NUM_THREADS); if (argc < 2) ...
GB_binop__bclr_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-...
GB_concat_bitmap_template.c
//------------------------------------------------------------------------------ // GB_concat_bitmap_template: concatenate a tile into a bitmap matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
maxpool_with_mask.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. /* * Highly specialized code, only works for TP3 L1 */ #pragma once #include "core/common/common.h" #include "core/framework/op_kernel.h" #include "core/framework/tensor.h" #include "core/providers/cpu/nn/pool_base.h" #i...
yolov2_forward_network.c
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h // softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h #define GEMMCONV /* // from: box.h typedef struct { float x, y, w, h; } box; ...
fillholes_c.h
void fillholes_flat_c(float *outputmat,uint8_t *maskarray,size_t nt,size_t ny,size_t nx) { size_t tcnt; #ifdef _MSC_VER uint64_t infinity_val=0x000000007FF00000l; uint64_t neginfinity_val=0x00000000FFF00000l; double infinity_dbl,neginfinity_dbl; neginfinity_dbl = *(float64_t *)&neginfinity_val; /* -infinity ...
FLASH_Queue_exec.c
/* Copyright (C) 2014, The University of Texas at Austin This file is part of libflame and is available under the 3-Clause BSD license, which can be found in the LICENSE file at the top-level directory, or at http://opensource.org/licenses/BSD-3-Clause */ #include "FLAME.h" #if FLA_MULTITHREADIN...
3d25pt.c
/* * Order-2, 3D 25 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)...
omp2.c
// note not doing O0 below as to ensure we get tbaa // TODO: %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out // RUN: %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 %s -...
GxB_BinaryOp_xtype.c
//------------------------------------------------------------------------------ // GxB_BinaryOp_xtype: return the type of x for z=f(x,y) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Iden...
11_master_thread.c
#include <stdio.h> #include <omp.h> int main(){ #pragma omp parallel printf("Parallel from thread %i\n", omp_get_thread_num()); #pragma omp master { printf("Single from thread %i\n", omp_get_thread_num()); } }
GB_unaryop__ainv_int8_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ikamatcher2_neon_hal.c
#include <stdint.h> #include <stdio.h> #include <time.h> #include <stdlib.h> //#include "ikamatcher_c.h" #include <arm_neon.h> int IkaMatcher2_encode(char *dest, char *src, int pixels) { uint8x16_t mask0 = (uint8x16_t)vdupq_n_u64(0x8040201008040201); uint8x16_t mask1 = mask0; uint8x16_t mask2 = mask0;...
GB_binop__hypot_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
bt.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB BT code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
GB_unop__identity_int64_fp64.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...
muesli_utils.c
/* File: example.c */ #include "muesli_utils.h" #include <stdlib.h> #include <stdio.h> #include <error.h> #include <omp.h> #include <mpi.h> double start_time; double end_time; double fib(double n) { if (n < 0){ /* This should probably return an error, but this is simpler */ return 0; } if (n == ...
flush.c
//Transpose without locks or critical #include<stdio.h> #include<time.h> #include<omp.h> void main() { int a[5][5],b[5][5],c[5][5],temp=0,ch,i,j; printf("Menu\n1.Express Mode\n2.Custom Mode\n"); printf("Enter your choice:"); scanf("%d",&ch); if(ch == 1) { int l = 1; for(i=0;i<5;i++) { for(j=0;j<5;j++...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
evolution.h
// // Created by mattw on 11/01/2022. // #ifndef BECPP_EVOLUTION_H #define BECPP_EVOLUTION_H #include <complex> #include "wavefunction.h" #include "data.h" constexpr std::complex<double> I{0, 1}; void apply_TF_density(Wavefunction2D &psi, const Parameters &params) { double tf_density; double g = params.c0 ...
Cycle.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * 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 without limitation the rights * to use,...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
SE_fg_int_split_mex.c
#include "mex.h" #include "../SE_fgg.h" void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int); #define X prhs[0] // this arg is unused #define HH prhs[1] #define OPT prhs[2] #define ZS prhs[3] #define ZX prhs[4] #define ZY prhs[5] #define ZZ prhs[6] #define IDX prhs[7] #define PHI_OUT plhs[0] // Outp...
gesummv.orio.par.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.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)) #include "decl.h" double rtclock() { stru...
vlad.c
/** @file vlad.c ** @brief VLAD - Declaration ** @author David Novotny ** @author Andrea Vedaldi **/ /* Copyright (C) 2013 David Novotny and Andera Vedaldi. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). */ /** <!-- ~~...
omp.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define NMAX 1000000 #define OMP_THREADS 4 static double arr_sum_default(const double *arr, const int size) { double sum = 0.0; int i; for (i = 0; i < size; ++i) { sum += arr[i]; } return sum; } static double arr_sum_reduction(const double *arr,...
rel_particle_iter.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "rel_particle_iter.kernel_inc.h" int openmp_relng_1st_init (openmp_pscmc_env * pe ,openmp_relng_1st_struct * kerstr ){ return 0 ;} void openmp_relng_1st_get_struct_len (size_t * len ){ ((len)[...
Validation.h
// // Created by kilian on 02/05/17. // #ifndef STERMPARSER_VALIDATION_H #define STERMPARSER_VALIDATION_H #include <iostream> #include "LatentAnnotation.h" #include "TraceManager.h" #include "../util.h" #include "HypergraphRanker.h" namespace Trainer { class ValidationLA { public: virtual double val...
linalg.h
/* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal * * This file is part of SPAMS. * * SPAMS 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 of the License, or * (at your optio...
bfecc_convection.h
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___ // / __/ _ \| \| \ \ / /__| \_ _| __| __| // | (_| (_) | .` |\ V /___| |) | || _|| _| // \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION // // License: BSD License // Kratos default license: kratos/license.txt // // Main autho...
pt.c
/* Handle parameterized types (templates) for GNU -*- C++ -*-. Copyright (C) 1992-2015 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing. Rewritten by Jason Merrill (jason@cygnus.com). This file is part of GCC. GCC is free software; you can redistribute ...
zboxloop.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
ParticleBConds3DSoa.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeongnim ...
TopNPrinter.h
/**************************************************************************** ** CUBE http://www.scalasca.org/ ** ***************************************************************************** ** Copyright (c) 1998-2016 ** ** Fors...
NETLM_fmt_plug.c
/* * NETLM_fmt.c -- LM Challenge/Response * * Written by JoMo-Kun <jmk at foofus.net> in 2007 * and placed in the public domain. * * Performance and OMP fixes by magnum 2011 * * This algorithm is designed for performing brute-force cracking of the LM * challenge/response pairs exchanged during network-based au...
bloom.c
/******************************************************************************* *** *** Author: Tyler Barrus *** email: barrust@gmail.com *** *** Version: 1.8.2 *** *** License: MIT 2015 *** *******************************************************************************/ #include <stdlib.h> #include ...
taskdep_if0_2.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include <omp.h> #include "omp_my_sleep.h" int a = 0, b = 0; int task_grabbed = 0, task_can_proceed = 0; int task2_grabbed = 0, task2_can_proceed = 0; static void wait_on_flag(int *flag) { int flag_value; int timelimit = 30; int secs = 0; ...
GB_binop__minus_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
RungeSolver4.h
#include "../DifferentialSolver.h" template <typename Scalar> class RungeSolver: public DifferentialSolver<Scalar> { public: using DifferentialSolver<Scalar>::timeStep; using DifferentialSolver<Scalar>::currTime; RungeSolver(): DifferentialSolver<Scalar>() {} void SetSystem(DifferentialSystem<Scalar>* syst...
diffusion3d.mic.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <sys/time.h> #include <omp.h> #include <assert.h> #define REAL float #define NX (256) #ifndef M_PI #define M_PI (3.1415926535897932384626) #endif void init(REAL *buff, const int nx, const int ny, const int nz, ...
dftcommon.c
// Copyright Naoki Shibata 2010 - 2017. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <ctype.h> #include...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
par_relax_more.c
/****************************************************************************** * * a few more relaxation schemes: Chebychev, FCF-Jacobi, CG - * these do not go through the CF interface (hypre_BoomerAMGRelaxIF) * *****************************************************************************/ #include "_hypre_p...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...