source
stringlengths
3
92
c
stringlengths
26
2.25M
solver-omp.c
#define lowerb(id, p, n) ( id * (n/p) + (id < (n%p) ? id : n%p) ) #define numElem(id, p, n) ( (n/p) + (id < (n%p)) ) #define upperb(id, p, n) ( lowerb(id, p, n) + numElem(id, p, n) - 1 ) #define min(a, b) ( (a < b) ? a : b ) #define max(a, b) ( (a > b) ? a : b ) #include "omp.h" // Function to copy one matrix into a...
star2d4r.c
#define BENCH_DIM 2 #define BENCH_FPP 33 #define BENCH_RAD 4 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize] = (SB_TYPE (*)[dimsize][dimsize])A1; ...
GB_binop__max_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-...
Interp1PrimThirdOrderMUSCLChar.c
/*! @file Interp1PrimThirdOrderMUSCLChar.c @author Debojyoti Ghosh @brief Characteristic-based 3rd-order MUSCL scheme with Koren's limiter */ #include <stdio.h> #include <stdlib.h> #include <basic.h> #include <arrayfunctions.h> #include <mathfunctions.h> #include <interpolation.h> #include <mpivars.h> #include...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
kmeans.c
/** @file kmeans.c ** @brief K-means - Declaration ** @author Andrea Vedaldi, David Novotny **/ /* Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. Copyright (C) 2013 Andrea Vedaldi and David Novotny. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the...
fftw.c
/*----------------------------------------------------------------*/ #include "hclfftw.h" #include <omp.h> /*----------------------------------------------------------------*/ int fftw1d( const int sign, const int m, const int n, fftw_complex* X, fftw_complex* Y ) { /* * 'm' number of 1D row FF...
OnDiscMSExperiment.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
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, You c...
b05c988_so12.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include <stdio.h> #include "omp.h" #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; in...
clauses-4.c
int t; #pragma omp threadprivate (t) void foo (int y, short z) { int x; #pragma omp target teams map (from: x) #pragma omp distribute simd linear (x : 2) for (x = 0; x < 64; x += 2) ; #pragma omp target teams map (from: x) #pragma omp distribute parallel for simd linear (x) for (x = 0; x < 64; x++) ...
main.c
#include <omp.h> #include <math.h> #include <stdio.h> #include <stdlib.h> const double pi = 3.14159265358979323846; void array_show(int *a, int numTicks) { for (int i = 0; i <= numTicks; ++i) { for (int j = 0; j <= numTicks; ++j) printf("%6d ", a[i*(numTicks+1) + j]); printf("\n"); } } /* c...
9246.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...
parallelizer.h
// (C) Copyright Renaud Detry 2007-2015. // Distributed under the GNU General Public License and under the // BSD 3-Clause License (See accompanying file LICENSE.txt). /** @file */ #ifndef NUKLEI_PARALLELIZER_H #define NUKLEI_PARALLELIZER_H #include <nuklei/Random.h> #include <nuklei/Common.h> #include <nuklei/Boo...
3d25pt.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-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
lu-decomposition_gpu.c
/* This program makes the decomposition of matrices. It receives an input array and returns two triangular matrices in the same array b. This program create a csv file with the time execution results for each function(CPU,GPU) in this format: size of matrix, cpu time, gpu time. Author: Gleison So...
Dense.c
#include <cdnn/model.h> #include <cdnn/Dense.h> extern __Model__ * m; void init_params(){ Dense_layer * layer = m->current_layer->DENSE; int weight_dims[2]; if(m->current_layer->prev_layer->type!=INPUT){ weight_dims[0] = layer->num_of_computation_nodes; weight_dims[1] = m->current_layer->prev_layer-...
conv.c
/******************************************************************************* * Copyright 2017-2018 Intel Corporation * * 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.apa...
ZQ_FaceDatabase.h
#ifndef _ZQ_FACE_DATABASE_H_ #define _ZQ_FACE_DATABASE_H_ #pragma once #include <vector> #include <string> #include "ZQ_FaceFeature.h" #include "ZQ_FaceRecognizerSphereFace.h" #include "ZQ_MathBase.h" #include "ZQ_MergeSort.h" #include <omp.h> namespace ZQ { class ZQ_FaceDatabase { public: class Person { publ...
SpVec.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
energy.h
#pragma once #include "core.h" #include "geometry.h" #include "space.h" #include "potentials.h" #include "multipole.h" #include "penalty.h" #include "mpi.h" #include <Eigen/Dense> #include <set> #ifdef ENABLE_POWERSASA #include <power_sasa.h> #endif namespace Faunus { namespace Energy { class Energybase...
interaction.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* 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 abo...
y_solve.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
pngquant.c
/* pngquant.c - quantize the colors in an alphamap down to a specified number ** ** © 2009-2019 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997-2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ char *PNGQUANT_USAGE = "\ usage: pngquant [options] [ncol...
main.c
#include<stdio.h> #include<stdlib.h> #include "gdal.h" #include<omp.h> #include "fillin.h" #define MAXFILES 7000 //For MODIS NDVI //#define TBC 10000 //#define BBC -2000 //NODATA, Top and Bottom Boundary conditions #define NODATA -28768 //For MODIS LST //#define TBC 20000 //#define BBC 5000 //NODATA, Top and Bottom ...
ast-dump-openmp-taskloop.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 taskloop for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp taskloop for (int i = 0; i < x; i++) f...
convolution_sgemm.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // //...
lud_omp.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void lud_omp_cpu(float *a, int size) { int i, j, k; float sum; for (i = 0; i < size; i++) { for (j = i; j < size; j++) { sum = a[i * size + j]; for (k = 0; k < i; k++) sum -= a[i * size + k] * a[k * size + j]; a[i * size + j...
target_x86.h
/***************************************************************************** * * target_x86.h * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * * (c) 2018-2019 The University of Edinburgh * * Contributing authors: * Alan Gray (alang@epcc.ed.ac.uk) * ...
displacement_lagrangemultiplier_mixed_frictional_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
declare_variant_messages.c
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s // expected-error@+1 {{expected an OpenMP directive}} #pragma omp declare int foo(void); #p...
openmp_utils.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #ifndef KRATOS_OPENMP_UTILS_H...
ocp_nlp_common.c
/* * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl * * This file is part o...
ops.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
residualbased_predictorcorrector_velocity_bossak_scheme_turbulent.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #if !defined(KRATOS_RESIDUALBAS...
diagmm_x_bsr_n_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include <memory.h> #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number ...
NAL.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use,...
GB_binop__isle_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...
sectionsModificado.c
/* $ gcc -fopenmp -O2 src/sectionsModificado.c -o bin/sectionsModificado $ export OMP_NUM_THREADS=4 $ ./bin/sections En funcB: esta sección la ejecuta el thread 3 En funcA: esta sección la ejecuta el thread 2 */ #include <stdio.h> #include <omp.h> void funcA() { printf("En funcA: esta sección la ejecuta el thre...
ast-dump-openmp-single.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() { #pragma omp single ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-singl...
equipartition.h
// equipartition.h - Class implementing an algorithm for evenly partitioning a 1D space // // Copyright (C) 2020- ECMWF. // // This software is licensed under the terms of the Apache Licence Version 2.0 // which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. // // In applying this licence, ECMWF does no...
GB_binop__eq_uint64.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_unop__signum_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...
redetect.c
// RUN: %libomp-compile // RUN: env KMP_AFFINITY=none %libomp-run // REQUIRES: linux // Check if forked child process resets affinity properly by restricting // child's affinity to a subset of the parent and then checking it after // a parallel region #define _GNU_SOURCE #include "libomp_test_affinity.h" #include <om...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <rabit/rabit.h> #include <cstring> #include <memory> #include <numeric> #include <al...
scheduled_clauseModificado5.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num()0 #endif main(int argc, char **argv){ int i,n=200,chunk,a[n],dinamico,hebras,suma=0; if(argc<5){ fprintf(stderr,"\nFalta iteraciones o chunk\n <iteraciones> <chunk> <valor de dyn-var> <numero de threads>...
time_multi_omp.c
////////////////////////////////////////////////////////////////////////////////////// // 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: Jeremy Mc...
DOMINOSEC_fmt_plug.c
/* * DOMINOSEC_fmt.c (version 3) * * Notes/Domino More Secure Internet Password module for Solar Designer's JtR * by regenrecht at o2.pl, Dec 2005. * Algorithm discovery by regenrecht at o2.pl, bartavelle at bandecon.com. * * Short description. * 1. Make 128bit digest of key. (128/8=16 bytes) * 2. Do bin2hex()...
omp_task_red_taskloop.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> int r; int work(int k, int l) { return k + l + 1; } void bar(int i) { #pragma omp taskgroup task_reduction(+:r) { int th_gen = omp_get_thread_num(); #pragma omp task in_reduction(+:r) firstprivate(i, th_gen) { r += work(i, 0); printf("e...
GB_AxB_dot2_template.c
//------------------------------------------------------------------------------ // GB_AxB_dot2_template: C=A'B, C<!M>=A'*B, or C<M>=A'*B via dot products //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. //...
trsm_c_sky_n_hi_col_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_...
perftest.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #...
fft_params.h
// Copyright (c) 2020 - present Advanced Micro Devices, Inc. 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 limitation the r...
opencl_blockchain_fmt_plug.c
/* blockchain "My Wallet" cracker patch for JtR. Hacked together during June of * 2013 by Dhiru Kholia <dhiru at openwall.com>. * * See https://blockchain.info/wallet/wallet-format * This software is Copyright (c) 2012 Lukas Odzioba <ukasz at openwall.net> * and Copyright (c) 2013 Dhiru Kholia <dhiru at openwall....
GB_binop__le_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-...
office_fmt_plug.c
/* Office 2007 cracker patch for JtR. Hacked together during March of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com> */ #if FMT_EXTERNS_H extern struct fmt_main fmt_office; #elif FMT_REGISTERS_H john_register_one(&fmt_office); #else #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #...
attack_mp.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <math.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <gsl/gsl_blas.h> #include <omp.h> #include "util.h" int main(int argc, char *argv[]) { char* input_fileName1 = argv[1]; ...
activation.h
// Copyright 2018 Xiaomi, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
rose_circuit_OpenMP.c
#include <omp.h> # include <stdlib.h> # include <stdio.h> # include <time.h> int main(int argc,char *argv[]); int circuit_value(int n,int bvec[]); void i4_to_bvec(int i4,int n,int bvec[]); void timestamp(); /******************************************************************************/ int main(int argc,char *argv[]...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB090-static-local-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...
GB_unop__signum_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...
primes.c
#include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> #include <offload.h> const int a = 1; const int b = 3000000; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec + (double)t.tv_usec * 1E-6; } /* * is_prime_number: Returns 1 if n is a prime numbe...
ast-dump-openmp-taskloop-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 taskloop simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp taskloop simd for (int i = 0; i < x; ...
smg_setup_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
setround_sse4.c
#include "mex.h" #include <float.h> #include <omp.h> #pragma STDC FENV_ACCESS ON void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { int rnd, err, n, i; unsigned int control_word; rnd = mxGetScalar(prhs[0]); n=omp_get_max_threads(); //printf("%d\n",n)...
GB_binop__max_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
kmp_csupport.c
/* * kmp_csupport.c -- kfront linkage support for OpenMP. */ //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE....
GB_unop__lgamma_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
GB_unop__identity_uint32_int8.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...
2866.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...
GB_unaryop__identity_int8_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRACC_OMP_005_Counter_no_lock_Inter_yes.c
/* Concurrent access on a counter with no lock. Atomicity Violation. Data Race in line 14. Inter Region. */ #include <stdio.h> #define N 100000 int countervar = 0; int count(){ #pragma omp target map(tofrom:countervar) device(0) #pragma omp teams distribute for (int i=0; i<N; i++){ counte...
io.c
/****************************************************************************** * * * IO.C * * * ...
NumOptAlgoRangeRandom.h
#ifndef K_MATH_OPT_NUMOPTALGORANGERANDOM_H #define K_MATH_OPT_NUMOPTALGORANGERANDOM_H #include "NumOptAlgo.h" #include "NumOptDataVector.h" #include "../statistics/Statistics.h" #include <vector> #include <random> #include <functional> #include "../distribution/Normal.h" #include "../../Assertions.h" namespace K ...
DRB109-orderedmissing-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...
frontier.h
// // Created by xehoth on 2021/11/5. // #ifndef FRONTIER_H_ #define FRONTIER_H_ #include <memory_manager.h> #include <cstdint> #include <memory> #include <prefix_sum.h> struct Frontier { Frontier(std::uint32_t maxCapacity) : d(MemoryManager::get().alloc<std::uint32_t>(maxCapacity)), n() {} inline bool empt...
templatemath.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * Copyright (c) 2019 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apa...
reorder.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "reorder.h" #include "sptensor.h" #include "ftensor.h" #include "io.h" #include "sort.h" #include "timer.h" #include "...
GB_binop__islt_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...
MzMLHandler.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
problem.p4.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
GB_unaryop__identity_uint32_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRB111-linearmissing-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...
rose_Stress-1.c
//#include <float.h> //#include <math.h> #define MIN(a, b) ( (a < b) ? a : b) #define MAX(a, b) ( (a > b) ? a : b) #include <omp.h> typedef double real8; void StressCheckEpsFail(real8 *newSxx,real8 *newSyy,real8 *newSzz,real8 *newTxy,real8 *newTxz,real8 *newTyz,real8 *eps,real8 eps_failure_model,const int *zoneset,in...
test_utils.h
/* * Copyright (c) 2019, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
GB_unaryop__minv_uint64_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__pow_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...
integrate_sin_omp.c
/* --- File integrate_sin_omp.c --- */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> int main(int argc, char **argv) { struct timespec ts_start, ts_end; float time_total; int steps = 1e7; double delta = M_PI/steps; double total = 0.0; int i; printf("Using %.0e step...
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 // //===---------------------------...
mypaint-tiled-surface.c
/* brushlib - The MyPaint Brush Library * Copyright (C) 2007-2014 Martin Renold <martinxyz@gmx.ch> et. al. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in al...
map_reduce.c
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <omp.h> //#define DEBUG #define DTYPE int typedef DTYPE (*map_func_t)(DTYPE); typedef DTYPE (*reduce_func_t)(DTYPE, DTYPE); void print(const DTYPE *in, const int len) { assert(in && len>0); for(int idx=0; idx<len; ++idx) { printf...
StVenantKirchhoffMaterial.c
/* This file is part of redbKIT. * Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL) * Author: Federico Negri <federico.negri@epfl.ch> */ #include "StVenantKirchhoffMaterial.h" /*************************************************************************/ void StVenantKirchhoffMaterial_forces(...
main.c
#include <stdio.h> #include <omp.h> #define ROW_MAX_VALUE 10 #define COLUMN_MAX_VALUE 10 int main () { int i, j; int totalNumberThreads, threadID; int actualRow, actualColumn, sum; int a[ROW_MAX_VALUE], c[ROW_MAX_VALUE], b[COLUMN_MAX_VALUE][ROW_MAX_VALUE]; actualColumn = ...
parallel_extrapolation_utilities.h
// // Project Name: Kratos // Last Modified by: $Author: pooyan $ // Date: $Date: 2006-11-27 16:07:33 $ // Revision: $Revision: 1.1.1.1 $ // // #if !defined(KRATOS_PARALLEL_EXTRAPOLATION_UTILITIES_H_INCLUDED ) #define KRATOS_PARALLEL_EXTRAPOLATION_UTILITIES_H_INCLUDED /...
GB_unop__identity_uint32_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pi-v5.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
GB_sparse_emult_template.c
//------------------------------------------------------------------------------ // GB_sparse_emult_template: C=A.*B, C<M or !M>=A.*B when C is sparse/hyper //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. /...
mixed_tentusscher_myo_epi_2004_S2_4.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_4.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_...