source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unaryop__minv_int8_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_binop__first_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...
108403fb_so8.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size;...
ejemplo_01.c
/* EJERCICIO 1 * Ejemplo 1 * Usando la API(OpenMP) hacer un programa que realice lo siguiente: * - Crear la Matriz A de 50 columnas x 50 filas (50x50), inicializada con valores aleatorios. [✔] */ // Librerias #include <omp.h> #include <stdio.h> #include <stdlib....
GMS_simd_memops.h
#ifndef __GMS_SIMD_MEMOPS_H__ #define __GMS_SIMD_MEMOPS_H__ namespace file_info { const unsigned int gGMS_SIMD_MEMOPS_MAJOR = 1U; const unsigned int gGMS_SIMD_MEMOPS_MINOR = 1U; const unsigned int gGMS_SIMD_MEMOPS_MICRO = 0U; const unsigned int gGMS_SIMD_MEMOPS_FULLVER = 1000U*gGMS_SIMD_MEMOPS...
PGraph.h
// SPDX-License-Identifier: BSD-2-Clause #ifndef _PGRAPH_H_ #define _PGRAPH_H_ #include <stdlib.h> #include <stdint.h> #include <string.h> #include <math.h> #include <HostLink.h> #include <config.h> #include <POLite.h> #include <POLite/Seq.h> #include <POLite/Graph.h> #include <POLite/Placer.h> #include <POLite/Bitmap...
sub_model_part_skin_detection_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #if !defined(...
c-parser.c
/* Parser for C and Objective-C. Copyright (C) 1987-2018 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat influenced by and fragments based on the C++ parser. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the ter...
ddm_matrix_assembly.c
// // Created by bergolho on 25/07/19. // #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <time.h> #include "../alg/grid/grid.h" #include "../config/assembly_matrix_config.h" #include "../monodomain/constants.h" #include "../utils/utils.h" #include "../single_file_libraries/stb_ds.h" #include "...
PoW.c
/* Copyright 2016-2018 The Ulord Core Foundation */ #include "PoW.h" #include <stdio.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include <assert.h> // #include <omp.h> #include "my_time.h" #include "common.h" #include "my_rand48_r.h" #include "oneWayFunction.h" // #define SSE_VE...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
vect-outer-simd-3.c
/* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-O3 -fopenmp-simd -ffast-math" } */ #include <stdlib.h> #include "tree-vect.h" #define N 64 float *px, *py; float *tx, *ty; float *x1, *z1, *t1, *t2; int bound[N]; static void inline bar(const float cx, float cy, ...
GB_binop__second_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...
GB_split_sparse.c
//------------------------------------------------------------------------------ // GB_split_sparse: split a sparse/hypersparse matrix into tiles //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Lic...
hello-omp.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 private(nthreads, tid) { /* Obtain thread number */ tid = omp_get_thread_num(); printf("Hello World from threa...
positions.c
#include "globals.h" void Make_Positions() { printf ( "Sampling positions ...\n" ); fflush ( stdout ); //! @todo do 2D properly in here and peanowalk, too #ifdef PEANO_SAMPLING const uint64_t countCoords = peanoCurveLength(); const uint64_t cellSize = peanoCellSize(); const double halfCellSize...
p6.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> #define ISIZE 1000 #define JSIZE 1000 int main(int argc, char **argv) { double *a = new double[ISIZE*JSIZE]; double *A = new double[ISIZE*JSIZE]; FILE *ff; int nth = 1; if (argc == 2) nth = atoi(argv[1]); ...
mclib.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <glob.h> #include <unistd.h> #include <dirent.h> #include "hdf5.h" #include <math.h> #include <time.h> #include <gsl/gsl_math.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <gsl/gsl_blas.h> #include <gsl/gsl_vect...
operator_tune-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 ...
sum_double_avx2.c
//sum.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 120000 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix and a vec...
mpi_vector.h
#pragma once #include <cassert> #include <thrust/host_vector.h> #include <thrust/gather.h> #include "exceptions.h" #include "exblas/mpi_accumulate.h" #include "tensor_traits.h" #include "blas1_dispatch_shared.h" #include "mpi_communicator.h" #include "memory.h" #include "config.h" //TODO: should we catch the cases wh...
ofmo-oneint-core.c
/** * @file ofmo-oneint-core.c * 1つのCSペアに対する1電子積分を計算する関数群 * */ /** * @defgroup core-oneint 1電子積分を行う関数群 * * 1つのCSペアに対する1電子積分を計算する関数群。 * 2011/06/16現在は、(s,s)から(d,d)までの積分を行える * ようになっている。 * この関数は粒度が小さいので、CとFortranで共通のAPIにするため、 * すべての引数が参照渡しになっている。 * * 各種積分を行う関数 \c oneint_core_xx_ はすべて同じ * 引数をとる。その引数の説明を記す。 * ...
c-tree.h
/* Definitions for C parsing and type checking. Copyright (C) 1987-2021 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...
cv_basic.h
// Copyright (c) 2019 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...
core_zttmlq.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <omp.h> /********************...
libperf_int.h
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2016. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #ifndef LIBPERF_INT_H_ #define LIBPERF_INT_H_ #include <tools/p...
CT_IMPL.c
/* * _CT_IMPL_C_ * * Copyright (C) 2017-2019 Tactical Computing Laboratories, LLC * All Rights Reserved * contact@tactcomplabs.com * * See LICENSE in the top level directory for licensing details */ #include <omp.h> #include <stdint.h> /* OpenMP Benchmark Implementations * * Benchmark implementations are i...
GB_unop__ainv_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
DCSCTile.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
rawSHA256_ng_fmt_plug.c
/* * Copyright 2013, epixoip. * AVX2 support, Copyright (c) 2015 magnum * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that redistribution of source * retains the above copyright. */ #include "arch.h" #if SIMD_COEF_32 && ARCH_LITTLE_ENDIAN==1 #if F...
file.c
#include <stdio.h> int main(){ #pragma omp parallel { printf("hello openmp!\n"); } return 0; }
collapse-3.c
/* { dg-do run } */ /* { dg-options "-O2 -std=gnu99" } */ #include <string.h> #include <stdlib.h> int main (void) { int i2, l = 0; int a[3][3][3]; memset (a, '\0', sizeof (a)); #pragma omp parallel for collapse(4 - 1) schedule(static, 4) for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) for ...
clang-313307.c
#include <stdio.h> #include <omp.h> #define SIMPLE_SPMD 0 int main(){ int nthreads_a[3]; int a1_a[4]; #pragma omp target parallel map(tofrom: a1_a, nthreads_a) { a1_a[0] = 1; nthreads_a[0] = 4; } printf("hello %d %d\n", a1_a[0], nthreads_a[0]); if (a1_a[0] != 1 || nthreads_a[0] != 4) return 1...
convolution_1x1_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
taskdep_if0.c
// RUN: %libomp-compile-and-run // REQUIRES: !abt #include <stdio.h> #include <stdlib.h> #include <omp.h> #include "omp_my_sleep.h" int a = 0; void task1() { my_sleep(0.5); a = 10; } void task2() { a++; } int main(int argc, char** argv) { #pragma omp parallel shared(argc) num_threads(2) { #pragma omp...
test2.c
#pragma wave trace(enable) int a[100][100]; void foo() { int i,j; int hypre__nx,hypre__ny; #define HYPRE_BOX_SMP_PRIVATE i,j #define HYPRE_SMP_PRIVATE \ HYPRE_BOX_SMP_PRIVATE,hypre__nx,hypre__ny #pragma omp parallel for private (HYPRE_SMP_PRIVATE) for (i=0;i<100; i++) for (j=0;j<100; j++) { hypr...
hermv_c_csc_u_lo_trans.c
#include "alphasparse/kernel.h" #ifdef _OPENMP #include <omp.h> #endif #include "alphasparse/util.h" #include <memory.h> static alphasparse_status_t hermv_csc_u_lo_trans_unroll(const ALPHA_Number alpha, const ALPHA_SPMAT_CSC *A, const ALPHA_Number *x, const ALPHA_Number ...
tinyexr.h
/* Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this l...
mapper_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Philipp Bucher, Jordi Cotela // // See Master-The...
familytree_par.c
#include "familytree.h" #include <omp.h> int par_traverse(tree *node) { if (node == NULL) return 0; int father_iq, mother_iq; #pragma omp task shared(father_iq) father_iq = par_traverse(node->father); //#pragma omp task shared(mother_iq) mother_iq = par_traverse(node->mother); #pragma ...
hermm_c_dia_n_lo_row_trans.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include <memory.h> #include <stdlib.h> alphasparse_status_t ONAME(const ALPHA_Complex alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Complex *x, const ALPHA_INT columns, const ALPHA_INT ld...
primitives.h
#pragma once #include <vector> #include <cstdint> #include <omp.h> #include "local_buffer.h" #include "../timer.h" using namespace std; #define CACHE_LINE_ENTRY (16) #define LOCAL_BUDGET (8*1024*1024) template<typename T> void MemSetOMP(T *arr, int val, size_t size) { size_t tid = omp_get_thread_num(); si...
error.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB LU code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
level.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
threading.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_UTILS_THREADING_H_ #define LIGHTGBM_UTILS_THREADING_H_ #include <LightGBM/meta.h> #include <LightGBM/utils/common.h> #include <L...
GB_select_phase1.c
//------------------------------------------------------------------------------ // GB_select_phase1: count entries in each vector for C=select(A,thunk) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SP...
imm.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
GB_binop__div_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_unop__identity_uint64_bool.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...
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 declare // expected-error {{expected an OpenMP directive}} int foo(void); #pra...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__min_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-...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
SubTVec.h
#ifndef KRIPKE_SUBTVEC_H__ #define KRIPKE_SUBTVEC_H__ #include <Kripke/Kernel.h> #include <algorithm> #include <vector> #include <stdlib.h> /** * A transport vector (used for Psi and Phi, RHS, etc.) * * This provides the inner most three strides of * Psi[GS][DS][G][D][Z] * but in whatever nesting order is ...
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-...
openmp_wrapper.h
/*! * Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_ #ifdef _OPENMP #include <LightGBM/utils/log.h> #include <omp.h> #include <ex...
GB_unop__minv_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...
regularisation.h
/* Incremental diffusion regularisation of parametrised transformation using (globally optimal) belief-propagation on minimum spanning tree. Fast distance transform uses squared differences. Similarity cost for each node and label has to be given as input. */ void messageDT(int ind,float* data,short* indout,int len1...
irbuilder_nested_openmp_parallel_empty.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefixes=ALL,IRBUILDER // %clang_cc1 -no-opaque-p...
sparseMatrix.c
/// \File /// Routines for creating and manipulating sparse matrices. #include "sparseMatrix.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <omp.h> #include "performance.h" #include "parallel.h" #include "constants.h" /// \details /// Adjust number of no...
Example_collapse.1.c
/* * @@name: collapse.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_3.0 */ void bar(float *a, int i, int j, int k); int kl, ku, ks, jl, ju, js, il, iu,is; void sub(float *a) { int i, j, k; #pragma omp for collapse(2) private(i, k, j) for (k=kl; k<=ku; k+=ks) ...
shared-clauseModificado.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main() { int i, n = 7; int a[n]; for (i=0; i<n; i++) a[i] = i+1; #pragma omp parallel for default(none) shared(a, n) for (i=0; i<n; i++) a[i] += i; printf("Después de parallel for:\n"); for (i=0; i<n; i++) printf("a[%d] = %d\n",i,a[i]); }
GB_unaryop__identity_int8_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
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)...
GB_unop__identity_fc64_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
radmin_fmt_plug.c
/* RAdmin v2.x cracker patch for JtR. Hacked together during * May of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source ...
GB_binop__times_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-...
loadcpu.c
/* | CPU benchmark program | loads all available CPU until Ctrl+C | | compile using: | cc ./loadcpu.c -o loadcpu -fopenmp | | _______________________________________ | ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__exp2_fc32_fc32.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...
sumProductSparseC.c
#include <mex.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <omp.h> void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { double* prediction = mxGetPr(prhs[0]); /* containts evaluated appearance models for all pixel in that BScan and all boundary models */ double* mu...
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) >...
rnn_impl.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 ...
critical-2.c
int i; void foo (int j) { #pragma omp critical (foo) hint (j + 1) /* { dg-error "constant integer expression" } */ i = i + 1; #pragma omp critical (foo),hint(j) /* { dg-error "constant integer expression" } */ i = i + 1; }
omp-task.simple.c
#include <stdio.h> int main() { int x = 10, i = 0; #pragma omp parallel { printf("x par = %d\n", x); printf("i par = %d\n", i); } printf("final x = %d\n", x); return 0; }
tasker.h
#pragma once #include <string> #include <omp.h> #include "momentum-solvers/amr_momentum_solver.h" #include "spatial-solvers/amr_spatial_solver.h" namespace vlv{ inline void step_location( corgi::Grid<1>& grid ) { #pragma omp parallel { #pragma omp single { for(auto cid : grid.get_tile_ids() ){ #prag...
filter.c
/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
filter.c
/* Copyright 2015-2017. The Regents of the University of California. * Copyright 2016-2017. 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-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 201...
mg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG This benchmark is an OpenMP C version of the NPB MG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
nested_par3.c
#include <stdio.h> #define N 10 int main (void) { long int aa=0; int res = 0; int ng =12; int cmom = 14; int nxyz = 5; #pragma omp target teams distribute num_teams(nxyz) thread_limit(4) map(tofrom:aa) for (int gid = 0; gid < nxyz; gid++) { #pragma omp parallel for collapse(2) for (unsigned in...
omp_dtrsm_batch.c
/** * @file omp_dtrsm_batch.c * * @brief BBLAS omp_dtrsm_batch double routine. * * BBLAS is a software package provided by Univ. of Manchester, * Univ. of Tennessee. * * @version 1.0.0 * @author Samuel D. Relton * @author Pedro V. Lara * @author Mawussi Zounon * @date 2016-02-20 * **/ #ifndef ...
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) >...
atomic_messages.c
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s int foo() { L1: foo(); #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression w...
comm.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 ...
multi_bspline_create.c
///////////////////////////////////////////////////////////////////////////// // einspline: a library for creating and evaluating B-splines // // Copyright (C) 2007 Kenneth P. Esler, Jr. // // // // This...
GB_unop__identity_int16_uint64.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...
fista.h
/* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal * * This file is part of SPAMS. * * SPAMS 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 of the License, or * (at your opti...
sharpen.c
// Sam Siewert, July 16, 2020 // // Based on basic PSF convolution as documented in DSP Engineer's Handbook // // http://www.dspguide.com/pdfbook.htm // #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <time.h> //#define IMG_HEIGHT (240) //#define IMG_WIDTH...
transpose.h
// This code is part of the Problem Based Benchmark Suite (PBBS) // Copyright (c) 2011-2016 Guy Blelloch and the PBBS team // // 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 restri...
target_teams_distribute_parallel_for_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for simd'}} #pragma omp target teams distribute parallel for simd // expected...
electrons.c
/*--------------------------------------------------------------------------------- ELECTRONS.C -Initialize electron and gas entropies -Assign electron and total entropies based on https://academic.oup.com/mnras/article/454/2/1848/2892599 ------------------------------------------------------------------------...
Example_host_teams.1.c
/* * @@name: host_teams.2.c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #define N 1000 int main(){ int nteams_required=2, max_thrds, tm_id; float sp_x[N], sp_y[N], sp_a=0.0001...
debug_test_system.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2012, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
GB_unop__identity_uint64_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unaryop__identity_uint32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
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...
pr70680-1.c
/* PR middle-end/70680 */ int v; void f1 (void) { int i = 0; #pragma omp task default(shared) if(0) { #pragma omp simd for (i = 0; i < 100; i++) ; v = i; } if (i != 100) __builtin_abort (); } void f2 (void) { int i = 0; #pragma omp task default(shared) if(0) { #pragma omp simd for (...
eigenvalues.c
#include "eigenvalues.h" #include <omp.h> #include <math.h> #include <assert.h> #include "mkl.h" inline double secularEquation(double lambda, double roh, double* z, double* D, int n, int* G) { double sum = 0; int i; #pragma omp parallel for default(shared) private(i) schedule(static) reduction(+:sum) ...
ordering_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_binop__bset_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...