source
stringlengths
3
92
c
stringlengths
26
2.25M
3d25pt.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-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
GB_Global.c
//------------------------------------------------------------------------------ // GB_Global: global values in GraphBLAS //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-2...
net_sha1_fmt_plug.c
/* Cracker for "Keyed SHA1" network authentication hashes. * * 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 forms, with or without * modification, are permit...
explicit_dt.h
/* ============================================================================== KratosPFEMApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cim...
cgbtrf.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/zgbtrf.c, normal z -> c, Fri Sep 28 17:38:04 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
convect_particles_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pablo Becker // // #if !defined(KRATOS_CONVECT_P...
set_grid_props_and_dt.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* This file contains functions for reading the grid properties as well as setting the time step. */ #include <stdlib.h> #include <s...
cg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - CG This benchmark is an OpenMP C version of the NPB CG code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
organismsbuffer.h
#pragma once #ifndef ORGANISMSBUFFER_H__ #define ORGANISMSBUFFER_H__ #include "organism.h" #include "rng.h" #include <assert.h> namespace NEAT { template<typename TOrganism = Organism> class OrganismsBuffer { size_t _n; std::vector<TOrganism> _a; std::vector<TOrganism> _b; st...
GB_unop__asinh_fp32_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...
LPfold.c
/* * local pair probabilities for RNA secondary structures * * Stephan Bernhart, Ivo L Hofacker * Vienna RNA package */ /* * todo: compute energy z-score for each window * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <...
collisions_sweepphi.c
/** * @file collisions.c * @brief Collision search using a line sweep algorithm, O(N log(N)). * @author Hanno Rein <hanno@hanno-rein.de> * * @details The routines in this file implement a collision detection * method called line sweep. It is very fast if all dimensions except one * are small. The algorithm ...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b) #...
barrier-2.c
/* { dg-do compile } */ void f1(void) { #pragma omp barrier a /* { dg-error "expected end of line" } */ } /* OpenMP 2.5, section 2.7.3: Note that because the barrier construct does not have a C language statement as part of its syntax, there are some restrictions on its placement within a program. The ba...
utils.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 ...
pomp.h
// license:GPL-2.0+ // copyright-holders:Couriersud /* * pomp.h * * Wrap all OPENMP stuff here in a hopefully c++ compliant way. */ #ifndef POMP_H_ #define POMP_H_ #include "pconfig.h" #if HAS_OPENMP #include "omp.h" #endif namespace plib { namespace omp { template <class T> void for_static(const int start, co...
normal.c
// RUN: %libomp-compile-and-run | FileCheck %s // RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s // REQUIRES: ompt #include "callback.h" int main() { #pragma omp parallel num_threads(4) { print_ids(0); print_ids(1); } print_fuzzy_address(1); // Check if libomp sup...
ccl_correlation.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <gsl/gsl_integration.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_roots.h> #include <gsl/gsl_spline.h> #include <gsl/gsl_sf_bessel.h> #include <gsl/gsl_sf_legendre.h> #include "ccl.h" /*--------ROUTINE: taper_cl ------ TASK:n Ap...
kernel_cpu.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
GB_unop__identity_fp32_fc64.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...
GB_unop__identity_uint16_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...
parallel_push_pop_stack.c
#include <stdio.h> #include <omp.h> int MAXSIZE = 8; int stack[8]; int top = -1; int isEmpty() { if(top == -1) return 1; else return 0; } int isFull() { if(top == MAXSIZE) return 1; else return 0; } int pop() { int data; if(!isEmpty()) { d...
firstlastprivate.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 for firstprivate(suma) lastprivate(suma) for (i=0; i<n; i++){ suma = suma + a[i]; printf(" thread %d...
GB_binop__rdiv_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-...
gbdt.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_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
GB_unaryop__lnot_bool_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ques14.c
#include<stdio.h> #include<omp.h> #include<math.h> main() { int n,i,j; int arr[1000]={0}; printf("Enter n\n"); scanf("%d",&n); for(i=2;i<=sqrt(n);i++) { if(arr[i]==0) { #pragma omp parallel for for(j=i*i;j<=n;j=j+i) ...
GB_unop__log2_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...
coloring_dense_sparse.h
#ifndef COLORING_DENSE_SPARSE_H_ #define COLORING_DENSE_SPARSE_H_ #include <omp.h> #include <cassert> #include <random> #include "gms/third_party/gapbs/benchmark.h" #include "gms/third_party/gapbs/builder.h" #include "gms/third_party/gapbs/command_line.h" #include "gms/third_party/gapbs/graph.h" #include "coloring_co...
GB_cumsum.c
//------------------------------------------------------------------------------ // GB_cumsum: cumlative sum of an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com See Graph...
GB_unop__minv_bool_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
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...
morn_image_convert.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; 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 in wri...
OnDiscMSExperiment.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
convolutiondepthwise_3x3_pack8.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 ...
softmax.c
/******************************************************************************* * Copyright 2017-2018 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
zSchCompUdt-2Ddynamic.c
/*! @file * \brief THis file contains the main loop of pdgstrf which involves rank k * update of the Schur complement. * Uses 2D partitioning for the scatter phase. * * <pre> * -- Distributed SuperLU routine (version 4.1) -- * Lawrence Berkeley National Lab, Univ. of California Berkeley. * Octob...
GB_unop__round_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
philosophen.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> // number of philosophers #define N 5 // left neighbour #define LEFT (id) // right neighbour #define RIGHT ((id + 1) % num_threads) #define TRUE 1 #define FALSE 0 // Global variables int num_threads; omp_lock_t forks[N]; void think(int philosopher) { print...
ast-dump-openmp-atomic.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(int i) { #pragma omp atomic ++i; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-open...
GB_binop__rdiv_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
CALPHADTieLineConcSolverTernary.h
#ifndef included_CALPHADTieLineConcSolverTernary #define included_CALPHADTieLineConcSolverTernary #include "NewtonSolver.h" #include "datatypes.h" namespace Thermo4PFM { /// solve for equilibrium compositions along a tie line /// passing through nominal composition class CALPHADTieLineConcSolverTernary : public ...
1body.h
/* * Copyright (C) 2004-2020 Edward F. Valeev * * This file is part of Libint. * * Libint 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 opt...
example_09-StructOfArrays-CellLinkedList-OuterLoop-LoadBalanced.c
/* * SPDX-License-Identifier: BSD-3-Clause * * example_09-StructOfArrays-CellLinkedList-OuterLoop-LoadBalanced.c : * Example of SPH Density Calculation using * fast neighbor search the main density loop via * Cell Linked List method, Struct of Arrays (SoA) * data layout, OpenMP paralleli...
omp_for_lastprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp for lastprivate clause by counting up a variable in a parallelized loop. Each thread saves the next summand in a lastprivate variable i0. At the end i0 is compared to the value of the expected last summand.</ompts:testdescription> <ompts:ompversion>2.0</ompt...
add_vect.c
#include <stdio.h> #define N 100000 int main(int argc, char **argv) { int i; int a[N], b[N], c[N], d[N]; for (i=0; i < N; i++) { b[i] = 2; c[i] = 5; } #pragma omp parallel { #pragma omp for for (i = 0; i < N; i++) a[i] = b[i] + c[i]; #pragma omp for for (i = 0; i < N; i++) ...
convolution_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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_unaryop__minv_int8_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
displacement_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
5233.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...
test_scatter.c
#include "config.h" #include <limits.h> #include <math.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #if defined(_OPENMP) #include <omp.h> #endif #include "kseq.h" KSEQ_INIT(int, read) #if HAVE_SSE2 #include "ssw.h" #endi...
mixed_tentusscher_myo_epi_2004_S3_20.c
// Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S3_20.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_o...
csr-parser.c
#include <stdio.h> #include <stdlib.h> #include <regex.h> #include <assert.h> #include <sys/param.h> #include "csr-parser.h" #define READ_CHAR_BUFFER_SIZE 102400 static size_t parse_number_of_nodes(const char *nodes_mtx, regex_t *regex_comment) { FILE *fp; char buff[READ_CHAR_BUFFER_SIZE]; int reti; ...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
structure_factors_direct.h
#ifndef CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H #define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H #include <cctbx/xray/scattering_type_registry.h> #include <cctbx/xray/hr_ht_cache.h> #include <cctbx/math/cos_sin_table.h> #include <omptbx/omp_or_stubs.h> #define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_NO_PRAGMA_OMP namespace c...
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2019. 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-2020...
softmax-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
BubbleFreeN50.h
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2012) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
cpplex.c
/* Copyright 2003, 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. File modified October 3, 2003 by PathScale, Inc. to update Open64 C/C++ front-ends to GNU 3.3.1 release. */ /* CPP Library - lexical analysis. Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Per Bot...
usolve_dft_inc.c
/** * @file usolve_dft_inc.c * @brief u-subproblem DFT solver for TV-regularized deconvolution * @author Pascal Getreuer <getreuer@gmail.com> * * Copyright (c) 2010-2012, Pascal Getreuer * All rights reserved. * * This program is free software: you can use, modify and/or * redistribute it under the terms of...
altsim.h
#ifndef ALTSIM_H #define ALTSIM_H #include <stdio.h> #include <omp.h> const int num_loops = 3; const int accuracy_mode = 1; const int pressure_solve_steps = 20; inline double advect_sample(const double const * v, int Ny, double s, double t) { return (1 - s) * ((1 - t) * v[0] + t * v[1]) + s * ((1 - t) * ...
taskwait_omp.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * A bunch of n tasks (1st arg) are created by a single thread. * Each task creates two tasks more and executes a taskwait directive */ #include <assert.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define NUM_TA...
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...
7549.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...
ast-dump-openmp-target-update.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(int x) { #pragma omp target update to(x) } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dum...
yolov2_forward_network.c
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h // softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h #define GEMMCONV /* // from: box.h typedef struct { float x, y, w, h; } box; ...
DRB074-flush-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...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
preprocess.c
#include<stdlib.h> #include "graph.h" #include "mainFunctions.h" #include "print.h" //#include "powerperformacetracking.h" //#include "communities.h" #include "graphprop.h" #include "nodeIntMap.h" #include <string.h> #define DEBUG_ON int adj = 0; // 1 for reverse adjlist or 0 in adjlist. bool skewed = false; no...
eigen.c
// Modified from the band package. Copyright (c) 2016 Drew Schmidt #include "safeomp.h" #include <float/slapack.h> #include "Rfloat.h" #include "unroll.h" static inline void reverse_vec(const float_len_t len, float *const x) { float_len_t j = len-1; for (float_len_t i=0; i<len/2; i++) { const float tm...
helloworld.c
#include <stdio.h> #include <omp.h> int main(void) { int isHost = 1; #pragma omp target map(tofrom: isHost) { isHost = omp_is_initial_device(); printf("Hello world. %d\n", 100); for (int i =0; i<5; i++) { printf("Hello world. iteration %d\n", i); } } printf("Target region executed on th...
GB_is_diagonal.c
//------------------------------------------------------------------------------ // GB_is_diagonal: check if A is a diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com ...
gbdt.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_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
tls-2.c
/* { dg-do compile } */ /* { dg-require-effective-target tls } */ extern char buf[]; #pragma omp threadprivate (buf) /* { dg-error "has incomplete type" } */ void foo (void) { int i; #pragma omp threadprivate (i) /* { dg-error "automatic variable" } */ i = 0; }
ddcMalloc.c
// $Id$ #define _XOPEN_SOURCE 600 #include "ddcMalloc.h" #include "mpiUtils.h" #include <stdlib.h> #include <stdio.h> #include <assert.h> #include <libgen.h> #include <string.h> #ifndef __APPLE__ #include <malloc.h> #endif #ifdef WITH_PIO #include "pio.h" #endif static int addBlock(void* ptr, size_t size, char* loc...
tree.h
#ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/meta.h> #include <LightGBM/dataset.h> #include <string> #include <vector> #include <memory> #include <map> namespace LightGBM { #define kCategoricalMask (1) #define kDefaultLeftMask (2) /*! * \brief Tree model */ class Tree { public: /*! * \...
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...
CutPursuit_L2.h
#pragma once #include "CutPursuit.h" #include "Common.h" namespace CP { template <typename T> class CutPursuit_L2 : public CutPursuit<T> { public: ~CutPursuit_L2(){ }; //============================================================================================= //=========================...
rhs_term.c
#include "mex.h" #include "blas.h" #include "conv2d.h" #define DEBUG 0 /* */ void rhs_parall(size_t Np, size_t K, size_t Nfp, double *Dr, double *Ds, double *LIFT, double *rx, double *ry, double *sx, double *sy, double *J, double *Js, double *dflux, dou...
parallel_for_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}} #pragma omp parallel for simd // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}} #pragma omp parallel for simd foo void test_no_clause()...
SpatialAdaptiveAveragePooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialAdaptiveAveragePooling.c" #else #define START_IND(a,b,c) (int)floor((float)(a * c) / b) #define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b) // #define START_IND(a,b,c) a * c / b // #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b > 0)?1:0...
test_verify_rowcols.c
#include "config.h" #include <limits.h> #include <math.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include "kseq.h" KSEQ_INIT(int, read) #include "parasail.h" #include "parasail/cpuid.h" #include "parasail/memory.h" #in...
example_06-StructOfArrays-CellLinkedList-InnerOmp.c
/* * SPDX-License-Identifier: BSD-3-Clause * * example_06-StructOfArrays-CellLinkedList-InnerOmp.c : * Example of SPH Density Calculation using * fast neighbor search the main density loop via * Cell Linked List method, Struct of Arrays (SoA) * data layout, OpenMP parallelization at the ...
pooling_pack_x86.h
#include <emmintrin.h> #include <stdio.h> #include <assert.h> #include "pooling_param.h" #define POOL_GENERIC 0 #define POOL_K2S2 1 #define POOL_K3S2 2 #define POOL_K3S1 3 typedef void (*pooling_kernel_t)(const void* input, void* output, int inc, int inh, int inw, int outh, int outw, int, ...
ocp_nlp_sqp.c
/* * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl * * This file is part of acados....
Example_target.3.c
/* * @@name: target.3c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ extern void init(float*, float*, int); extern void output(float*, int); void vec_mult(int N) { int i; float p[N], v1[N], v2[N]; init(v1, v2, N); #pragma omp target map(to: v1, v2) map(from: p)...
ompnumthread.c
/* * $PIP_license: <Simplified BSD License> * 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 the follow...
utils.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 ...
2mm.c
/** * 2mm.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 "util.h" /* Include polybench common header. */ #include <polybench.h> /* Include benchmark-specific header. */ /* Default...
depobj.c
// Example for the depobj construct // From: https://www.openmp.org/wp-content/uploads/openmp-examples-5.0.0.pdf #include <stdio.h> #include <omp.h> #define N 100 #define TRUE 1 #define FALSE 0 void driver(int update, float a[], float b[], int n, omp_depend_t *obj); void update_copy(int update, float a[], float b[],...
GB_unop__signum_fp32_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...
crop.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
pr35625.c
/* PR libgomp/35625 */ /* { dg-do run } */ /* { dg-options "-std=c99" } */ int main (void) { #pragma omp parallel { #pragma omp for schedule (guided, 10) for (int i = 0; i < 1826; i += 10) ; #pragma omp for schedule (guided, 10) for (int i = 0; i > -1826; i -= 10) ; } return 0; }
axhelm.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 wi...
pr88203-2.c
/* PR c++/88203 */ /* { dg-do compile } */ /* { dg-additional-options "-std=gnu99" { target c } } */ /* { dg-additional-options "-std=gnu++11" { target c++ } } */ void foo (const char *, const char *); #pragma omp declare target to (foo) void f1 (void) { #pragma omp parallel default(none) foo (__FUNCTION__, __PRE...
irbuilder_nested_parallel_for.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -verify -fopenmp -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefixes=CHECK %s // RUN: %clang_cc1 -fopenmp -fopenmp-enable-irbuilder -...
sgm.h
#ifndef RECONSTRUCTION_BASE_SEMI_GLOBAL_MATCHING_ #define RECONSTRUCTION_BASE_SEMI_GLOBAL_MATCHING_ #include <iostream> #include <fstream> #include <cassert> #include <Eigen/Core> #include <Eigen/StdVector> #include <opencv2/core/core.hpp> //#define COST_CENSUS //#define COST_ZSAD #define COST_CNN namespace recon {...
GB_bitmap_select_template.c
//------------------------------------------------------------------------------ // GB_bitmap_select_template: C=select(A,thunk) if A is bitmap or full //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...