source
stringlengths
3
92
c
stringlengths
26
2.25M
omp.c
#ifdef _OPENMP #include <omp.h> #else #error "This compiler does not understand OPENMP" #endif #include <stdlib.h> #include <stdio.h> volatile double a = 0.1, b = 1.1, c = 2.1; void Thread(int n) { int i; printf("OpenMP Thread %d: %d iterations\n",n-1,n*1000000); for (i=0;i<n*100000;i++) a += b * c; } int ...
dctz-comp-lib.c
/** * @file dctz-comp-lib.c * @author Seung Woo Son * @date July 2019 * @brief DCTZ compression library routine * (C) 2019 University of Massachuetts Lowell. See LICENSE in top-level directory. */ #include <stdlib.h> #include <memory.h> #include <string.h> #ifdef TIME_DEBUG #include <sys/time.h> #endif /* ...
GB_binop__first_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
mandel-omp-taskgroup.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
GB_unop__identity_bool_int64.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...
SpatialAdaptiveMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialAdaptiveMaxPooling.c" #else static void nn_(SpatialAdaptiveMaxPooling_updateOutput_frame)(real *input_p,real *output_p, real *indx_p, real *indy_p, ...
fc_kernel_int8_arm.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...
OMPIRBuilder.h
//===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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 // //===---------------------------...
mallocImagen.c
#include <stdio.h> #include <stdlib.h> #include "omp.h" #define NUM_THREADS 100 int main() { FILE *image, *outputImage, *lecturas; image = fopen("sample.bmp","rb"); //Imagen original a transformar outputImage = fopen("img2_dd.bmp","wb"); //Imagen transformada unsigned char r, g, b, pixel; ...
main.c
#include <stdio.h> #include <omp.h> int main(int argc, char **argv) { // Fork a team of threads giving them their own copies of variables // Argumentos para omp parallel: // private(A) -> leva ao escopo da Thread uma cópia da variável A sem o valor // firstprivate(B) -> leva ao escopo da Thread uma cópia da variá...
health.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
nanort.h
// // NanoRT, single header only modern ray tracing kernel. // /* The MIT License (MIT) Copyright (c) 2015 - 2016 Light Transport Entertainment, Inc. 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 Softw...
GB_unop__identity_fc64_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...
pi_series_par.c
#include <stdlib.h> #include <omp.h> double pi_series(long num_terms, long num_threads) { double sum = 0.0; // Set number of threads to launch omp_set_num_threads(num_threads); #pragma omp parallel for reduction(+: sum) for (long n = 0; n < num_terms; n++) { sum += ((4.0 - 8*(n & 1)) / (2*n + 1)); } retur...
main.c
//====================================================================================================100 // UPDATE //====================================================================================================100 // 2006.03 Rob Janiczek // --creation of prototype version // 2006.03 Drew Gill...
pt_to_pt_pingping.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
detector.c
#include "darknet.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; void train_detector(char *datacfg, cha...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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 // //===---------------------------...
prop_container.h
// -*- mode:c++; c-basic-offset:4 -*- #ifndef PROP_CONTAINER_H_KL3 #define PROP_CONTAINER_H_KL3 #include <vector> #include <string> #include <util/gjp.h> #include <util/verbose.h> #include <alg/qpropw.h> #include <omp.h> #include <cassert> #include "my_util.h" // Propagators from all time slices (including the case ...
GxB_Matrix_Option_get.c
//------------------------------------------------------------------------------ // GxB_Matrix_Option_get: get an option in a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifie...
optQCC.c
#include <mex.h> #include <math.h> #include <stdlib.h> #include <time.h> #include <string.h> /* q_c.singleton = optQCMFC(condQB,prediction,Sigma_c,mu_c,c_c,mu_a_b,numColumnsPred,numColumnsShape,columnsPredShapeVec,columnsPredShapeFactorVec); * */ int min(int A, int B) { if (A < B) { return A; } else { return B...
memory-operations-1.c
#include <assert.h> #define C 55 int i, j, k; static void test_bzero (unsigned size) { unsigned bsize = size * sizeof (int); int *x = __builtin_malloc (bsize); __builtin_memset (x, C, bsize); #pragma omp target map(tofrom: x[:size]) map(from: bsize) { __builtin_bzero (x, bsize); } char *buffer = (c...
queue.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...
GB_unaryop__identity_int64_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
omp_for_ordered.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" static int last_i = 0; /* Utility function to check that i is increasing monotonically with each call */ static int check_i_islarger (int i) { int islarger; islarger = (i > last_i); last_i = i; return (islarger)...
kmeans.c
/* ** © 2011-2016 by Kornel Lesiński. ** See COPYRIGHT file for license. */ #include "libimagequant.h" #include "pam.h" #include "kmeans.h" #include "nearest.h" #include <stdlib.h> #include <string.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_max_threads() 1 #define omp_get_thread_num() 0 #endif /* * K-...
GB_unop__exp2_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...
rt_dasum.c
#include "runtime.h" void RT_CORE_dasum(Quark *quark, Quark_Task_Flags *task_flags, PLASMA_enum storev, PLASMA_enum uplo, int M, int N, const double *A, int lda, int szeA, double *work, int szeW) { plasma_context_t *plasma; plasma = plasma_context_...
GB_unaryop__ainv_int16_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ZQ_BinaryImageProcessing.h
#ifndef _ZQ_BINARY_IMAGE_PROCESSING_H_ #define _ZQ_BINARY_IMAGE_PROCESSING_H_ #pragma once #include <string.h> #include <stdlib.h> #include <vector> #ifdef ZQLIB_USE_OPENMP #include <omp.h> #endif namespace ZQ { class ZQ_BinaryImageProcessing { public: static bool Dilate(const bool* input, bool* output, int width...
csr.c
#include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include "csr.h" #include "matrix_market.h" void free_csr_matrix(csr_matrix_t csr) { free(csr.row_ptr); free(csr.column_indices); free(csr.values); } void print_csr_matrix(csr_matrix_t csr, int num_rows, int num_nonzeros) { ...
mtSpGEMM.h
#ifndef _mtSpGEMM_h #define _mtSpGEMM_h #include "../CombBLAS.h" template <typename T> T* prefixsum(T* in, int size, int nthreads) { std::vector<T> tsum(nthreads+1); tsum[0] = 0; T* out = new T[size+1]; out[0] = 0; T* psum = &out[1]; #pragma omp parallel { int ithread = omp_get_t...
mv_functions.h
#ifndef __MV_FUN_H #define __MV_FUN_H /** * @file mv_functions.h * @brief * @author Oleg Borschuk * @date 2009-09-10 */ namespace blue_sky { template <class vector_v1_t, class vector_v2_t> inline typename vector_v1_t::value_type mv_vector_inner_product (const vector_v1_t &v1, const vector_v2_t &v2, int /* obsole...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
hypre_hopscotch_hash.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Jongsoo Park et al. CODE-LLNL-738-322. * This file is part of AMG. See files README and COPYRIGHT ...
sum_double.c
//sum.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 120000 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix and a vec...
convolutiondepthwise_3x3_pack8_fp16s.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 copy ...
mandelbrot.c
/** * Mandelbrot implementation for accelerators (e.g. GPUs) */ #include "utils/lodepng.h" #include "utils/palette.h" #include <omp.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // Default width and height for image if not given static const int WIDTH = 1280; static const int HEI...
bli_trsm_simd_ref.c
/* BLIS An object-based framework for developing high-performance BLAS-like libraries. Copyright (C) 2014, The University of Texas at Austin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redist...
math_array.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // 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. // // See the LICENSE file distrib...
task_types_serialized.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> __attribute__ ((noinline)) // workaround for bug in icc void print_task_type(int id) { #pragma omp critical { int task_type; char buffer[2048]; ompt_get_task_info(0, &task_type, NULL, NULL, NULL, NU...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
quadramp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *quadramp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *quadramp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyArr...
pmm-OpenMP.c
#include <stdlib.h> #include <stdio.h> #include<time.h> #define PRINT_ALL //#define VECTOR_GLOBAL #define VECTOR_DYNAMIC #ifdef VECTOR_GLOBAL #define MAX 32768 //=2^10 double m1[MAX][MAX], m2[MAX][MAX], r[MAX][MAX]; #endif int main(int argc,char** argv){ if (argc<2){ printf("Faltan nº componentes del vector ...
GB_binop__land_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
duplex.c
/* * compute the duplex structure of two RNA strands, * allowing only inter-strand base pairs. * see cofold() for computing hybrid structures without * restriction. * * Ivo Hofacker * Vienna RNA package */ #if...
move_particle_utility.h
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___ // / __/ _ \| \| \ \ / /__| \_ _| __| __| // | (_| (_) | .` |\ V /___| |) | || _|| _| // \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pablo Beck...
multiway_merge.h
/*************************************************************************** * include/stxxl/bits/parallel/multiway_merge.h * * Implementation of sequential and parallel multiway merge. * Extracted from MCSTL - http://algo2.iti.uni-karlsruhe.de/singler/mcstl/ * * Part of the STXXL. See http://stxxl.sourceforg...
GB_unop__identity_uint16_uint32.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...
duplex.c
/* Last changed Time-stamp: <2007-08-26 11:59:45 ivo> */ /* compute the duplex structure of two RNA strands, allowing only inter-strand base pairs. see cofold() for computing hybrid structures without restriction. Ivo Hofacke...
GB_binop__pair_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...
DRB078-taskdep2-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...
FEMHF_All_Electron.c
/********************************************************************** FEM_All_Electron.c: FEM_All_Electron.c is a subroutine to perform the self-consistent calculation, using a finite element basis, of an atomic Kohn-Sham equation including all electron.s Log of FEM_All_Electron.c: 10/Dec/2007 ...
blake2bp.c
/* * Copyright (c) 2015-2018 Nexenta Systems, inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional informat...
updater_basemaker-inl.h
/*! * Copyright 2014-2022 by XGBoost Contributors * \file updater_basemaker-inl.h * \brief implement a common tree constructor * \author Tianqi Chen */ #ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #include <rabit/rabit.h> #include <vector> #include <algorithm> #inc...
pooling_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 ...
DRACC_OMP_053_Counter_working_reduction_no.c
/* Counter incrementation with the reduction clause. Intra Region. */ #include <stdio.h> #define N 100000 int countervar = 0; int count(){ #pragma omp target map(tofrom:countervar) device(0) #pragma omp teams distribute parallel for reduction(+:countervar) for (int i=0; i<N; i++){ counter...
text_parser.h
/*! * Copyright (c) 2015 by Contributors * \file text_parser.h * \brief iterator parser to parse text format * \author Tianqi Chen */ #ifndef DMLC_DATA_TEXT_PARSER_H_ #define DMLC_DATA_TEXT_PARSER_H_ #include <dmlc/data.h> #include <dmlc/omp.h> #include <vector> #include <cstring> #include <algorithm> #include "...
trmv_x_bsr_u_hi_trans.c
#include "alphasparse/kernel.h" #ifdef _OPENMP #include<omp.h> #endif #include"alphasparse/opt.h" #include<string.h> #include <stdio.h> #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, con...
GB_apply_op.c
//------------------------------------------------------------------------------ // GB_apply_op: typecast and apply a unary operator to an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://sui...
matrix.c
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <math.h> #ifdef _OPENMP #include <omp.h> #else #warning No OpenMP support available! double omp_get_wtime() { return 0.0; } #endif int main(int argc, char* argv[]) { int n = (argc>1 ? atoi(argv[1]) : 400); double * A = malloc(n*n*sizeof(doub...
mixed_tentusscher_myo_epi_2004_S1_6.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S1_6.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_...
msxchem.c
/******************************************************************************* ** MODULE: MSXCHEM.C ** PROJECT: EPANET-MSX ** DESCRIPTION: Water quality chemistry functions. ** COPYRIGHT: Copyright (C) 2006 Feng Shang, Lewis Rossman, and James Uber. ** All Rights Reserved. See l...
GB_subassign_15.c
//------------------------------------------------------------------------------ // GB_subassign_15: C(I,J)<!M> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
GB_binop__land_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
MD5_fmt.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2008,2010-2012,2017 by Solar Designer * * ...with changes in the jumbo patch, by bartavelle and magnum. * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUT...
volumeramprecision.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2013-2019 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
GB_unop__cosh_fp32_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...
hsm2ld.c
/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2014 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 8 REVISION : 0 ) FILE : hsm2ld.c Date : 2014.6.5 released by Hiroshima Uni...
spmd2-broken.c
/* spmd2.c * ... illustrates the SPMD pattern in OpenMP, * using the commandline arguments * to control the number of threads. * * Joel Adams, Calvin College, November 2009. * * Usage: ./spmd2 [numThreads] * * Exercise: * - Compile & run with no commandline args * - Rerun with different commandline args */ #include ...
residual_based_adjoint_bossak_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #if !defined(KRATOS_RESID...
GB_unop__sinh_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...
omp_false_sharing.c
#include <stdio.h> #include <omp.h> #define NUM_THREADS 4 #define ITER_LOOP 400000000 int cnt_sheep[NUM_THREADS]; int count_sheep(int); int main() { int i; #ifdef _OPENMP omp_set_num_threads(NUM_THREADS); #endif //#pragma omp parallel for for (i = 0; i < NUM_THREADS; i++) { count_sheep(i); } return 0; } int...
mg_single_adaptive_thrifty.c
/* * Liao 5/17/2013 * Separated the top level parallel region into smaller regions so we can control how many threads to be used at each level * */ /*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - MG This benchmark is an OpenMP C version o...
GB_unop__log2_fc32_fc32.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_unaryop__ainv_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...
update_ops_multi.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif /** * perform multi_qubit_Pauli_gate with XZ mask. * * This function assumes bit_flip_mask is not 0, i.e., at least one bit is flipped. If no bit is...
fenceIssue.c
extern int omp_get_thread_num(); extern int printf(char *[], ...); int main () { int X = 0; int Y = 0; #pragma omp parallel num_threads(2) { if (omp_get_thread_num() == 0) { X = 42; #pragma omp atomic write Y = 1; } else { int t1; while (1) { #pragma omp atomic read t1 = Y; if (t1) { bre...
csr5_spmv_avx2.h
#ifndef CSR5_SPMV_AVX2_H #define CSR5_SPMV_AVX2_H #include "common_avx2.h" #include "utils_avx2.h" template<typename iT, typename vT> inline void partition_fast_track(const vT *d_value_partition, const vT *d_x, const iT *d...
pyfr_gemm_rm.c
/****************************************************************************** ** Copyright (c) 2016-2018, Intel Corporation ** ** All rights reserved. ** ** ** ...
GB_binop__second_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
dynwave.c
//----------------------------------------------------------------------------- // dynwave.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/20/14 (5.1.001) // 03/28/14 (5.1.002) // 09/15/14 (5.1.007) // 03/19/15 (5.1.008) // 08/01/16 (5.1.011...
openmp_frequency.c
/* compile: gcc -fopenmp -Wall -std=c99 openmp_frequency.c -lrt -lm -O3 -o * openmp_frequency */ /* usage ./openmp_frequency [y|n|p] [no of tests] [work factor per test] */ /* performs busywork many times, prints how long iterations take */ /* with y, uses OpenMP */ /* with p, uses pthreads + pthread_barrier_wait() */...
GB_binop__land_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
ppc64le-varargs-f128.c
// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm \ // RUN: -target-cpu pwr9 -target-feature +float128 -mabi=ieeelongdouble \ // RUN: -o - %s | FileCheck %s -check-prefix=IEEE // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm \ // RUN: -target-cpu pwr9 -target-feature +float128...
threadprivate.c
#include <omp.h> #include <stdio.h> int alpha[10], beta[10], i; #pragma omp threadprivate(alpha) int main () { /* First parallel region */ #pragma omp parallel private(i,beta) for (i=0; i < 10; i++) alpha[i] = beta[i] = i; /* Second parallel region */ #pragma omp parallel printf("alpha[3]= %d an...
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...
GB_binop__bget_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...
tutorial_region.c
/* * Copyright (c) 2015 - 2021, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of condition...
common.h
#ifndef SPLITSPECTRUM_COMMON_H #define SPLITSPECTRUM_COMMON_H #include <time.h> #include <sys/time.h> #include <omp.h> double getWallTime() { struct timeval time; if (gettimeofday(&time,NULL)) { // Handle error return 0; } return (double)time.tv_sec + (double)time.tv_usec * .0000...
convolution_3x3_pack4.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 ...
CALPHADFreeEnergyFunctionsBinaryThreePhase.h
#ifndef included_CALPHADFreeEnergyFunctionsBinaryThreePhase #define included_CALPHADFreeEnergyFunctionsBinaryThreePhase #include "CALPHADSpeciesPhaseGibbsEnergy.h" #include "InterpolationType.h" #include "Phases.h" #include "datatypes.h" #include "functions.h" #include <boost/property_tree/ptree.hpp> #include <casse...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__islt_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
vla-4.c
// { dg-do compile } void foo(int n, int i) { int A[n]; #pragma omp parallel firstprivate(A) { A[i] = 1; } }
convolution_3x3_pack1to4_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 ...
union_find.h
#pragma once #include <unordered_map> inline void atomic_add(int *ptr, int add_val) { int64_t old_val; int64_t new_val; do { old_val = *ptr; new_val = old_val + add_val; } while (!__sync_bool_compare_and_swap(ptr, old_val, new_val)); } struct UnionFind { int *parent; explicit...
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...
serialized.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN #include "callback.h" #include <omp.h> #include <math.h> int main() { omp_set_nested(0); print_frame(0); #pragma omp parallel num_threads(2) {...