source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_binop__first_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
outer_profile.h
#include "CSC.h" #include "CSR.h" #include "Triple.h" #include "radix_sort/radix_sort.hpp" // #include "vergesort/vergesort.h" // #include "pdqsort/pdqsort.h" // #include "cpp-TimSort/include/gfx/timsort.hpp" #include "utility.h" #include <algorithm> #include <iostream> #include <fstream> #include <omp.h> #include <u...
begin_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 #pragma omp begin // expected-error {{expected an OpenMP directive}} #pragma omp end declare...
dynamic_module_load.c
// RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -DSHARED -fPIC -shared -o %t.so && %clang %flags %s -o %t-aarch64-unknown-linux-gnu -ldl && %libomptarget-run-aarch64-unknown-linux-gnu %t.so 2>&1 | %fcheck-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -DSHARED -fPIC -shared -o %...
softmax-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 ...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
npdot.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...
imd_main_risc_3d.c
/****************************************************************************** * * IMD -- The ITAP Molecular Dynamics Program * * Copyright 1996-2011 Institute for Theoretical and Applied Physics, * University of Stuttgart, D-70550 Stuttgart * **************************************************************************...
nbody_parallel.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "timer.h" #include <omp.h> #define DIM 2 /* Two-dimensional system */ #define X 0 /* x-coordinate subscript */ #define Y 1 /* y-coordinate subscript */ const double G = 6.673e-11; typedef double vect_t[DIM]; /* Vector type for...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // The LLVM37 Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-----------------------------------------------------...
XSHA512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2008,2011 by Solar Designer */ #if FMT_EXTERNS_H extern struct fmt_main fmt_XSHA512; #elif FMT_REGISTERS_H john_register_one(&fmt_XSHA512); #else #include "sha2.h" #include "arch.h" #include "params.h" #include "common.h" #include "format...
GB_binop__rminus_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-...
example-omp.c
// PWR015: Avoid copying unnecessary array elements to the GPU // https://www.appentra.com/knowledge/checks/pwr015 void foo() { int A[100], B[100], sum[100]; #pragma omp target map(to: A[0:100], B[0:100]) map(from: sum[0:100]) #pragma omp parallel for for (int i = 0; i < 50; i++) { sum[i] = A[i...
matrix_mul_par_original.c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <omp.h> /* Simple matrix multiplication example. */ /* matrix multiplication */ void matrix_mult(double const * A, double const * B, double * C, int const N, int const M, int const K) { int BS2 = 64; int BS1 = 64; for (int ii = 0; ii < N; ii++)...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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. ...
fill_int2e.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...
imd_deform.c
/****************************************************************************** * * IMD -- The ITAP Molecular Dynamics Program * * Copyright 1996-2007 Institute for Theoretical and Applied Physics, * University of Stuttgart, D-70550 Stuttgart * **************************************************************************...
parallel_section_reduction.c
// Skip testing on 64 bit systems for now! #ifndef __LP64__ #include <stdio.h> #include <math.h> #include "omp_testsuite.h" int check_parallel_section_reduction (FILE * logFile) { int sum = 7; int known_sum; double dpt, dsum = 0; double dknown_sum; double dt = 0.5; /* base of geometric row for + and - test...
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...
comb.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> #include <omp.h> void comb_sort(int *, unsigned long, unsigned int); void imprimir_vetor(int *, unsigned long); void verify(int *, unsigned long); int main(int argc, char *argv[]) { struct timeval timevalA; struct timeval timevalB...
Example_SIMD.2.c
/* * @@name: SIMD.2c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_4.0 */ #include <stdio.h> #pragma omp declare simd uniform(fact) double add1(double a, double b, double fact) { double c; c = a + b + fact; return c; } #pragma omp declare simd uniform(a,b,fact) linear...
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...
SpatialBatchNormalization.c
#include <math.h> #include "../thnets.h" static void nnfree_SpatialBatchNormalization(struct module *mod) { THFloatTensor_free(mod->SpatialBatchNormalization.running_mean); THFloatTensor_free(mod->SpatialBatchNormalization.running_var); THFloatTensor_free(mod->SpatialBatchNormalization.weight); THFloatTens...
test1.c
/* program main implicit none integer :: a = 10 !$omp target data map(tofrom: a) !$omp target map(tofrom: a) a = a + 1 !$omp end target !$omp target update from(a) !$omp end target data a = -15 !$omp target update from(a) print *, a !<-- expect -15; actual 11 end p...
mttkrp_omp.c
/* This file is part of ParTI!. ParTI! 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, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
singlenode_intersectreduce.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
doacross-1.c
extern void abort (void); #define N 256 int a[N], b[N / 16][8][4], c[N / 32][8][8]; volatile int d, e; int main () { int i, j, k, l, m; #pragma omp parallel private (l) { #pragma omp for schedule(static, 1) ordered (1) nowait for (i = 0; i < N; i++) { #pragma omp atomic write a[i] = 1; #pragma ...
GB_unop__identity_int8_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://...
GB_unaryop__lnot_fp32_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...
merge.c
/**********************************************************/ /** * 234Compositor - Image data merging library * * Copyright (c) 2013-2015 Advanced Institute for Computational Science, RIKEN. * All rights reserved. * **/ /**********************************************************/ // @file merge.c // @brief Im...
knn.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 ...
backward_binary_reduce_impl.h
/*! * Copyright (c) 2019 by Contributors * \file kernel/cuda/backward_binary_reduce_impl.h * \brief Minigun CPU UDFs for bacward binary reduce */ #ifndef DGL_KERNEL_CPU_BACKWARD_BINARY_REDUCE_IMPL_H_ #define DGL_KERNEL_CPU_BACKWARD_BINARY_REDUCE_IMPL_H_ #include <minigun/minigun.h> #include "../binary_reduce_imp...
GB_binop__isne_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-...
dim3_sweep.c
/*********************************************************************** * Module: dim3_sweep.c * * This module contains the 2D and 3D mesh sweep logic. ***********************************************************************/ #include "snap.h" // Local variable array macro #define PSI_1D(ANG) psi[ANG] #define PC...
sp_single.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - SP This benchmark is an OpenMP C version of the NPB SP code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
TwoCore.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> int main(int argc, char *argv[]){ omp_set_num_threads(2); #pragma omp parallel { if(omp_get_thread_num()){ system("gcc testFile0.c -o test0"); } else { system("gcc testFile1.c -o test1"); } } ...
GB_binop__rminus_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__first_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
b4v7ld.c
/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /**** OpenMP support ngspice 06/28/2010 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4ld.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. ...
elemwise_binary_op.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 ...
sha256.c
/* * Copyright (c) 2010, Michal Tomlein * All rights reserved. * * 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 the above copyright notice, * this list...
chi_calc.c
//////////////////////////////////////////////////////// // Chi Square Calculation and Trapezoidal Integration // // Matheus J. Castro // // Version 2.3 // // Last Modification: 06/11/2021 (month/day/year) // ///////////////////////////////////...
GB_binop__isge_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-...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
heap_mult_generic.h
#ifndef MASKED_SPGEMM_HEAP_MULT_GENERIC_H #define MASKED_SPGEMM_HEAP_MULT_GENERIC_H #include <algorithm> #include "CSR.h" // TODO: move to a separate file namespace tmp { /** ** Count flop of SpGEMM between A and B in CSR format **/ template<typename IT, typename NT> long long int getFlop(const CSR<IT, NT> &A, co...
mcmc.h
#include <cmath> #include <iostream> #include <iomanip> #include <vector> #include <limits> #include <string> #include <stdexcept> //#include <omp.h> template <typename Observables, typename LikelihoodFunc, typename ReportFunc> void DEMCMC_Priors(Randomizer& R, LikelihoodFunc likelihood, ReportFunc report, int bur...
libsais.c
/*-- This file is a part of libsais, a library for linear time suffix array and burrows wheeler transform construction. Copyright (c) 2021 Ilya Grebnov <ilya.grebnov@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
prior_box_op.h
/* Copyright (c) 2016 PaddlePaddle Authors. 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 applicable law or...
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-...
GB_binop__iseq_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_unaryop__identity_uint32_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...
PhysicalConstants.h
#ifndef included_PhysicalConstants #define included_PhysicalConstants namespace Thermo4PFM { #ifdef HAVE_OPENMP_OFFLOAD #pragma omp declare target #endif const double gas_constant_R_JpKpmol = 8.314472; // J K-1 mol-1 #ifdef HAVE_OPENMP_OFFLOAD #pragma omp end declare target #endif } #endif
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
disk.h
#pragma once class SolidDisk{ public: static PS::S32 n_init; static PS::F64 m_init; static PS::F64 p; //static PS::F64 f_in; //static PS::F64 f_out; static PS::F64 f_dust; static PS::F64 eta_ice; static PS::F64 a_in; static PS::F64 a_out; static PS::F64 a_ice; static PS::...
ztrmm.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
Stencil_par4.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "malloc2D.h" #include "timer.h" int main(int argc, char *argv[]) { struct timespec tstart_cpu, tstop_cpu; double cpu_time; int imax=2002, jmax = 2002; int niter=1000, nburst=100; double** restrict x = malloc2D(jmax, imax); dou...
GB_unop__sqrt_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...
heat-2dp.dtile.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)) /* * Discretized 2D heat equation stencil with non periodic boundary conditions * Adapt...
time.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define Length 1.0 #define Temperature_1 1.0 #define Temperature_2 5.0 int main(int argc, char **argv) { // Время, когда требуется посчитать распределение температуры в стержне double Time = 1.0; // Число разбиений по координате size_t M = 10; ...
machinedeps.c
/* Copyright © INRIA 2009-2014. Authors: Matthijs Douze & Herve Jegou Contact: matthijs.douze@inria.fr herve.jegou@inria.fr This file is part of Yael. Yael 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 Founda...
reconstruction.h
#pragma once #include <cmath> #include <vector> #include <algorithm> #include <iostream> #include "response.h" #include "scanner.h" #include "2d/geometry/pixel_map.h" #if USE_FAST_TEXT_PARSER #include "util/text_parser.h" #endif #if _OPENMP #include <omp.h> #else #define omp_get_max_threads() 1 #define omp_get_thr...
FileParser.h
// // Created by Timm Felden on 04.11.15. // #ifndef SKILL_CPP_COMMON_FILEPARSER_H_H #define SKILL_CPP_COMMON_FILEPARSER_H_H #include "../common.h" #include "../api/SkillFile.h" #include "ParseException.h" #include "../streams/FileInputStream.h" #include "StringPool.h" #include "AbstractStoragePool.h" #include "../re...
canonicalForLoops.c
#ifdef _CIVL #include <civlc.cvh> #endif #include <omp.h> #include <stdio.h> int main (int argc, char * argv[]){ double a[3]; double b[3]; double c[3]; int zero = 0; int three = 3; int one = 1; int i; #pragma omp parallel { #pragma omp for for(i=zero; three > i; i+=one) a[i] = i; } #pragma...
HYPRE_IJMatrix.c
/****************************************************************************** * Copyright (c) 1998 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) ***************************************...
configurator.c
/* Simple tool to create config.h. * Would be much easier with ccan modules, but deliberately standalone. * * Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license. * * c12r_err, c12r_errx functions copied from ccan/err/err.c * Copyright Rusty Russell <rusty@rustcorp.com.au>. CC0 (Public domain) Lice...
UMESimdVecUintPrototype.h
// The MIT License (MIT) // // Copyright (c) 2015-2017 CERN // // Author: Przemyslaw Karpinski // // 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 lim...
shape.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. * *...
GB_binop__isge_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
NLmean_propag1dir_sspacing3_tspacing8_sim12_acc12_neighbor5_tau0100.c
/* * compile: gcc -O3 -std=c99 -o [filename_out] -fopenmp [filename].c -lm -I/usr/include/netcdf-3/ -L/usr/lib64/ -lnetcdf -lnetcdf_c++ * in the terminal: export OMP_NUM_THREADS=3 */ #include<stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <netcdf.h> #include <omp.h> /* This is the name ...
test3.c
int main() { int x; #pragma omp parallel { 0; if (1) { 2; if (3) { x = 0; 4; #pragma omp barrier 5; } else { 6; #pragma omp barrier 7; } 8; } else { 9; if (10) { 11; #pragma omp barrier 12; } else { 13; #pragma omp barrier x; 14; } 15; } ...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "cuda.h" #include <stdio.h> #include <stdlib.h> #include <string.h> pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { char *path; FILE *file = fopen(filename, "r"); if(!file) file_error(filename); list...
jacobiinitialize-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...
FloydsAlgorithm.c
/* Algorithm 11 - Floyd's Algorithm Implement All-Pairs Shortest Paths Problem using Floyd's algorithm. Parallelize this algorithm, implement it using OpenMP and determine the speed-up achieved. */ #include <stdio.h> #include <time.h> #include <omp.h> int total_threads; int minimum(int a, int b); void floydsAlgorith...
dropout-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 ...
explicit_task.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> int main() { int condition=0; omp_set_nested(0); print_frame(0); #pragma omp parallel num_threads(2)...
for_loop.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #include "callback.h" #include <omp.h> int main() { int y[] = {0,1,2,3}; #pragma omp parallel num_threads(2) { //implicit barrier at end of for loop int i; #pragma omp f...
displacement_lagrangemultiplier_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
isotope.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...
boz.c
/* boz.c by Mark Neyrinck */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include "voz.h" #define PRNTHR 1000 #define NPTOTOL 3000 #define NGRID 10 #define PI 3.14159265359 /* #define NSIM 512. */ typedef struct Zone { realT prob; /* Halo probability */ int *p; /* Particles in the central zone */ ...
team.c
/* Copyright (C) 2005-2017 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
FDTCC.c
/*-----------------Fast double-difference cross-correlation (FDTCC)----------- Min Liu & Miao Zhang m.liu@dal.ca & miao.zhang@dal.ca Dalhouise University Nov. 15 2019 # create the dt.cc file from ...
exercice2.c
#include <stdio.h> int main(void){ #pragma omp parallel for for (int i = 0; i < 100; ++i){ #pragma omp critical{ printf("Je suis #%d\n", i); } } return 0; }
GB_binop__div_int8.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__eq_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...
image_random-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 may no...
critical_flet.h
/*++ Copyright (c) 2011 Microsoft Corporation Module Name: critical flet.cpp Abstract: Version of flet using "omp critical" directive. Warning: it uses omp critical section "critical_flet" Author: Leonardo de Moura (leonardo) 2011-05-12 Revision History: --*/ #ifndef _CRITICAL_FLET_H_ #defi...
i3lock-fancy-rapid.c
/* * BSD 3-Clause License * * Copyright (c) 2018-2019, The i3lock-fancy-rapid authors * 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 t...
nr_numint.c
/* Copyright 2014-2020 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 required ...
kruskal.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "kruskal.h" #include <math.h> #include <omp.h> /****************************************************************************** * PRIVA...
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-...
image_random-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 ...
vla-5.c
// { dg-do compile } void foo(int n, int i) { int A[n]; #pragma omp parallel sections lastprivate(A) { A[i] = 1; } }
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__ainv_bool_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...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Wind_dir.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include "grb2.h" #include "wgrib2.h" #include "fnlist.h" /* * Wind dir - U then V in input file * * v 0.1 experimental based on Wind_speed.c * * 3/2009: Public Domain: Wesley Ebisuzaki (wind_speed.c) * 1/2013: Publi...