source
stringlengths
3
92
c
stringlengths
26
2.25M
rose_v1_scalar_output.c
/* * Scalar-to-scalar output dependencies * */ #include <omp.h> int a[100]; // A private case void foo2() { int i; int tmp; #pragma omp parallel for private (tmp,i) for (i = 0; i <= 99; i += 1) { tmp = a[i] + i; } } // A lastprivate case void foo() { int i; int tmp; #pragma omp parallel for ...
time_dgetrf_tile.c
/** * * @generated d Tue Jan 7 11:45:24 2014 * **/ #define _TYPE double #define _PREC double #define _LAMCH LAPACKE_dlamch_work #define _NAME "PLASMA_dgetrf_Tile" /* See Lawn 41 page 120 */ #define _FMULS FMULS_GETRF(M, N) #define _FADDS FADDS_GETRF(M, N) #include "./timing.c" static int RunTest(int *iparam,...
operations.c
//----------------------------------------------------------------------- //Copyright 2019 Centrum Wiskunde & Informatica, Amsterdam // //Author: Daniel M. Pelt //Contact: D.M.Pelt@cwi.nl //Website: http://dmpelt.github.io/msdnet/ //License: MIT // //This file is part of MSDNet, a Python implementation of the //Mixed-S...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
module_bl_mynn_bl_init_driver_impl.h
#ifndef __MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_H__ #define __MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_H__ // File granularity version. #ifndef MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_VERSION_MAJOR #define MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_VERSION_MAJOR 1 #endif #ifndef MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_VERSION_MINOR ...
12_soma_par1.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> void inicializa(unsigned long **v, int size) { (*v) = (unsigned long *) malloc(sizeof(unsigned long)*size); for (int i = 0; i < size; i++) { (*v)[i] = 1; } } int main(int argc, char **argv) { unsigned long *vetor; int size = 1000000; ...
GB_unop__ainv_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
critical.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> main(int argc, char **argv){ int i, n=20, a[n],suma=0,sumalocal; if(argc<2){ fprintf(stderr,"\nFalta iteraciones\n"); exit(-1); } n=atoi(argv[1]); if (n>20) n=20; for(i=0;i<n;i++) a[i]=i; #pragma omp parallel private(sumalocal) {sumalocal=...
decorate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
main.c
#include "common.h" static void print_help(char *argv) { END("%s [-f edge_file] [-W width] [-H height] [-D degree] [-R length] [-o output_file] [-s random_seed]\ [-n calculations] [-w max_temperature] [-c min_temperature] [-g groups] [-C cooling_cycle] [-B] [-d]\ [-F fixed_temperature] [-Y] [-M] [-h]\n", argv); } ...
JeeIOrbitalSoA.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: Ye Luo, y...
ccsd_t.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
hypergeometric_distribution.c
#include <stdio.h> #include <stdlib.h> #include <gmp.h> #define TOLERANCE 0.000000001 #define MALICIOUS_RATE 0.9 void factorial(mpf_t res, int n) { int i; mpf_t p; mpf_init_set_ui(p,1); for (i=1; i <= n ; ++i){ mpf_mul_ui(p,p,i); } mpf_set(res, p); mpf_clear(p); } // Combination: factorial(...
sxc_fmt_plug.c
/* SXC cracker patch for JtR. Hacked together during Summer 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 use in source and b...
mediancut.c
/* ** © 2009-2018 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ #include <stdlib.h> #include <stddef.h> #include "libimagequant.h" #include "pam.h" #include "mediancut.h" #define index_of_cha...
parallel_for_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}} #pragma omp parallel for // expected-error@+1 {{unexpected OpenMP directive '#pragma omp paral...
trmm.pluto_ancc.seq_par.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> double A[N][N+20]; double B[N][N+20]; void init_arrays() { int i,j; for (i=0; i<N; i++) for (j=0; j<N; j++) { B[i][j] = (i+j) % 5 + 1; if (i < j) A[i][j] = (i+j) % 5 + 1; else if (i == j) A[i][j] = 1; else A[i][j...
rk4.c
#include <stdio.h> #include <time.h> #include <stdlib.h> #include <sys/time.h> #define SIZE 9600 struct timeval startTime; struct timeval finishTime; double timeIntervalLength; __sw_global__ double *yt; __sw_global__ double *k1; __sw_global__ double *k2; __sw_global__ double *k3; __sw_global__ dou...
imutil.c
/* ----------------------------------------------------------------------------- * imutil.c * ----------------------------------------------------------------------------- * Copyright (c) 2015-2017 Blaine Rister et al., see LICENSE for details. * ---------------------------------------------------------------------...
GB_binop__bget_int32.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_binop__islt_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-...
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) #...
core_clacpy_band.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_zlacpy_band.c, normal z -> c, Fri Sep 28 17:38:19 2018 * **/ #include <plasma_core_blas.h> #include...
omp_sections.c
/****************************************************************************** * FILE: omp_workshare2.c * DESCRIPTION: * OpenMP Example - Sections Work-sharing - C Version * In this example, the OpenMP SECTION directive is used to assign * different array operations to each thread that executes a SECTION. * AUT...
imginputfileconn.h
/** * DeepDetect * Copyright (c) 2014 Emmanuel Benazera * Author: Emmanuel Benazera <beniz@droidnik.fr> * * This file is part of deepdetect. * * deepdetect is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software F...
SpatialConvolutionLocal.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialConvolutionLocal.c" #else static inline void THNN_(SpatialConvolutionLocal_shapeCheck)( THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kH, int kW, int dH, int dW, int padH, int padW, int64_t inputHeight, i...
matvec_int.c
//matvec.c //Multiplies a matrix by a vector #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 100...
single-modificado-master.c
#include <stdio.h> #include <omp.h> int main() { int n = 9, i, a, b[n]; for (i=0; i<n; i++) b[i] = -1; #pragma omp parallel { #pragma omp single { printf("Dentro de la región parallel:\n"); } #pragma omp single { printf("Introduce valor de inicialización a:"); scanf("%d"...
convolution_3x3_packn_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_unop__isinf_bool_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...
thdat95.c
/* * Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain this list * of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce t...
cpu_rnnt.h
#pragma once #include <tuple> #include <cmath> #include <cstring> #include <limits> #include <algorithm> #include <numeric> #include <chrono> #if !defined(RNNT_DISABLE_OMP) && !defined(APPLE) #include <omp.h> #endif #include "rnnt_helper.h" template<typename ProbT> class CpuRNNT { public: // Noncopyable Cp...
vbHmm_Common.c
/* * vbHmm_Common.c * Common VB-HMM engine. * Reference: * Christopher M. Bishop, "Pattern Recognition and Machine Learning", Springer, 2006 * * Created by OKAMOTO Kenji, SAKO Yasushi and RIKEN * Copyright 2011-2015 * Cellular Informatics Laboratory, Advance Science Institute, RIKEN, Japan. * All ri...
divsufsort.c
/* * divsufsort.c for libdivsufsort-lite * 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 wit...
5125.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...
mixed_tentusscher_myo_epi_2004_S2_9.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_9.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_...
EntityInitializer.h
// Copyright (c) 2004-2022 Tomáš Oberhuber et al. // // This file is part of TNL - Template Numerical Library (https://tnl-project.org/) // // SPDX-License-Identifier: MIT /*** * Authors: * Oberhuber Tomas, tomas.oberhuber@fjfi.cvut.cz * Zabka Vitezslav, zabkav@gmail.com */ #pragma once #include <noa/3rdparty/tn...
abstract_pivot_column.h
/* Copyright 2013 IST Austria Contributed by: Ulrich Bauer, Michael Kerber, Jan Reininghaus This file is part of PHAT. PHAT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, eith...
omp_atomic_exemple.c
// omp_atomic_exemple.c // compile with: /openmp /* ############################################################################# ## DESCRIPTION: Simple exemple using atomic in OpenMP. ## NAME: omp_atomic_exemple.c ## AUTHOR: Lucca Pessoa da Silva Matos ## DATE: 10.04.2020 ## VERSION: 1.0 ## EXEMPLE: ## PS C:\> gc...
test.c
#include <stdlib.h> #include <stdio.h> int main(int argc, char *argv[]) { int dep = 0; #pragma omp target device(0) nowait map(tofrom: dep) depend(out: dep) { dep++; } #pragma omp target device(1) nowait map(tofrom: dep) depend(in: dep) { dep++; } #pragma omp taskwait if (dep == 2) { ...
omp_single_private.c
// RUN: %libomp-compile-and-run // REQUIRES: !(abt && (clang || gcc)) #include <stdio.h> #include "omp_testsuite.h" int myit = 0; #pragma omp threadprivate(myit) int myresult = 0; #pragma omp threadprivate(myresult) int test_omp_single_private() { int nr_threads_in_single; int result; int nr_iterations; int i...
atomic-16.c
// { dg-do run } extern void abort (void); int x = 6, cnt; int foo (void) { return cnt++; } int main () { int v, *p; p = &x; #pragma omp atomic update p[foo (), 0] = 16 + 6 - p[foo (), 0]; #pragma omp atomic read v = x; if (cnt != 2 || v != 16) abort (); #pragma omp atomic capture v = p...
core_dttlqt.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_zttlqt.c, normal z -> d, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
scratch.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> static void fun() { int tid; tid = omp_get_thread_num(); printf("Hi from thread %d\n", tid); } int main (int argc, char *argv[]) { #pragma omp parallel { fun(); } /* All threads join master thread, barrier and disband */ retu...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 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...
ll_load_utils.h
/* * ll_load_utils.h * LLAMA Graph Analytics * * Copyright 2014 * The President and Fellows of Harvard College. * * Copyright 2014 * Oracle Labs. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: ...
apply-kernels.h
#ifndef __ARRAY_APPLY_KERNELS_H__ #define __ARRAY_APPLY_KERNELS_H__ #include <type_traits> #include <omp.h> #include "../../../macros/macros.h" #include "../../../meta/meta.h" #include "../../../types/types.h" namespace __core__ { namespace __functional__ { namespace __apply__ { namespace __array__ { namespace __pr...
2DConvolution.c
/** * 2DConvolution.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@st...
pastix.c
/* CalculiX - A 3-dimensional finite element program */ /*Copyright (C) 1998-2021 Guido Dhondt*/ /* This program 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(version 2);*/ /**/ /* This program is di...
BaseFunc.h
bool IsPolarized(double &Polarization) { if (Polarization==-1.){return false;} else {return true;} } void PolarizationTerm(uint ThetaLength, double * ThetaPtr, double * CosTerm, double * SinTerm, bool & Polarized) { if (P...
GB_unop__identity_fp64_int32.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__acos_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...
norm2Many.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 t...
debug_test_system.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
nn_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
1.c
// Contributed by Jeremy Zerfas // This controls the initial size used for the hash tables. This needs to be a power of two because a mask is also // calculated from this by using INITIAL_HASH_TABLE_SIZE-1. #define INITIAL_HASH_TABLE_SIZE 16 // This controls the maximum length for each set of oligonucleotide frequenc...
GB_binop__pow_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2017. AL...
threadpool.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include <string> #include <vector> #include <functional> #include <memory> #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #else #pragma warning(push) #pr...
thread_thread_threadid.c
// RUN: %libomp-compile-and-run // REQUIRES: abt #include "omp_testsuite.h" #include <string.h> #include <stdio.h> int test_thread_thread_threadid(int num_threads) { int i, vals[num_threads]; memset(vals, 0, sizeof(int) * num_threads); omp_set_max_active_levels(2); #pragma omp parallel for num_threads(num_thr...
SSE41search.c
#include "SSE41search.h" // CPU search using SSE instrucions and Score Profile technique void search_sse41_sp (char * query_sequences, unsigned short int * query_sequences_lengths, unsigned long int query_sequences_count, unsigned int * query_disp, char * vect_sequences_db, unsigned short int * vect_sequences_db_len...
residualbased_linear_strategy.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_RESIDUA...
Searching.202006191549.nested_parallel.h
// // Created by Zhen Peng on 6/19/2020. // #ifndef BATCH_SEARCHING_SEARCHING_H #define BATCH_SEARCHING_SEARCHING_H #include <vector> #include <boost/dynamic_bitset.hpp> //#include <boost/sort/sort.hpp> #include <iostream> #include <fstream> #include <unordered_map> #include <immintrin.h> #include <cstring> #include ...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ompfor10.c
#include <math.h> void main(int n, int m, float *a, float *b, float *y, float *z) { int i; int j; #pragma omp parallel { #pragma omp for nowait linear(i,j) collapse(456) ordered(i) for (i=1; i<n; i++) b[i] = (a[i] + a[i-1]) / 2.0; #pragma omp for nowait ordered schedule ( monotonic : runt...
HW2.c
/* * Write a serial program to check if a given number is prime or not. * Report the required time. * * Convert it to a OpenMP code. */ #include <stdio.h> #include <omp.h> #include <time.h> int main(int argc,char *argv[]) { clock_t start,stop; long int n,i; char flag='y'; start=clock(); sscanf(argv[1],"%...
jac_solv_simd.c
/* ** PROGRAM: jacobi Solver ** ** PURPOSE: This program will explore use of a jacobi iterative ** method to solve a system of linear equations (Ax= b). ** ** Here is the basic idea behind the method. Rewrite ** the matrix A as a Lower Triangular (L), upper triangular ** ...
GB_ijsort.c
//------------------------------------------------------------------------------ // GB_ijsort: sort an index array I and remove duplicates //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Id...
declare_reduction_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -emit-llvm %s -triple %itanium_abi_triple -o - -femit-all-decls -disable-llvm-passes | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple -emit-pch -o %t %s -femit-all-decls -disable-llvm-passes // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple ...
reduction_array2.h
// ============================================================================= // == reduction_array2.h // == -------------------------------------------------------------------------- // == A reduction array class that can be used with OpenMP. Current OpenMP // == software only allows the reduction of an array i...
uccsd_t.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
Example_tasking.8.c
/* * @@name: tasking.8c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_3.0 */ int tp; #pragma omp threadprivate(tp) int var; void work() { #pragma omp parallel { /* do work here */ #pragma omp task { tp++; /* do work here */ #pragma omp...
QuEST_cpu.c
// Distributed under MIT licence. See https://github.com/QuEST-Kit/QuEST/blob/master/LICENCE.txt for details /** @file * The core of the CPU backend functionality. The CPU/MPI implementations of the pure state functions in * ../QuEST_ops_pure.h are in QuEST_cpu_local.c and QuEST_cpu_distributed.c which mostly wrap ...
ProgressBar.h
/** * Copyright (c) 2021 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include "saiga/config.h" #include "saiga/core/math/imath.h" #include "saiga/core/time/all.h" #include "saiga/core/util/Thread/SpinLock.h" #include "saiga/core/util/Thread/threadName.h...
deconvolution_packnto1_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
kmp_atomic_cas.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdbool.h> #include <omp.h> // Used to detect architecture #include "../../src/kmp_platform.h" #ifdef __cplusplus extern "C" { #endif typedef void* ident_t; extern bool __kmpc_atomic_bool_1_cas(ident_t *loc, int gtid, char *x, char e, char d); extern bool...
exact_rhs-brisbane.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB SP code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
kondoimpti.h
/* Copyright (c) 2011, Florian Goth All rights reserved. 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 c...
GB_binop__bshift_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
x_solve.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...
hw_1.c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <omp.h> #define PI 3.141592653589793 #define FLOAT double #define BETA 1.0 void initialize(FLOAT *x, FLOAT *v, int N); FLOAT F(FLOAT x, FLOAT x_before, FLOAT x_after); FLOAT energy(FLOAT *x, FLOAT *v, int m, int k); int main(int argc, char **argv){ ...
relic_core.c
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (C) 2007-2017 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute...
cg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - CG This benchmark is an OpenMP C version of the NPB CG code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS. ...
sapG_fmt_plug.c
/* * this is a SAP PASSCODE (CODEVN G) plugin for john the ripper. * tested on linux/x86 only, rest is up to you.. at least, someone did the reversing :-) * * please note: this code is in a "works for me"-state, feel free to modify/speed up/clean/whatever it... * * (c) x7d8 sap loverz, public domain, btw * cheer...
mp.c
#include <stdio.h> #define Const(x,y,z) x##y##z #define float Const(un,sign,ed) float x, s[1], a[1], e[1], d[1]; float A(float a, float b){return a&b?A(a^b,(a&b)<<1):a^b;} float P(float a, float b){return a?P(a/10,'-')+putchar(a%10+48)-48:0;} float G(float a, float b){for(;b;b^=a^=b^=a%=b);return !--a;} float F(float ...
GB_binop__bxnor_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...
line_search_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
lu2lib.c
// // lu2lib.c // // J. Makino // Time-stamp: <2019-05-06 22:08:30 makino> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <timerlib.h> #ifndef NOBLAS #ifdef MKL #include <mkl_cblas.h> #else #include <cblas.h> #endif #endif #ifdef USEGDR #include "gdrdgemm.h" #endif #define FTYPE double #include <...
ROF_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")...
matrix_op-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 ...
omp_parsec.c
#include <omp.h> #include <stdio.h> int main(int argc, char *argv[]) { const size_t N = 20; int i; float a[N], b[N], c[N], d[N]; #pragma omp parallel { #pragma omp for for (i = 0; i < N; ++i) { a[i] = i; b[i] = N - i; } } #pragma omp parallel shar...
a.30.1.c
/* { dg-do compile } */ void a30 (int n, float *a, float *b) { int i; #pragma omp parallel { #pragma omp for lastprivate(i) for (i = 0; i < n - 1; i++) a[i] = b[i] + b[i + 1]; } a[i] = b[i]; /* i == n-1 here */ }
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
RendererDeferred.h
#pragma once #include "pc.h" #include "RendererBase.h" class RendererDeferred: public RendererBase { private: // Defaults struct { union { float4 black_void1[4]; const float black_void2[4] = { 0.f, 0.f, 0.f, 0.f }; }; union { float4 white_snow1[4]; ...
full_buffer_variabe_size.c
#include "correctness-checking-partitioned-impl.h" #include "mpi.h" #include <stdio.h> #include <stdlib.h> #define TOTAL_SIZE 4000 #define ITERATIONS 10 #define TAG 42 //buffer: // RECV SEND LOCAL SEND RECV // TOTAL_SIZE must be at least 4 times STENCIL_SIZE void debug_function(long a, long b) { printf(" %ld,%ld\n...
main.c
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <time.h> #include <omp.h> #include <assert.h> #define N 10000// max number of elements #define NDEBUG #ifndef NDEBUG #define DEBUG(cmd) cmd; #else #define DEBUG(cmd) ; #endif int read_from_file(char* filename, i...
GB_emult_phase0.c
//------------------------------------------------------------------------------ // GB_emult_phase0: find vectors of C to compute for C=A.*B or C<M>=A.*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // h...
deflation_utils.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !...
convolution_omp.c
// // convolution.c // // Base code created by Josep Lluis Lerida on 11/03/15. // Base code updated by Vitor da Silva on 17/04/2021 // // Created by Josep Lluis Lerida on 11/03/15. // Updated by Vitor da Silva on 17/04/2021 // OMP solution implemented by Albert Pérez & Francesc Contreras 17/05/2021 // // This progra...