source
stringlengths
3
92
c
stringlengths
26
2.25M
sw_tstile.h
void sw_tstile(){ printf("- tstile [16] -\n\n"); int c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c11,c10,c12,c13,c14,c15; #pragma omp parallel for for( c1 = 0; c1 <= (N - 1)/16; c1 += 1) for( c3 = 0; c3 <= (N - 1) / 16; c3 += 1) for( c5 = 16 * c1 + 1; c5 <= min(N, 16 * c1 + 16); c5 += 1) for( c7 = 16 * c3 + 1; c7 <= m...
omp_ex_13.c
#include <stdio.h> #include <omp.h> /* MIT License Copyright (c) 2019 NOUREDDINE DAGHBOUDJ 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 ri...
mixed_tentusscher_myo_epi_2004_S1_7.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S1_7.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_...
ast-dump-openmp-teams-distribute-parallel-for.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 target #pragma omp teams distribute parallel for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp targ...
GB_unop__identity_fp64_bool.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...
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) ...
mapping.c
#define _MODULE_MAPPING #define USE_PREFETCH #include <omp.h> #ifdef USE_PREFETCH #include <xmmintrin.h> #endif #include <limits.h> #include "mapping.h" #include "output.h" #include "../common/sw-full-common.h" #include "../common/sw-full-cs.h" #include "../common/sw-full-ls.h" #include "../common/sw-vector.h" #incl...
NLmean_propag1dir_sspacing6_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 ...
matmult.c
#include <stdio.h> #include <stdlib.h> #include "matmult_initialize.h" int provided; #include <mpi.h> #ifndef MATRIX_SIZE #define MATRIX_SIZE 512 #endif #define NRA MATRIX_SIZE /* number of rows in matrix A */ #define NCA MATRIX_SIZE /* number of columns in matrix A */ #define NCB MA...
lstm_fwd.c
#include <libxsmm.h> #if defined(__linux__) # include <sys/syscall.h> # define gettid() syscall(SYS_gettid) #else # define gettid() libxsmm_get_tid() #endif #if defined(LIBXSMM_OFFLOAD_TARGET) # pragma offload_attribute(push,target(LIBXSMM_OFFLOAD_TARGET)) #endif #include <stdlib.h> #include <string.h> #include <stdi...
hd_joint_probability_generator_inl.h
/* * * Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology) * 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 ...
856.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])...
critical-2.c
// { dg-do run } // Test several constructs within a parallel. At one point in development, // the critical directive clobbered the shared clause of the parallel. #include <omp.h> #include <stdlib.h> #define N 2000 int main() { int A[N]; int nthreads; int i; #pragma omp parallel shared (A, nthreads) ...
parallel_for.h
/*! * Copyright (c) 2021 by Contributors * \file runtime/container.h * \brief Defines the container object data structures. */ #ifndef DGL_RUNTIME_PARALLEL_FOR_H_ #define DGL_RUNTIME_PARALLEL_FOR_H_ #include <dmlc/omp.h> #include <algorithm> #include <string> #include <cstdlib> #include <exception> #include <vect...
opencl_office2013_fmt_plug.c
/* MS Office 2013 cracker patch for JtR. Hacked together during March of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com> * * This OpenCL format by magnum. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * and Copyright (c) 2012, magnum and it is hereby released to the general ...
@mropes.nim.c
/* Generated by Nim Compiler v1.0.11 */ /* (c) 2019 Andreas Rumpf */ /* The generated code is subject to the original license. */ #define NIM_INTBITS 64 #include "nimbase.h" #include <string.h> #include <stdio.h> #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef li...
nvector_openmp.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Carol S. Woodward @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen,...
shuffle.h
//===- shuffle.h - OpenMP variants of the shuffle idiom for all targets -*-===// // // 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 // //===---------------------------...
detach_nested_task.c
// RUN: %libomp-compile-and-run // Checked gcc 10.1 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10 // gcc 11 introduced detach clause, but gomp interface in libomp has no support // XFAIL: gcc-11, gcc-12 // clang supports detach clause since ver...
mixed_tentusscher_myo_epi_2004_Test.c
#include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_Test.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_equations = NEQ; } SET_ODE_INITIAL_CONDITIONS_CPU(set_model_initial_conditions_cpu) { ...
move_shallow_water_particle_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // ...
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 ...
GB_unaryop__minv_int16_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GrB_Semiring_wait.c
//------------------------------------------------------------------------------ // GrB_Semiring_wait: wait for a user-defined GrB_Semiring to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPD...
distance.h
#pragma once #include <utils.h> #include <limits.h> #ifdef _WINDOWS #include <immintrin.h> #include <smmintrin.h> #include <tmmintrin.h> #include <intrin.h> #else #include <immintrin.h> #endif #include <cosine_similarity.h> #include <iostream> namespace { static inline __m128 _mm_mulhi_epi8(__m128i X) { __m128...
serial_tree_learner.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/dataset.h> #include <Ligh...
mergerhist.c
/* Program to extract the stellar merger history from gadget files created with trace.c gcc -std=c99 -lm -o ~/bin/altix/mergerhist mergerhist.c -lgad-altix KdTree.o -lgsl -lgslcblas stan: gcc -std=c99 -lm -o ~/bin/mergerhist mergerhist.c -lgad-stan -lgsl -lgslcblas stan/KdTree.o gcc -std=c99 -lm -o ~/bin/mergerhist ...
optimizer.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...
tutorial_region_prof.c
/* * Copyright (c) 2015 - 2022, Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ #include <stdlib.h> #include <stdio.h> #include <time.h> #include <math.h> #include <stdint.h> #include <mpi.h> #ifdef _OPENMP #include <omp.h> #endif #include <geopm_prof.h> #include <geopm_hint.h> #include "tutorial_regi...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
vecadd_opt2.c
#include <stdio.h> #include <omp.h> #include "timer.h" // large enough to force into main memory #define ARRAY_SIZE 80000000 static double a[ARRAY_SIZE], b[ARRAY_SIZE], c[ARRAY_SIZE]; void vector_add(double *c, double *a, double *b, int n); int main(int argc, char *argv[]){ #pragma omp parallel if (omp_get_...
simd5.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ /* { dg-additional-options "-std=c99" { target c } } */ void baz (void) __attribute__((noreturn)); void foo (int x) { if (x) #pragma omp simd for (int i = 0; i < 10; i++) baz (); #pragma omp simd collapse(3) for (int i = 0; i < 10; i++) for (...
nco_rgr.c
/* $Header$ */ /* Purpose: NCO regridding utilities */ /* Copyright (C) 2015--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO under the terms of the 3-Clause BSD License with exceptions described in the LICENSE file */ #inc...
test0.c
int main() { l: int k; #pragma omp parallel { int i; } }
TBBHashmap.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
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) >...
ex3-parallel.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> char* read_file(char *filename, long* filesize); int count_number_spaces(char* string, long stringsize); int main(){ long filesize; int nspaces; char *filename = "example.in"; char *file_content = read_file(filename, &filesize); nspaces = cou...
CacheEfficientHogwildTrainer.h
/* * Copyright 2016 [See AUTHORS file for list of authors] * * 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 require...
GB_binop__isne_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-...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
target_data_at_exit.c
// RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -fopenmp-version=51 // RUN: %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 \ // RUN: | %fcheck-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -fopenmp-version=51 // RUN: %libomptarget-run-powerpc64-ibm-linux-gnu 2>&1 \ // RUN: |...
ColorSpaceUtils.h
#ifndef CAPTURE3_COLOR_SPACE_UTILS_H #define CAPTURE3_COLOR_SPACE_UTILS_H #include <cmath> #include <vector> #include <omp.h> namespace Capture3 { static void RGBtoXYZ(const double *rgb, double *xyz, const unsigned int area, const bool gammaCorrected = false) { // More info: // http://www.bruc...
4072a54d2953f99fb67934015fc5b77d143901c9.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double section0; } ; int padfunc(struct dataobj *restri...
search-vector_gpu.c
/* This program searche a values in unordered vector and returns if find or not This program create a csv file with the time execution results for each function(CPU,GPU) in this format: size of vector,cpu time,gpu time. Author: Kezia Andrade Date: 04-07-2015 version 1.0 Run: folder_ipma...
taskwait-depend.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // taskwait with depend clause was introduced with gcc-9 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 // clang does not yet support taskwait with depend clause // clang-12 introduced parsing, but no codegen // update expected result...
GB_binop__plus_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
LAGraph_BF_full1.c
//------------------------------------------------------------------------------ // LAGraph_BF_full1.c: Bellman-Ford single-source shortest paths, returns tree, // while diagonal of input matrix A needs not to be explicit 0 //------------------------------------------------------------------------------ // LAGraph, (c...
statistic.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
yolov2_forward_network.c
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h // softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h #define GEMMCONV /* // from: box.h typedef struct { float x, y, w, h; } box; ...
SVGD.h
#ifndef E78F_SVGD_H #define E78F_SVGD_H #pragma once #include <algorithm> #include <utility> #include <vector> /* Copyright 2020 David Millard <dmillard10@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softwar...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ARM_NLMS.h
/* ============================================================================== ARM_NLMS.h Created: 13 Sep 2019 12:13:21pm Author: michu ============================================================================== */ #pragma once #include <stdio.h> #include <string.h> #include <chrono> //#inclu...
pomelo_fmt_plug.c
/* * POMELO cracker patch for JtR. Hacked together during the Hash Runner 2015 * contest by Dhiru Kholia. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_pomelo; #elif FMT_REGISTERS_H john_register_one(&fmt_pomelo); #else #include <string.h> #include <assert.h> #include <errno.h> #include "arch.h" #include "misc.h...
Krylov_5d.h
#ifndef BFM_KRY5D_H #define BFM_KRY5D_H #include "Krylov.h" #include <cstdlib> #include <string> #include <cmath> #include <iostream> #include <sstream> #include <stdexcept> #include <fstream> #include <complex> namespace BFM_Krylov{ template <class S> class Krylov_5d : public Krylov<S> { public: Krylov_5d(bf...
config.h
/* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define to 1 if translation of program messages to the user's native language is requested. */ /*...
GxB_BinaryOp_ytype.c
//------------------------------------------------------------------------------ // GxB_BinaryOp_ytype: return the type of y for z=f(x,y) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Iden...
race64.c
#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "getopt.h" #define GROUPS_PER_LINE 19 // 1 group = 3 octets, 4 base64 digits #define LINES_PER_BLOCK (1 << 14) // tweaked experimentally #define PROGRAM_NAME "race64" #if __clang__ # define UNROLL _Pragma("unroll...
FeatureFinderAlgorithmPicked.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
replace-value-regex-across-runs.c
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm -o - %s | \ // RUN: FileCheck %s // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm -o - %s | \ // RUN: FileCheck %s void foo(void) { #pragma omp target ; }
painter-cic.c
#include <mpi.h> #include <math.h> #include <fastpm/libfastpm.h> #include "pmpfft.h" /* paint and read out */ static double cic_readout_tuned(FastPMPainter * painter, FastPMFloat * canvas, double pos[3], int diffdir); static void cic_paint_tuned(FastPMPainter * painter, FastPMFloat * canvas, double pos[3], double we...
par_csr_matrix.c
/****************************************************************************** * Copyright 1998-2019 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) **************************************...
GB_concat_sparse_template.c
//------------------------------------------------------------------------------ // GB_concat_sparse_template: concatenate a tile into a sparse matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_binop__isgt_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-...
dropout_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...
HGEMM_gen.h
#include <iostream> #include <math.h> #include <float.h> #include <assert.h> #include <string.h> #include <stdio.h> #include <stdint.h> #include <cholUtils.h> #ifndef HALIDE_ATTRIBUTE_ALIGN #ifdef _MSC_VER #define HALIDE_ATTRIBUTE_ALIGN(x) __declspec(align(x)) #else #define HALIDE_ATTRIBUTE_ALIGN(x) __attri...
schedule.c
#include <stdio.h> #include <stdlib.h> #include <Windows.h> #ifdef _OPENMP #include <omp.h> #define TRUE 1 #define FALSE 0 #else #define omp_get_thread_num() 0 #endif int main() { int i, j, n = 9; #ifdef _OPENMP (void) omp_set_dynamic(FALSE); if (omp_get_dynamic()) {printf("Advertencia: se ha hecho...
2intersect.h
/* SPDX-License-Identifier: MIT * * 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, copy, * modify, merge, publish, ...
main.c
/* Copyright 2017 James Fong 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 of conditions and the following disclaimer. 2. Redistribut...
talesf.c
/* Copyright (c) 2011-2012, Daniel S. Standage <daniel.standage@gmail.com> and Erin Doyle <edoyle@iastate.edu> with modifications by Nick Booher <njbooher@gmail.com>. See README for license details. */ // System libraries #include <getopt.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <zlib.h> #in...
total.h
#pragma once #include <gms/common/types.h> #include <cassert> namespace GMS::TriangleCount::Par { template<class SGraph> size_t count_total(const SGraph &graph) { size_t n = graph.num_nodes(); size_t total = 0; #pragma omp parallel for schedule(static, 17) reduction(+:total) for (NodeId u = 0; u < n; ++u...
residual_criteria.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_RESIDUAL_C...
tree-vect-stmts.c
/* Statement Analysis and Transformation for Vectorization Copyright (C) 2003-2020 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.com> and Ira Rosen <irar@il.ibm.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GN...
serialized.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #include "callback.h" int main() { // print_frame(0); #pragma omp parallel num_threads(1) { // print_frame(1); print_ids(0); print_ids(1); // print_frame(0); #pragma omp parallel num_threa...
reduction.c
/* 1. A local copy of reduction variable is made and initialized depending on the op(e.g. 0 for +). 2. Compiler finds standard reduction expressions containing op and uses them to update the local copy. 3. Local copies are reduced into a single value and combined with the original global value. */ #include <stdio.h>...
GB_unop__identity_int8_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...
GB_binop__isle_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-...
c-tree.h
/* Definitions for C parsing and type checking. Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at yo...
pr46032.c
/* { dg-do compile } */ /* { dg-require-effective-target fopenmp } */ /* { dg-require-effective-target vect_int } */ /* { dg-additional-options "-fopenmp -fipa-pta" } */ extern void abort (void); #define nEvents 1000 static void __attribute__((noinline, noclone, optimize("-fno-tree-vectorize"))) init (unsigned *resu...
pr24455.c
/* { dg-do run } */ /* { dg-additional-sources pr24455-1.c } */ /* { dg-require-effective-target tls_runtime } */ extern void abort (void); extern int i; #pragma omp threadprivate(i) int main() { i = 0; #pragma omp parallel default(none) num_threads(10) { i++; #pragma omp barrier if (i != 1) abor...
hmacSHA1_fmt_plug.c
/* * This software is Copyright (c) 2012, 2013 magnum, and it is hereby released * to the general public under the following terms: Redistribution and use in * source and binary forms, with or without modification, are permitted. * * Originally based on hmac-md5 by Bartavelle */ #if FMT_EXTERNS_H extern struct ...
money_fmt_plug.c
/* * JtR format to crack password protected MS Money files. * * This software is Copyright (c) 2017, Dhiru Kholia <kholia at kth.se> and it * is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted. ...
3d7pt_var.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 with variable coefficients * Adapted from PLUTO and Po...
kmp_stats.h
#ifndef KMP_STATS_H #define KMP_STATS_H /** @file kmp_stats.h * Functions for collecting statistics. */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license...
TriangleMesh.h
#ifndef TRIANGLE_MESH_INCLUDED #define TRIANGLE_MESH_INCLUDED template< class Real > void XForm( std::vector< Point3D< Real > >& vertices , const SquareMatrix< Real , 3 >& xForm , int threads=1 ); template< class Real > void XForm( std::vector< Point3D< Real > >& vertices , const SquareMatrix< Real , 4 >& xForm , int ...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
openbsdsoftraid_fmt_plug.c
/* * Copyright (c) 2014 Thiébaud Weksteen <thiebaud at weksteen dot fr> * * 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; either version 2 of the License, or * (at your option) any later v...
arrays.c
/** * module with tools for manipulating arrays * Julien Lesgourgues, 18.04.2010 */ #include "arrays.h" /** * Called by thermodynamics_init(); perturb_sources(). */ int array_derive( double * array, int n_columns, int n_lines, int index_x, /** from 0 to (n_columns-1) */ int index_y, int index...
openmp.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #ifdef _OPENARC_ #include <openacc.h> #endif #ifndef _N_ #define _N_ 10000000; #endif int main() { int N = _N_; int *A, *B, *C; int i,j,k, is_sync; A = (int *)malloc(N*sizeof(int)); B = (int *)malloc(N*sizeof(int)); for(i=0; i<N; i++) { A[i] = i; B[...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
papiomptest.c
#include <stdio.h> #include <stdlib.h> /* atoi,exit */ #include <unistd.h> /* getopt */ #include <string.h> /* memset */ #ifdef THREADED_OMP #include <omp.h> #endif #include "../gptl.h" double add (int, double); double multiply (int, int, double); double multadd (int, double); double divide (int, double); double c...
linalg.c
/* Copyright 2015. The Regents of the University of California. * Copyright 2016-2019. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2012-2019 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2013 Dar...
hypre_smp_forloop.h
/*BHEADER********************************************************************** * (c) 1998 The Regents of the University of California * * See the file COPYRIGHT_and_DISCLAIMER for a complete copyright * notice, contact person, and disclaimer. * * $Revision: 21217 $ ********************************************...
blas_l1_kernel.c
/******************************************************************************* * Copyright 2019 UChicago Argonne, LLC. * (c.f. AUTHORS, LICENSE) * * This file is part of the AML project. * For more info, see https://github.com/anlsys/aml * * SPDX-License-Identifier: BSD-3-Clause ******************************...
utility.h
/* ************************************************************************ * Copyright 2016-2022 Advanced Micro Devices, Inc. * ************************************************************************ */ #pragma once #include "hipblas.h" #include <stdbool.h> #ifdef __cplusplus #include "cblas_interface.h" #includ...
droplet_impact_coupled.c
/* droplet_impact_coupled.c A 2D droplet falling towards an elastic membrane lying along the boundary at y = 0. The solution for the membrane is given as a function of pressure by the routines defined in wave-equation.h, and its velocity is fed back into Basilisk by altering the boundary condition. ...
common.h
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h> #include <cstdio> #include <string> #include <vector> #include <sstream> #include <cstdint> #include <algorithm> #include <cmath> #include <functional> #include <memory>...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
hello-world.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid; /* Fork a team of threads giving them their own copies of variables */ #pragma omp parallel { /* Obtain thread number */ tid = omp_get_thread_num(); printf("Hello World from thread = %d...
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....