source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_binop__lor_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...
zlaset.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
GB_binop__times_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
omp-general.c
/* General types and functions that are uselful for processing of OpenMP, OpenACC and similar directivers at various stages of compilation. Copyright (C) 2005-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 ...
rose_outline1.c
/* Super simple test * 5/21/2014 * Author: bielsk1 */ #define NONZER 23 #define NA 7 static int acol[24UL] = {(0)}; double cuf[7 + 1]; int qww[24UL] = {(2)}; #pragma omp threadprivate ( cuf, qww ) void foo(int array[],int s); /*MAINNNNN*/ void OUT__3__7847__(int *sp__); int main(int argc,char *argv) { int s; OU...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "cuda.h" #include <stdio.h> #include <stdlib.h> #include <string.h> pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { char *path; FILE *file = faasmndp_fopen(filename, "r"); if(!file) file_error(filename);...
5311.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])...
GB_unop__identity_bool_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
private-clauseModificado2.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(){ int i, n = 7; int a[n], suma=0; for (i=0; i<n; i++) a[i] = i; #pragma omp parallel { #pragma omp for for (i=0; i<n; i++){ suma = suma + a[i]; printf("thread %d suma a[%d] / ...
vx_lut.c
/* * Copyright (c) 2012-2014 The Khronos Group Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, m...
flow.c
#include "flow.h" #include "../../comms.h" #include "../../omp4/shared.h" #include "../flow_interface.h" #include <math.h> #include <stdio.h> #include <stdlib.h> // Solve a single timestep on the given mesh void solve_hydro_2d(Mesh* mesh, int tt, double* pressure, double* density0, double* density_...
threshold.c
/* Copyright 2014. The Regents of the University of California. * Copyright 2015-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: * 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2015-20...
5969.c
/* * Compile using the command: * `cc 27Stencil.c -o oa -fopenmp -lm` */ #include <math.h> #include <omp.h> #include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #ifdef _OPENACC #include <openacc.h> #endif #define DEFAULT_DATASIZE 1048576 /* Default datasize. */ #define DEFAULT_REPS 10 ...
DynamicMatrix.h
/* * DynamicMatrix.h * * Created on: 13.03.2014 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef DYNAMIC_MATRIX_H_ #define DYNAMIC_MATRIX_H_ #include "../graph/Graph.h" #include "Vector.h" #include "SparseAccumulator.h" #include "AlgebraicGlobals.h" namespace NetworKit { /** * @ingro...
tree-vect-data-refs.c
/* Data References Analysis and Manipulation Utilities for Vectorization. Copyright (C) 2003-2015 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 ...
GB_binop__land_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...
drhook.c
/** * (C) Copyright 2014- ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an in...
covariance.origin.pluto.c
#include <omp.h> #include <math.h> #define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) #define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /** * This version is stamped on May 10, 2016 * * Contact: * Louis...
test8.c
int g1; void foo (int a) { 0+g1; if (1) { g1=2; #pragma omp barrier 3+g1; } else { g1=4; foo(3); g1+5; } } int main() { #pragma omp parallel { 6+g1; if (7) { g1=8; foo(9); g1=10; } else { 11+g1; #pragma omp barrier g1=12; #pragma omp barrier g1=13+g1; } g1=14; } }
GB_unaryop__abs_fp32_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...
test.c
#include <stdlib.h> #include <stdio.h> #include "omp.h" #include "../utilities/check.h" #include "../utilities/utilities.h" #define N 10 int main() { double a[N], a_h[N]; double b[N], c[N]; int fail = 0; check_offloading(); long cpuExec = 0; #pragma omp target map(tofrom: cpuExec) { cpuExec = omp...
ten_tusscher_3_percolation_ENDO_CPU.c
#include "model_common.h" #include <assert.h> #include <stdlib.h> #include "ten_tusscher_3_percolation.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; } SET_ODE...
mxEvaluateVertAverage.c
// // main.c // matEvaluateVertAverage // // Created by li12242 on 17/11/1. // Copyright (c) 2017年 li12242. All rights reserved. // #include "mex.h" #define INF 10.0e9 #ifdef _OPENMP #include <omp.h> #endif #define max(a, b) ((a > b) ? a : b) #define min(a, b) ((a < b) ? a : b) void mexFunction(int nlhs, mxArra...
sharpen_AVX.c
#include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <immintrin.h> typedef float FLOAT; // Cycle Counter Code // // Can be replaced with ippGetCpuFreqMhz and ippGetCpuClocks // when IPP core functions are available. // typedef unsigned int UINT32; typedef unsign...
DRB061-matrixvector1-orig-no.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
MatrixMN.h
///////////////////////////////////////////////////////////////////////////// // Authored by Jeong-Mo Hong for CSE4060 course at Dongguk University CSE // // jeongmo.hong@gmail.com // // Do whatever you want license. // ////////...
dataset.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_DATASET_H_ #define LIGHTGBM_DATASET_H_ #include <LightGBM/config.h> #include <LightGBM/feature_group.h> #include <LightGBM/meta.h> ...
GB_unop__minv_int64_int64.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...
omp_nested_loop3.c
#include <stdio.h> #include <omp.h> int main() { int i, j; #pragma omp parallel { #pragma omp for collapse(2) for (i=9; i>6; i--) { for (j=0; j<5; j++) { printf("[%d] (i,j=%d,%d)\n", omp_get_thread_num(), i, j); } } } return 0; }
holaOMP.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> void HolaMundo(void); int main(int argc, char *argv[]){ int numeroDeHilos=strtol(argv[1],NULL,10); #pragma omp parallel num_threads(numeroDeHilos) HolaMundo(); return 0; } void HolaMundo(void){ int my_rank=omp_get_thread_num(); int numeroDeHilos=omp_get...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- 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 // //===---------------------------...
GB_binop__copysign_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:...
DenseMatrix.h
/* * DenseMatrix.h * * Created on: Nov 25, 2015 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef NETWORKIT_CPP_ALGEBRAIC_DENSEMATRIX_H_ #define NETWORKIT_CPP_ALGEBRAIC_DENSEMATRIX_H_ #include "../Globals.h" #include "Vector.h" #include <cassert> #include <vector> namespace NetworKit {...
GB_unaryop__minv_fp64_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
mattoepz.c
#include "matrix.h" #include <stdlib.h> /** \brief Computes the symmetric Toeplitz matrix from a co-efficient matrix * * \param[in] R Input coefficient matrix * \param[in] result Matrix to store the result * \return \f$ \textrm{symtoep}(\mathbf{R}) \f$ * */ MATRIX mat_symtoeplz(MATRIX R, MATRIX result) { in...
reset_field_kernel_c.c
/*Crown Copyright 2012 AWE. * * This file is part of CloverLeaf. * * CloverLeaf 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 option) * any later version. * * Clo...
kmeans.c
/** @file kmeans.c ** @brief K-means - Declaration ** @author Andrea Vedaldi, David Novotny **/ /* Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. Copyright (C) 2013 Andrea Vedaldi and David Novotny. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the...
GB_binop__pow_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__le_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-...
main.c
#include <stdio.h> #include <stdlib.h> #include <complex.h> #include "omp.h" #define MAX_ITER 10000 #define SIZE 1024 #define WIDTH SIZE #define HEIGHT SIZE #define NUMTHREADS 8 typedef enum { RGB_RED = 0, RGB_GREEN, RGB_BLUE, } rgb_t; // performs mandelbrot calculation for every pixel void generate_mandelbrot(...
advection_avx.h
//***************************************************************************** // Title : src/equation_avx/advection_avx.h // Author : Tanabe Yuta // Date : 2021/02/13 // Copyright : (C)2021 TanabeYuta //***************************************************************************** #pra...
GB_binop__bxor_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...
transform.h
/*! * Copyright 2018 XGBoost contributors */ #ifndef XGBOOST_COMMON_TRANSFORM_H_ #define XGBOOST_COMMON_TRANSFORM_H_ #include <dmlc/omp.h> #include <dmlc/common.h> #include <xgboost/data.h> #include <utility> #include <vector> #include <type_traits> // enable_if #include "xgboost/host_device_vector.h" #include "x...
TrainMTCNNprocessor.h
#ifndef _TRAIN_MTCNN_PROCESSOR_H_ #define _TRAIN_MTCNN_PROCESSOR_H_ #pragma once #include "ZQ_CNN_Net.h" #include <vector> #include <string> #include <iostream> #include <omp.h> #include <stdio.h> #include "opencv2/opencv.hpp" namespace ZQ { class TrainMTCNNprocessor { public: static bool generateWiderProb(const ...
hermite.h
#pragma once template <class Tpsys> PS::F64 makeActiveList(Tpsys & pp, std::vector<PS::S32> & active_list) { PS::F64 t_s = 1.e10; active_list.clear(); PS::S32 psize = pp.size(); for(PS::S32 i=0; i<psize; i++){ if ( pp[i].isDead ) continue; PS::F64 t_i = pp[i].tim...
kdtree_flann.h
/* kdtree_flann.h * * Author: Fabian Meyer * Created On: 09 Nov 2018 */ #ifndef KDT_KDTREE_FLANN_H_ #define KDT_KDTREE_FLANN_H_ #include <Eigen/Geometry> #include <flann/flann.hpp> namespace kdt { template<typename Scalar, typename Distance=flann::L2_Simple<Scalar>> class KDTreeFlann { ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GeometryConverter.h
/* -*-c++-*- IfcQuery www.ifcquery.com * MIT License Copyright (c) 2017 Fabian Gerold 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 ...
divsufsort.c
/* * divsufsort.c for libdivsufsort * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without ...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
mttkrp_omp.c
/* This file is part of ParTI!. ParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
compton.c
// Licensed under a 3-clause BSD style license - see LICENSE #include "common.h" #include "stdlib.h" double KN(double epsilon, double gamma, double nu){ double epsilon1 = nu*h; double gamma_e = 4*epsilon*gamma/(M_e*c*c); double q = epsilon1/(gamma_e*(gamma*M_e*c*c - epsilon1)); double res = 3*sigma...
stresslet_real_rc_mex.c
#include "stresslet_real_rc.h" #define X prhs[0] // Points (Nx3) #define NVEC prhs[1] // Points (Nx3) #define BOX prhs[2] // Box size #define RC prhs[3] // Cutoff radius #define XI prhs[4] // Ewald parameter #define AMAT plhs[0] #define ROW plhs[1] #define COL plhs[2] #define VAL plhs[3] #define PER plhs[4] ...
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) >...
shape.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
taskdep_untied_threadid.c
// RUN: %libomp-compile-and-run // REQUIRES: abt && !clang // Clang 10.0 discards local variables saved before taskyield. We mark untied // task tests that use local variables across taskyield with Clang as // unsupported so far. #include "omp_testsuite.h" #include <stdio.h> #include <stdlib.h> #include <string.h> i...
GB_binop__bset_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
onyx_if.c
/* * Copyright (c) 2010 The VP8 project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing...
specden.c
/************************************************************************ * This program takes time-data and calculates the * powerspectrum/fourier transform of the autocorrelation function. * This is a re-write of the fourier.x code written by Volker Kleinschmidt * and Harald Forbert as a tcl plugin for VMD by Axe...
ten_tusscher_2004_epi_S1_11.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S1_11.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...
matrixmul.c
/* * Copyright (c) 2020, Arm Limited and Contributors. * * SPDX-License-Identifier: Apache-2.0 * * 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/...
OMPIRBuilder.h
//===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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 // //===---------------------------...
GB_unop__lnot_int16_int16.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...
pssytrf_aasen.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/pzhetrf_aasen.c, normal z -> s, Fri Sep 28 17:38:12 2018 * **/ #include <math.h> #include "plasma_async.h"...
6382.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
main.c
/* SOR program */ #include <math.h> #include <stdio.h> #include <stdlib.h> #define Max(a, b) ((a) > (b) ? (a) : (b)) #define N 10 #define ITMAX 20 int main(int an, char **as) { int i, j, it; float MAXEPS = 0.5E-5f; float w = 0.5f; float A[N][N]; #pragma omp parallel default(shared) { #pragma omp for priva...
GB_unop__one_bool_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...
convolution_sgemm_pack8_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 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 ...
GB_unop__identity_fp64_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
pa2.c
// This was a collaboration between: // George Plukov (plukovga, 1316246) // ./pa2.x 0 5 3 3 a b c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <stdbool.h> #include <unistd.h> // Command line arguments: // /pal.x i N L M c0 c1 c2 // i: index of the property Fi which each segment of S needs t...
ScatterHelper.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
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) >...
helloworld.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char** argv) { if(argc < 2 || argc > 3) { printf("You must enter the number of threads as cl argument\n"); exit(1); } int num_of_threads = atoi(argv[1]); omp_set_num_threads(num_of_threads); int thread_id, num_threads; double star...
ordered3.c
#include <stdio.h> #include <omp.h> int main (void) { int i,j, myval; #pragma omp parallel for private(myval) ordered(2) for(i=1; i<=100; i++) for(j=1; j<=100; j++) { myval=i*j; #pragma omp ordered { printf("%d %d\n", i, myval); } } return 0; }
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <rabit/rabit.h> #include <xgboost/base.h> #include <xgboost/span.h> #include <xgboos...
fig7.11-nested-parallel.c
/* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2009 Sun Microsystems, Inc. All rights reserved. The contents of this file are subject to the terms of the BSD License("BSD")(the "License"). You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice...
GB_unaryop__ainv_fp32_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
polybench.c
/** * polybench.c: This file is part of the PolyBench/C 3.2 test suite. * * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <assert.h> #include <time.h> #include <s...
GB_unaryop__lnot_uint16_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...
GB_unop__frexpx_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...
CRSMatrixDiagPrecond.h
#ifndef CRSMATRIXDIAGPRECOND_H #define CRSMATRIXDIAGPRECOND_H #ifdef _OPENMP #include <omp.h> #endif #include "CRSMatrix.h" #include "sparse_io.h" #include "../Preconditioner/generateDiagPrecond.h" namespace MathLib { #ifdef MSVC_VER #pragma warning(push) #pragma warning(disable: 4018) #endif /** * Class CRSMatri...
1634.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/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
fci_contract.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...
GB_binop__gt_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-...
top_k_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...
first_omp_exemple.c
// first_omp_exemple.c // compile with: /openmp /* ############################################################################# ## DESCRIPTION: Simple exemple with OpenMp. ## NAME: first_omp_exemple.c ## AUTHOR: Lucca Pessoa da Silva Matos ## DATE: 10.04.2020 ## VERSION: 1.0 ## EXEMPLE: ## PS C:\> gcc -fopenmp -o...
DRB068-restrictpointer2-orig-no.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
example_1.c
#include <stdio.h> #include <omp.h> int main(int argc, char const *argv[]) { /* code */ int x = 2; #pragma omp parallel num_threads(2), shared(x) { { if (omp_get_thread_num() == 0) { x = 5; } else { printf("1: Thread# %d: x = %d\n", omp_get...
kmp_atomic_float10_max_min.c
// RUN: %libomp-compile -mlong-double-80 && %libomp-run // UNSUPPORTED: gcc #include <stdio.h> #include <omp.h> #ifdef __cplusplus extern "C" { #endif typedef void* ident_t; extern void __kmpc_atomic_float10_max(ident_t *id_ref, int gtid, long double *lhs, long double rhs); exte...
broadcast_reduce-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 ...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__ainv_fp64_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...
otfft_avxdif4omp.h
/****************************************************************************** * OTFFT AVXDIF(Radix-4) of OpenMP Version 6.5 * * Copyright (c) 2015 OK Ojisan(Takuya OKAHISA) * Released under the MIT license * http://opensource.org/licenses/mit-license.php ***********************************************************...
devito_prob1.c
#include "omp.h" #include <stdio.h> int main(int argc, char* argv[]) { int t_size = 1; int x_size = 4; int y_size = 4; int z_size = 4; int time_m = 0, time_M = t_size - 1; int x_m = 0, x_M = x_size - 1; int y_m = 0, y_M = y_size - 1; int z_m = 0, z_M = z_size - 1; int *u_vec2 = (int*) malloc(sizeof...
defaultmap-2.c
/* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-gimple" } */ struct S { int s; }; void foo (char *); void bar (int, char *, struct S, int *); #pragma omp declare target to (bar) #define N 16 void f1 (int sc1, struct S ag1, int *pt1) { char ar1[N]; foo (ar1); #pragma omp target bar (sc1, ar1, a...
z_solve.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB BT code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
test_tasks.c
//===-- test_tasks.c - Test task creation and execution ----------*- C -*-===// // // Part of the LOMP 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 // //===---------------------------...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...