source
stringlengths
3
92
c
stringlengths
26
2.25M
Example_linear_modifier.3.c
/* * @@name: linear_modifier.3c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_4.5 */ #include <stdio.h> #define N 128 #pragma omp declare simd simdlen(4) uniform(x, y) linear(val(i):1) double func(double x[], double y[], int i) { return (x[i] + y[i]); } int main(void) { ...
5fc8d_icc_so8.c
#define _POSIX_C_SOURCE 200809L #define START_TIMER(S) \ struct timeval start_##S, end_##S; \ gettimeofday(&start_##S, NULL); #define STOP_TIMER(S, T) \ gettimeofday(&end_##S, NULL); \ T->S += (double)(end_##S.tv_sec - start_##S.tv_sec) + (double)(end_##S.tv_usec - start_##S.tv_usec) / 1000...
13.c
/* На нулевом процессе задан массив целых чисел, который является двоичным представлением десятичного числа. Написать параллельную программу вычисления десятичного числа из заданного двоичного представления. int a[30] = {1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1}; Число x ...
main-50^3-c.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> #include <stdio.h> #include <fj_tool/fapp.h> #include <fjcoll.h> // L2 Cache = 6MB #define NX 50 #define NY 50 #define NZ 50 typedef double array[NX][NY][NZ]; typedef double surface[NY][NZ]; array U_mem, V_mem; array...
example_matrix_vector_multiplication_mpi_openmp.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <mpi.h> int main (int argc, char *argv[]){ double *matrix, *vector_in, *vector_out, out; long dim_mn, iterations, i, j, iteration; struct timeval start, stop, tdiff; int mpi_size, mpi_rank; double exec_time; MPI_Init(&argc, ...
divsufsort.c
/* * divsufsort.c for libdivsufsort * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. * * 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 ...
GB_binop__ge_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...
SpatialConvolution.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialConvolution.c" #else static int nn_(SpatialConvolution_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor); int dW = luaT_getfieldcheckint(L, 1, "dW"); int dH = luaT_getfieldcheckint(L, 1, "dH"); THTensor *weight =...
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...
uccsd_t.c
/* * */ #include <stdlib.h> #include <string.h> #include "config.h" #include "np_helper/np_helper.h" #include "vhf/fblas.h" typedef struct { double *cache[6]; short a; short b; short c; short _padding; } CacheJob; size_t _ccsd_t_gen_jobs(CacheJob *jobs, int nocc, int nvir, ...
Pooling2DLayer.h
// // @author raver119@gmail.com // #ifndef PROJECT_POOLING2DLAYER_H #define PROJECT_POOLING2DLAYER_H #include <layers/layers.h> #include <layers/generic/BaseLayer.h> namespace nd4j { namespace layers { // FIXME: we don't need activation function here template<typename T, typename AF> class Pooling2DLayer: public B...
mixed_tentusscher_myo_epi_2004_S2_16.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_16.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode...
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...
SplineC2CAdoptor.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: // // Fil...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
reduction.c
#include <stdio.h> #include <omp.h> int main(){ int A[10] = {0,1,2,3,4,5,6,7,8,9}, i, m, sum = 0; omp_set_dynamic(0); m = omp_get_num_procs(); omp_set_num_threads(m); printf("Parallel\n------------"); #pragma omp parallel for reduction(+:sum) for(i = 0; i < 10; i++){ ...
neural_network_omp.c
/** * Lorenzo Mario Amorosa - APAI 2020/21 * * compile: gcc -std=c99 -Wall -Wpedantic -fopenmp neural_network_omp.c -o neural_network_omp -lm * run: OMP_NUM_THREADS=8 ./neural_network_omp 30000 3000 **/ #include <stdio.h> #include <time.h> #include <stdlib.h> #include <omp.h> #include <math.h> #define R 3 /* * ...
DiracMatrix.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2019 QMCPACK developers. // // File developed by: Ye Luo, yeluo@anl.gov, Arg...
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 // //===---------------------------...
GB_reduce_build_template.c
//------------------------------------------------------------------------------ // GB_reduce_build_template.c: Tx=build(Sx), and assemble any duplicate tuples //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved...
trsm_x_bsr_n_lo_row.c
#include "alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" #include <memory.h> alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { const ALPHA_INT ...
convolutionbnrelu_3x3.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 ...
displacement_lagrangemultiplier_residual_contact_criteria.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_...
openMPMandelbrot.c
/* c program: -------------------------------- 1. draws Mandelbrot set for Fc(z)=z*z +c using Mandelbrot algorithm ( boolean escape time ) ------------------------------- 2. technique of creating ppm file is based on the code of Claudio Rocchini http://en.wikipedia.org/wiki/Image:Color_complex_plot....
FindHaloes.c
// Re-write of find_halos.c from the original 21cmFAST // ComputeHaloField takes in a k_space box of the linear overdensity field // and filters it on decreasing scales in order to find virialized halos. // Virialized halos are defined according to the linear critical overdensity. // ComputeHaloField outputs a cube ...
if-4.c
void f0 (void); void f1 (int *p) { int i; #pragma omp task if (0) if (0) /* { dg-error "too many 'if' clauses without modifier" } */ f0 (); #pragma omp task if (0) if (1) /* { dg-error "too many 'if' clauses without modifier" } */ f0 (); #pragma omp task if (task:0) if (task:0) /* { dg-error "too many 'i...
fci_spin.c
/* * 2-particle spin density matrix * Gamma(ia,jb,kb,la) or Gamma(ib,ja,ka,lb) */ #include <stdlib.h> #include <string.h> #include "config.h" #include "vhf/fblas.h" #define CSUMTHR 1e-28 #define EXTRACT_CRE(tab, i) (tab[i*4+0]) #define EXTRACT_DES(tab, i) (tab[i*4+1]) #define EXTRACT_ADDR(tab, i) (tab[i*...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
1.norace11.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define T 2000 #define M 20 #define N 20 int main() { double A[M][N], B[M][N]; for (int t = 0; t < T; t++) { #pragma omp parallel for for (int i = 1; i < M - 1; i++) for (int j = 1; j < N - 1; j++) B[i][j] = (0.2) * (A[i...
lu_par_dag.c
#include <stdio.h> #include <stdlib.h> #include "trace.h" #include "common.h" /* This struct defines a task; it can be a panel (Task.type==PNL), an update (Task.type==UPD) or a termination message (Task.type==END). If Task.type==PNL, then the panel operation has to be executed on column Task.p. If Task.type==...
critical_multiple.c
// PASS: * // RUN: ${CATO_ROOT}/src/scripts/cexecute_pass.py %s -o %t // RUN: diff <(mpirun -np 4 %t) %s.reference_output #include <stdio.h> #include <omp.h> int main() { int x = 0; #pragma omp parallel { #pragma omp critical { x += omp_get_thread_num(); } #pra...
t_cholmod_super_numeric.c
/* ========================================================================== */ /* === Supernodal/t_cholmod_super_numeric =================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
ejercicio2-2.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main(){ int i, n = 7; int a[n], suma; for (i=0; i<n; i++) a[i] = i; #pragma omp parallel private(suma) { suma=5; #pragma omp for for(i=0; i<n; i++){ ...
saxpy.c
/* * File: saxpy.c * Author: Malcolm Davis * Course: Computer Architecture II * Created on Feb 24, 2018 * Simple SAXPY(Single-precision Alpha*X Plus Y) operation with OpenMP * * Ussage: * ./argv[0] for default parameters and random vectors or; * ./argv[0] <array size> */ #include <stdio.h> #include <std...
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) ...
cryptsha512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * based on rawSHA256_fmt.c code and Drepper's spec at * http://www.akkadia.org/drepper/SHA-crypt.txt * * This software is Copyright (c) 2012 magnum, and it is hereby released to the * general public under the following terms: Redistribution and use in s...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "omp.h" #include "functions.h" int main (int argc, char **argv) { int Nthreads = 20; omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will make your program ru...
GB_thread_local.c
//------------------------------------------------------------------------------ // GB_thread_local: manage thread-local storage //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com S...
ast-dump-openmp-distribute-parallel-for-simd.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp distribute parallel for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp distribute parallel for ...
dpado.202001172040.local_minimum_reduction.h
// // Created by Zhen Peng on 1/6/20. // #ifndef PADO_DPADO_H #define PADO_DPADO_H #include <vector> //#include <unordered_map> #include <map> #include <algorithm> #include <iostream> #include <limits.h> //#include <xmmintrin.h> #include <immintrin.h> #include <bitset> #include <math.h> #include <fstream> #include <o...
convolution_winograd_transform_pack8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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_unaryop__lnot_fp32_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...
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) ...
rose_firstprivate3.c
#include <stdio.h> #include <math.h> #include "omp.h" void driver(); void initialize(); void jacobi(); void error_check(); #define MSIZE 200 int n; int m; int mits; double tol; double relax = 1.0; double alpha = 0.0543; double u[200][200]; double f[200][200]; double uold[200][200]; double dx; double dy; void error_ch...
GB_binop__max_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...
GB_unop__erf_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...
deconvolution_3x3.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 ...
GB_binop__band_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_binop__lt_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
fusedFDM.c
extern "C" void FUNC(fusedFDM)( const dlong& Nelements, pfloat* __restrict__ Su, const pfloat* __restrict__ S_x, const pfloat* __restrict__ S_y, const pfloat* __restrict__ S_z, const pfloat* __restrict__ inv_L, #if p_restrict const dfloat* __restrict__ wts, #endif pfloat* __restrict__ u ) { #define ...
broadcast_reduce-inl.h
/* * 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 ...
Sarray.c
// SW4 LICENSE // # ---------------------------------------------------------------------- // # SW4 - Seismic Waves, 4th order // # ---------------------------------------------------------------------- // # Copyright (c) 2013, Lawrence Livermore National Security, LLC. // # Produced at the Lawrence Livermore Nationa...
DRB073-doall2-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...
ic0_csc_executor.h
#include <algorithm> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <cmath> using namespace std; extern double sqrt(int); void ic0_csc_executor(int n, double *val, int * colPtr, int *rowIdx, int levels, int *levelPtr, int *levelSet, int chunk){ int li=0; // for (i = 0; i < n - ...
core_cgeadd.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zgeadd.c, normal z -> c, Fri Sep 28 17:38:18 2018 * **/ #include <plasma_core_blas.h> #include "pla...
GB_unop__identity_fp32_uint16.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...
mg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG This benchmark is an OpenMP C version of the NPB MG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
temp.c
#include <omp.h> #include <stdio.h> static long num_steps = 8; double step; #define NUM_THREADS 8 void main () { int i; long long sum = 1.0; omp_set_num_threads(NUM_THREADS); #pragma omp parallel for reduction(*:sum) private(i) for (i=1;i<=num_steps; i++){ int id = omp_get_thread_num(); ...
GB_binop__ne_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
FGP_TV_core.c
/* This work is part of the Core Imaging Library developed by Visual Analytics and Imaging System Group of the Science Technology Facilities Council, STFC Copyright 2017 Daniil Kazantsev Copyright 2017 Srikanth Nagella, Edoardo Pasca Licensed under the Apache License, Version 2.0 (the "License"); you may not use this...
GB_convert_sparse_to_bitmap_template.c
//------------------------------------------------------------------------------ // GB_convert_sparse_to_bitmap_template: convert A from sparse to bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // S...
symv_x_dia_n_lo.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA* A, const ALPHA_Number* x, const ALPHA_N...
matmul_int.c
/* * Square matrix multiplication * A[N][N] * B[N][N] = C[N][N] * */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N 512 //#define N 16 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (do...
wetbulb.c
/* Generated by Cython 0.29.22 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-fopenmp", "-Ofast" ], "extra_link_args": [ "-fopenmp" ], "libraries": [ "m" ], "name"...
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...
convert_espa_to_gtif.c
/***************************************************************************** FILE: convert_espa_to_gtif.c PURPOSE: Contains functions for creating the GeoTIFF products for each of the bands in the XML file. PROJECT: Land Satellites Data System Science Research and Development (LSRD) at the USGS EROS LICENSE TYP...
recursive.c
int counter = 0; int foo() { #pragma omp critical { counter++; if (counter <100) foo(); } } int main() { foo(); return 0; }
ParallelUtils.h
// This code is part of the project "Ligra: A Lightweight Graph Processing // Framework for Shared Memory", presented at Principles and Practice of // Parallel Programming, 2013. // Copyright (c) 2013 Julian Shun and Guy Blelloch // // Permission is hereby granted, free of charge, to any person obtaining a // copy of t...
kernel_wrapper.c
#include <stdio.h> #include <string.h> #include <iostream> #include <omp.h> #include <math.h> #include "./../main.h" void kernel_wrapper( fp* image, // input image int Nr, // IMAGE nbr of rows int Nc, // IMAGE nbr of cols long Ne, ...
quicksort.h
// -*- C++ -*- // Copyright (C) 2007-2017 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...
matrix.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 // //===---------------------------...
GrB_IndexUnaryOp_wait.c
//------------------------------------------------------------------------------ // GrB_IndexUnaryOp_wait: wait for a user-defined GrB_IndexUnaryOp to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved...
thread_scale_tlp.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * See COPYRIGHT in top-level directory. */ #include <stdlib.h> #include <stdio.h> #include <omp.h> #include <assert.h> #include "zmtest_abslock.h" #define TEST_NITER 100000 char cache_lines[640] = {0}; int indices [] = {3,6,1,7,0,2,9,4,8,5}; stati...
timers.h
double start[64], elapsed[64]; //#pragma omp threadprivate (start, elapsed)
idasFoodWeb_kry_omp.c
/* * ----------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2019, Lawrence Livermore National Security * and Southern Methodist Univ...
CFD_assembler_C_omp.c
/* This file is part of redbKIT. * Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL) * Author: Federico Negri <federico.negri@epfl.ch> */ #include "mex.h" #include <stdio.h> #include <math.h> #include "blas.h" #include <string.h> #include "../../Core/Tools.h" #define INVJAC(i,j,k) invjac[i+...
Consumer.c
#include <stdio.h> #include <stdlib.h> int mutex = 1; int full = 0; int empty = 10, x = 0; void producer() { --mutex; ++full; --empty; x++; printf("\nProducer produces " "item %d", x); ++mutex; } void consumer() { --mutex; --full; ++empty; print...
Fig_12.21_ompTwoTarg.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #define N 1024 int main() { float *a, *b, *c, *d; int i; a = (float*) malloc(N * sizeof(float)); b = (float*) malloc(N * sizeof(float)); c = (float*) malloc(N * sizeof(float)); d = (float*) malloc(N * sizeof(float)); // initialize a, b...
parallel_resize_vector.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & Newcastle University for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
core_slange.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zlange.c, normal z -> s, Fri Sep 28 17:38:21 2018 * **/ #include <plasma_core_blas.h> #include "pla...
rose_v1_matrixmultiply.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #define N 1000 #define M 1000 #define K 1000 #include <omp.h> int i; int j; int k; double a[1000][1000]; double b[1000][1000]; double c[1000][1000]; int mmm() { //#pragma omp parallel for private(i,j,k) shared(a,b,c) #pragma omp parallel for private (i,j,k) ...
packet-inl.h
/*! * Copyright (c) 2014 by Contributors * \file packet-inl.h * \brief Generic packet vectorization code */ #ifndef MSHADOW_PACKET_INL_H_ #define MSHADOW_PACKET_INL_H_ #ifdef __APPLE__ #include <stdlib.h> #else #include <malloc.h> #endif #include "./base.h" #include "./tensor.h" #include "./expression.h" namesp...
GB_is_diagonal.c
//------------------------------------------------------------------------------ // GB_is_diagonal: check if A is a diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier...
GB_unaryop__ainv_uint16_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__isne_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
mpi_master_slave.c
#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "mpi.h" #define TOTAL_ARRAYS 10000 #define TOTAL_NUMBERS 100000 #define MAX_NUMBER TOTAL_ARRAYS * TOTAL_NUMBERS #define MASTER 0 #define TAG_DIE TOTAL_ARRAYS + 1 #define NUM_THREADS 8 #define T_NUMBER int #define T_MPI_TYPE M...
val_omp.c
/* This file performs the following test: each OMP thread measures flops for its provided tasks, and compares this to expected flop counts, each thread having been provided with a random amount of work, such that the time and order that they complete their measurements varies. Specifically tested is the case where the ...
RealToBinary.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuch...
gbdt.h
#ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include <LightGBM/prediction_early_stop.h> #include <LightGBM/json11.hpp> #include "score_updater.hpp" #include <cstdio> #include <vector> #include <string> #include <fstream> ...
ompUtils.h
#ifndef OMP_UTILS_H #define OMP_UTILS_H #include "DataflowCFG.h" #include "CFGRewrite.h" #include <string> #include <list> #include <iostream> #include <sstream> #include <boost/regex.hpp> class ompUtils { public: static const int unknown_type = -1; static const int omp_parallel = 0...
Match.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "grb2.h" #include "wgrib2.h" #include "fnlist.h" #ifdef USE_REGEX #include <sys/types.h> #include <regex.h> /* * MATCH package * * requires POSIX-2 * if regcomp and regexec are not available, don't define USE_REGEX in makefile * * Only pr...
irbuilder_for_unsigned.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics #if...
469.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/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
GB_unaryop__ainv_uint8_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
stream_nft.c
/*-----------------------------------------------------------------------*/ /* Program: STREAM */ /* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Programm...
agilekeychain_fmt_plug.c
/* 1Password Agile Keychain cracker patch for JtR. Hacked together during * July of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and ...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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 // //===---------------------------...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
plot.h
#ifndef OPENMC_PLOT_H #define OPENMC_PLOT_H #include <unordered_map> #include <sstream> #include "pugixml.hpp" #include "xtensor/xarray.hpp" #include "hdf5.h" #include "openmc/position.h" #include "openmc/constants.h" #include "openmc/cell.h" #include "openmc/geometry.h" #include "openmc/particle.h" #include "openmc...