source
stringlengths
3
92
c
stringlengths
26
2.25M
matmul2.c
#include <stdlib.h> #include <sys/time.h> #include <stdio.h> #include <math.h> //#define _OPENACCM #ifdef _OPENACCM #include <openacc.h> #endif #ifdef _OPENMP #include <omp.h> #endif #ifndef _N_ #define _N_ 512 #endif #ifndef VERIFICATION #define VERIFICATION 1 #endif int N = _N_; int M = _N_; int P = _N_; double ...
GB_unaryop__lnot_int16_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...
naive_monte_carlo.h
#ifndef MONTE_CARLO_H_ #define MONTE_CARLO_H_ #include <queue> #include <set> #include "../ugraph_io/ugraph_structures.h" #include "../utils/memory_monitor.h" #include "../utils/convergence_helper.h" #include "../ugraph_io/file_io.h" #include "../utils/globals.h" namespace CPU_ALGOS{ int traverse_run(uint source...
convolution_3x3_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. All rights reserved. // Copyright (C) 2019 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 /...
residual_based_adjoint_bossak_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #if !defined(KRATOS_RESIDUAL_...
builder.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef BUILDER_H_ #define BUILDER_H_ #include <algorithm> #include <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include <cstring> #include <cassert> ...
jacobi-ompacc-opt1.c
#include <stdio.h> #include <math.h> #include <assert.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif // Add timing support #include <sys/time.h> double time_stamp() { struct timeval t; double time; gettimeofday(&t,(struct timezone*)NULL); time = t.tv_sec + 1.0e-6*t.tv_usec; re...
ten_tusscher_2004_epi_S2_5.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S2_5.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO:...
denoise.gold.h
#include "common/common.hpp" #define epsilon (1.0e-20) void denoise_step (double* h_u0, double *h_u, double *h_f, double *h_g, int N) { double (*u)[N][N] = (double (*)[N][N])h_u; double (*u0)[N][N] = (double (*)[N][N])h_u0; double (*f)[N][N] = (double (*)[N][N])h_f; double (*g)[N][N] = (double (*)[N][N])h_g; ...
TemporalMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/TemporalMaxPooling.c" #else static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id)); int kW = luaT_getfieldcheckint(L, 1, "kW"); int dW = luaT_getfieldcheckint(L, 1, "dW"); THTensor *indi...
scheduled-clauseModificado2.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif char* printBool (int b) { char * ret; if (b == 0) ret = "False"; else if (b == 1) ret = "True"; else ret = "Error en printBool"; return ret; } int main(int argc, char **argv) { ...
ludcmp.c
/** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /* ludcmp.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #inclu...
GB_binop__iseq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
Hola_mundo_paralelo.c
#include <stdio.h> int main() { int tid,nth,j,X; #pragma omp parallel num_threads(4) //#pragma omp parallel { int i; printf("Hola Mundo\n"); tid=omp_get_thread_num(); nth=omp_get_num_threads(); X=omp_get_max_threads( ); printf("DISPONIBLES: %d \n",X); ...
GB_unop__identity_uint16_uint64.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...
DRB073-doall2-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
bli_dotv_opt_var1.c
/* BLIS An object-based framework for developing high-performance BLAS-like libraries. Copyright (C) 2014, The University of Texas Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributi...
ripemd_fmt_plug.c
/* ripemd cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary...
varvis.c
#include <stdlib.h> #include <stdio.h> #include <complex.h> #include <math.h> #include <omp.h> #define PI 3.141592653589 int var_vis(int nf, int nomega, int nui, double *f, double *omega, double *ui, double *taper, double sigma, double u, double extent, double *res, int nthreads){ double q2 = PI*PI ...
interactions.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "interactions.h" #include "cloud_util.h" #include "steric.h" typedef struct _box { int head; } box; struct _ix { double L; double r; int boxdim; box ***boxes; int maxNx; int curNx; ix_pair *pairs; }; // it is possible to use smalle...
cpu.c
/* * Copyright 2012 INRIA Paris-Rocquencourt * Copyright 2012 Ecole Normale Superieure * * Use of this software is governed by the MIT license * * Written by Tobias Grosser, INRIA Paris-Rocquencourt, * Domaine de Voluceau, Rocquenqourt, B.P. 105, * 78153 Le Chesnay Cedex France * and Sven Verdoolaege, * Ecole...
phantom_g5.c
#include <stdio.h> #include <math.h> #include <assert.h> #include <immintrin.h> #include <xmmintrin.h> #include <emmintrin.h> #include "avx_type.h" #include "gp5util.h" #define NUM_PIPE (4) #ifndef MAXDEV #define MAXDEV (128) #endif /* MAXDEV */ static double Eps; static struct Ptcl_Mem { Ipdata iptcl; Fodata ...
requires_directive.c
#include <stdio.h> #include <omp.h> #pragma omp requires unified_shared_memory int main() { int N = 10; int a[N]; int b[N]; int i; for (i=0; i<N; i++) a[i]=0; for (i=0; i<N; i++) b[i]=i; #pragma omp target parallel for { for (int j = 0; j< N; j++) a[j]=b[j]; } int rc = 0; f...
homomorphic_functions.c
long long int sk[NUM_PRIME][4096]; long long int pk0[NUM_PRIME][4096], pk1[NUM_PRIME][4096]; long long int rlk00[NUM_PRIME][4096], rlk01[NUM_PRIME][4096], rlk10[NUM_PRIME][4096], rlk11[NUM_PRIME][4096]; long long int rlk20[NUM_PRIME][4096], rlk21[NUM_PRIME][4096], rlk30[NUM_PRIME][4096], rlk31[NUM_PRIME][4096], rlk40[N...
DRB001-antidep1-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
host_as_target.c
// Check that specifying device as omp_get_initial_device(): // - Doesn't cause the runtime to fail. // - Offloads code to the host. // - Doesn't transfer data. In this case, just check that neither host data nor // default device data are affected by the specified transfers. // - Works whether it's specified direct...
GB_binop__lt_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-...
solver.c
#include "ns/solver.h" #include "ns/config.h" #include <stdlib.h> #include <stdio.h> // Data wrapper typedef struct ns_t { // World uint64_t world_width; uint64_t world_width_bounds; uint64_t world_height; uint64_t world_height_bounds; // Fluid double viscosity; double density; dou...
2.schedule.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> /* OpenMP */ #define N 12 /* Q1: Which iterations of the loops are executed by each thread */ /* for each schedule kind? */ int main() { int i; omp_set_num_threads(3); #pragma omp paralle...
trsm_x_sky_u_lo_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, cons...
pageRank.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
GB_unop__identity_uint8_fp32.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...
tinyexr.h
/* Copyright (c) 2014 - 2017, Syoyo Fujita 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 conditions and t...
Par-17-ParForLoopNoWaitBarrier.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; #pragma omp parallel { #pragma omp for nowait for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; } #pragma omp barrier #pragma omp for nowait for (int i = 0; i < 4; ++i) { a[i] = a[i] + a[i]; } } return 0; }
Undistorter.h
#pragma once #include "GImage.h" #include "Camera.h" #ifdef HAS_OPENMP #include <omp.h> #endif //图像的像素直接提取 #define _I(x,y) p_img[(c)*((int)(y)*(width_in)+(int)(x))] //亚像素级灰度值 #define _IF(x,y) (((int)(x+1)-(x))*((int)(y+1)-(y))*_I((image),(int)(x),(int)(y)) + ((int)(x+1)-(x))*((y)-(int)(y))*_I((image),(i...
GB_binop__ne_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
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 ...
ep.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - EP This benchmark is an OpenMP C version of the NPB EP code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS. ...
parallel_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Denis Demidov...
ten_tusscher_2004_epi_S1_12.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S1_12.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO...
PDBarycenterImpl.h
#ifndef _PDBARYCENTERIMPL_H #define _PDBARYCENTERIMPL_H #define BLocalMax ttk::CriticalType::Local_maximum #define BLocalMin ttk::CriticalType::Local_minimum #define BSaddle1 ttk::CriticalType::Saddle1 #define BSaddle2 ttk::CriticalType::Saddle2 #include <stdlib.h> /* srand, rand */ #include <cmath> #include ...
prepare_up.c
/************************************************************************************ File: prepare_up.c Contains the funtions used to prepare the upload of the page ***********************************************************************************/ #include "pixmap.h" #include "upload.h" /* Prepares t...
GB_binop__isgt_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
sum_of_vector_elements.c
// Felix F Feliu opemMP reduction clouse #include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { // variable declaration int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int sum, i; //initialize sum sum = 0; //add vector elements using a parallel block implementing reduction clouse #pragma...
omp_test_lock.c
// RUN: %libomp-compile-and-run // RUN: env KMP_LOCK_KIND=tas %libomp-run // RUN: env KMP_LOCK_KIND=futex %libomp-run #include <stdio.h> #include "omp_testsuite.h" omp_lock_t lck; int test_omp_test_lock() { int nr_threads_in_single = 0; int result = 0; int nr_iterations = 0; int i; omp_init_lock (&lck); ...
NETSPLITLM_fmt_plug.c
/* * NETHALFLM_fmt.c * Written by DSK (Based on NetLM/NetNTLM patch by JoMo-Kun) * Performs brute-force cracking of the HalfLM challenge/response pairs. * * Modified for performance and OMP support by magnum 2011 * * Storage Format: * domain\username:::lm response:nt response:challenge * * NOTE, in loader.c,...
HYPRE_struct_pcg.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
ZQ_FaceDatabase.h
#ifndef _ZQ_FACE_DATABASE_H_ #define _ZQ_FACE_DATABASE_H_ #pragma once #include <vector> #include <string> #include "ZQ_FaceFeature.h" #include "ZQ_FaceRecognizerSphereFace.h" #include "ZQ_MathBase.h" #include "ZQ_MergeSort.h" #include <omp.h> namespace ZQ { class ZQ_FaceDatabase { public: class Person { publ...
dgels.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zgels.c, normal z -> d, Fri Sep 28 17:38:05 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dataset.h
#ifndef LIGHTGBM_DATASET_H_ #define LIGHTGBM_DATASET_H_ #include <LightGBM/utils/random.h> #include <LightGBM/utils/text_reader.h> #include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/meta.h> #include <LightGBM/config.h> #include <LightGBM/feature_group.h> #include <vector> #include <utility> #include <func...
GB_ewise_slice.c
//------------------------------------------------------------------------------ // GB_ewise_slice: slice the entries and vectors for an ewise operation //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SP...
involutions.h
/* * Copyright 2018-2021 Kyle Berney * * 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 agreed to ...
GB_unop__isfinite_bool_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
main.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #include <math.h> double *matxvet(int m, int n, int *x, double **A); int main() { int n ,m, i, j, *x; double ** mat, *b; printf("Inserire il numero di righe della matrice: "); scanf("%d", &n); printf("Inserire il numero ...
reduction_average.c
#include<stdio.h> #include<omp.h> #define MAX 5 int main() { double ave=0.0, A[MAX]; int i; for (i=0; i<MAX; i++) { A[i] = i+1.0; } #pragma omp parallel for reduction(+: ave) for (i=0; i<MAX; i++) { ave += A[i]; } ave /= MAX; printf("%f\n",ave); return 0; }
region_4.tfm.c
void foo(int N, int *restrict A); void baz(int M, int *restrict T, int N, int *restrict A) { #pragma omp parallel { #pragma omp for default(shared) for (int I = 0; I < N; ++I) { for (int J = 0; J < M; ++J) A[I] = A[I] + T[J]; } } } void bar(int M, int *restrict T, int N, int *restrict A) { ...
GB_unop__identity_int32_uint32.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...
skew3.h
#pragma once #include <Eigen/Dense> #include <scope/math/macro.h> #include <scope/math/operation.h> namespace scope { namespace math { struct skew3 { template <math::OPS op, typename T1, typename T2> static Eigen::MatrixBase<T2>& set(Eigen::MatrixBase<T1> const& p, Eigen::Matr...
opencl_dmg_fmt_plug.c
/* * This software is Copyright (c) 2017, 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. * * Debug levels: * 1 show what "test" hits * 2 dump printables from the decrypte...
helloOMP.c
/* ============================================================================ Name : helloOMP.c Author : Carlos de la Torre Version : alfa Copyright : Description : Hello OpenMP World in C ============================================================================ */ #include <stdio.h> #inc...
pddp_2means.c
/*********************************************************************************************** *cr University of Patras, Greece *cr Copyright (c) 2015 University of Patras *cr All rights reserved *cr *cr ...
parallel_priority_queue.h
/*************************************************************************** * include/stxxl/bits/containers/parallel_priority_queue.h * * Part of the STXXL. See http://stxxl.sourceforge.net * * Copyright (C) 2014-2015 Thomas Keh <thomas.keh@student.kit.edu> * Copyright (C) 2014-2015 Timo Bingmann <tb@panthem...
evaluation.c
#include "common.h" #ifdef _OPENMP static int top_down_step(const int level, const int nodes, const int num_frontier, const int degree, const int* restrict adj, int* restrict frontier, int* restrict next, int* restrict distance, const int *restrict num_degrees, cha...
GB_unaryop__identity_bool_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
gather_nd_op_cpu_impl.h
/* Copyright 2016 The TensorFlow 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 a...
distribute_dispatch.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt #include "callback.h" #define WORK_SIZE 64 int main() { int i; #pragma omp teams num_teams(4) thread_limit(1) #pragma omp distribute dist_schedule(static, WORK_SIZE / 4) for (i = 0; i < WORK_SIZE; i++) {} return 0; } // CHECK-NOT...
instruments.h
/* * This file is part of Quantum++. * * MIT License * * Copyright (c) 2013 - 2018 Vlad Gheorghiu (vgheorgh@gmail.com) * * 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 restr...
util.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "thd_info.h" #include "util.h" #define _GNU_SOURCE 1 #include<stdio.h> /********************************************...
CSM_assembler_ExtForces.c
/* This file is part of redbKIT. * Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL) * Author: Federico Negri <federico.negri@epfl.ch> */ #include "mex.h" #include <stdio.h> #include <math.h> #include "blas.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #else #warning "OpenMP not ena...
omp_bugreduction.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> float dotprod(float * a, float * b, size_t N) { int i, tid; float sum; tid = omp_get_thread_num(); #pragma omp for reduction(+:sum) for (i = 0; i < N; ++i) { sum += a[i] * b[i]; printf("tid = %d i = %d\n", tid, i); } ...
threadpool.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include <string> #include <vector> #include <functional> #include <memory> #if defined(__GNUC__) #pragma GCC diagnostic push #if __GNUC__ >= 6 #pragma GCC diagnostic ignored "-Wignored-attributes" #endif #pra...
ast-dump-openmp-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 parallel for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp parallel for for (int i = 0; i < x; i+...
ola.c
#include <stdio.h> #include <omp.h> int main(){ #pragma omp parallel for for(int i=0;i<10;i++){ printf("%i\n",i); } return 0; }
convolution_3x3_pack8to1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
empty.c
/* 1. how to include header 2. parallel region 3. runtime routine 4. undeterminated execution order 5. control number of threads By C. Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main(void) { int i=0; #pragma omp parallel { #ifdef _OPENMP i=omp_get_thread_num(); #endif printf(...
wave3d.c
#ifndef TAPENADE #include <math.h> #endif #define Max(x,y) fmax(x,y) #define Min(x,y) fmin(x,y) #define Heaviside(x) ((x>=0)?1.0:0.0) #define u(x,xx,xxx) u[x][xx][xxx] #define c(x,xx,xxx) c[x][xx][xxx] #define u_1(x,xx,xxx) u_1[x][xx][xxx] #define u_2(x,xx,xxx) u_2[x][xx][xxx] void wave3d(double* u_vec, double* c_vec...
GB_binop__atan2_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
stackedCrossCorrelation.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <mpi.h> #include "parmt_mtsearch.h" #ifdef PARMT_USE_INTEL #include <mkl_cblas.h> #else #include <cblas.h> #endif #include "iscl/array/array.h" #include "iscl/memory/memory.h" #include "iscl/signal/convolve.h" int parmt_computeStackedCrossCorrelation_...
LAGraph_bfs_pushpull.c
//------------------------------------------------------------------------------ // LAGraph_bfs_pushpull: push-pull breadth-first search //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. ...
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2017. AL...
sdna_spatial_accumulators.h
//sDNA software for spatial network analysis //Copyright (C) 2011-2019 Cardiff University //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 3 of the License, or //(at your o...
GB_unaryop__lnot_fp32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
pixel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ompfor8.c
extern double f (double, double); void foo(int nthreads, int size, int numiter, double *V, int totalSize) { int i, iter; for(iter=0; iter<numiter; iter++) { #pragma omp parallel for default(none) shared(V,totalSize) private(i) schedule(static) ordered for (i=0; i<totalSize-1; i++) { V[i] = f(...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
RasterisationScanner.h
#ifndef RASTERISATIONCAMERA_H #define RASTERISATIONCAMERA_H #include <fanScanner.h> #include <algo/rasterize/fanScanLineGenerator.h> #include <texture/MemoryTexture.h> #if ENABLE_OPENMP #include <omp.h> #endif // ENABLE_OPENMP template<typename FillerType, typename ValueType> class RasterisationScanner : publ...
pgmp-chudnovsky.c
/* Pi computation using Chudnovsky's algortithm. * Copyright 2002, 2005 Hanhong Xue (macroxue at yahoo dot com) * Slightly modified 2005 by Torbjorn Granlund (tege at swox dot com) to allow more than 2G digits to be computed. * Modifed 2008 by David Carver (dcarver at tacc dot utexas dot edu) to enable mult...
GB_binop__min_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
displacement_lagrangemultiplier_mixed_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
EOBNRv2HMROM.c
/** * \author Sylvain Marsat, University of Maryland - NASA GSFC * * \brief C code for EOBNRv2HM reduced order model (non-spinning version). * See CQG 31 195010, 2014, arXiv:1402.4146 for details on the reduced order method. * See arXiv:1106.1021 for the EOBNRv2HM model. * * Borrows from the SEOBNR ROM LAL code ...
GB_binop__lor_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
crunch_parallel.h
long crunch_parallel (int _fd, long _counter[256], int _verbose) { /* the value to return */ long _total_read = 0; /* stat */ struct stat st; bzero (&st, sizeof(st)); fstat (_fd, &st); /* flush counter */ bzero (_counter, 256*sizeof(long)); /* allocate buffer and flush it */ char *_buf = (char *)Malloc (BF...
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)...
vect-simd-clone-1.c
/* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #include "tree-vect.h" #ifndef N #define N 1024 #endif int array[N]; #pragma omp declare simd simdlen(4) notinbranch #pragma omp declare simd simdlen(...
ast-dump-openmp-teams-distribute.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 for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target #pragma om...
ofmo-ifc4c-rys.c
/** * @file ofmo-ifc4c.c 同じタイプの3中心クーロン積分を行う関数群 * */ /** * @defgroup integ-ifc4c 4中心クーロン積分を行う関数群 * * 同じタイプの4中心クーロン積分を行い、環境ポテンシャル項に加算する * 関数群。 * * すべての関数が同じ引数をもっているので、以下にその内容を示す。 * * @param[in] nworkers 計算に用いるワーカプロセス(スレッド)数 * @param[in] workerid 各ワーカプロセス(スレッド)のID * (\f$ 0\le\tt{workerid}<\tt{nworkers} \f$...
FastTree-2.1.11.c
// Downloaded from <http://www.microbesonline.org/fasttree/FastTree-2.1.11.c> /* * FastTree -- inferring approximately-maximum-likelihood trees for large * multiple sequence alignments. * * Morgan N. Price * http://www.microbesonline.org/fasttree/ * * Thanks to Jim Hester of the Cleveland Clinic Foundation for ...
cluster_op_impl.h
/* The MIT License (MIT) * * (c) Jürgen Simon 2014 (juergen.simon@uni-bonn.de) * * 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 ...