source
stringlengths
3
92
c
stringlengths
26
2.25M
DECADES_decoupled.h
#pragma once #include "DECADES.h" __attribute__((noinline)) extern "C" void compute_exclusive_store(int *addr, int value) { *addr = value; } __attribute__((noinline)) extern "C" int compute_exclusive_fetch_add(int *addr, int value) { int ret; #pragma omp atomic capture { ret = addr[0]; addr[0] += val...
nontemporal-2.c
/* { dg-do compile } */ #define N 1024 extern int a[N], b[N], c[N], d[N]; void foo (void) { int i; #pragma omp simd nontemporal (a, b) aligned (a, b, c) for (i = 0; i < N; ++i) a[i] = b[i] + c[i]; #pragma omp simd nontemporal (d) nontemporal (d) /* { dg-error "'d' appears more than once in 'nontemporal' c...
Normalize.c
#include "Python.h" #include "numpy/arrayobject.h" #include <fcntl.h> #include <it/math.h> #include <it/types.h> #include <omp.h> #define VERSION "0.1" int compare_doubles(const void *a, const void *b) { double x, y; x = *(double *)a; y = *(double *)b; if(x > y) return 1; else if(x < y) ...
GB_unop__minv_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...
GB_convert_full_to_sparse.c
//------------------------------------------------------------------------------ // GB_convert_full_to_sparse: convert a matrix from full to sparse //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
modifier_view.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
mansoo_mat.h
#pragma once #include <iostream> #include <stdlib.h> #include <time.h> #include <omp.h> template <typename T> class MSMat { public: MSMat(int size); ~MSMat(); bool set(std::uint16_t row, std::uint16_t col, T value); bool mul(MSMat<T> &a, MSMat<T> &b); bool mul_using_mp(MSMat<T> &a, MSMat<T> &b...
TimeCluster.h
/****************************************************************************** ** Copyright (c) 2015, Intel Corporation ** ** All rights reserved. ** ** ** ...
VerletClusterLists.h
/** * @file VerletClusterLists.h * @author nguyen * @date 14.10.18 */ #pragma once #include <cmath> #include "autopas/cells/FullParticleCell.h" #include "autopas/containers/CellBasedParticleContainer.h" #include "autopas/containers/CompatibleTraversals.h" #include "autopas/containers/ParticleDeletedObserver.h" #...
make_general_basis.h
#ifndef _MAKE_GENERAL_BASIS_H #define _MAKE_GENERAL_BASIS_H #include <iostream> #include "general_basis_core.h" #include "numpy/ndarraytypes.h" #include "openmp.h" #include "misc.h" #include <cmath> #include <cfloat> #include <vector> #include <utility> #include <algorithm> #include <functional> namespace basis_gen...
line_search_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
gimple.h
/* Gimple IR definitions. Copyright (C) 2007-2013 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundati...
flexFullMatrix.h
#ifndef flexFullMatrix_H #define flexFullMatrix_H #include "flexLinearOperator.h" #include <vector> //! represents a full (non-CUDA) matrix template<typename T> class flexFullMatrix : public flexLinearOperator<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> Tdata; #else typedef std::vector<T> Tdata; #endi...
api.c
// RUN: %libomptarget-compile-run-and-check-generic // XFAIL: nvptx64-nvidia-cuda // XFAIL: nvptx64-nvidia-cuda // XFAIL: nvptx64-nvidia-cuda-newDriver // Fails on amdgpu with error: GPU Memory Error // XFAIL: amdgcn-amd-amdhsa // XFAIL: amdgcn-amd-amdhsa-newDriver #include <stdio.h> #include <omp.h> // ------------...
dsblock5.c
/* Begin dsblock5.c */ /* File version: 1.4, 1998-03-20 */ /* * Copyright (C) 1997-2001 Dynasim AB. * All rights reserved. * */ } #undef externalTable_ #ifdef NBR_TASKS DYMOLA_STATIC int nbrTasks_=NBR_TASKS; #else DYMOLA_STATIC int nbrTasks_=0; #endif #if !defined(DYMOLA_DSPACE) DYMOLA_STATIC double DymolaSt...
roi_align.c
#include <TH/TH.h> #include <math.h> #include <omp.h> void ROIAlignForwardCpu(const float* bottom_data, const float spatial_scale, const int num_rois, const int height, const int width, const int channels, const int aligned_height, const int aligned_width, const float * botto...
computeGraph.c
#include "defs.h" double computeGraph(graph* G, graphSDG* SDGdata) { VERT_T* endV; LONG_T *degree, *numEdges, *pos, *pSums; WEIGHT_T* w; double elapsed_time; #ifdef _OPENMP omp_lock_t *vLock; LONG_T chunkSize; #endif elapsed_time = get_seconds(); #ifdef _OPENMP omp_set_num_threads(N...
vla_crash.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ // RUN: %clang_cc1 -verify -triple powerpc64le-unk...
convolutiondepthwise_3x3_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 ...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "omp.h" #include "functions.h" int main (int argc, char **argv) { int Nthreads = 1; omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will make your program run...
shared_private_default.c
// OpenMP Shared/Private/Default Example #include <omp.h> #include <stdio.h> #include <stdlib.h> int main( int argc, char* argv[ ] ) { int id = 0; int i = 0; int m = 0; int x = 2; #pragma omp parallel private( id, i ) shared( m ) \ default( shared ) { id = omp_get_thread_...
convolution_5x5_pack8_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
DRB060-matrixmultiply-orig-no.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...
GB_hcat_slice.c
//------------------------------------------------------------------------------ // GB_hcat_slice: horizontal concatenation of the slices of C //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suite...
1.norace9.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp parallel for schedule(dynamic, 4) for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i][j - 1]; } // CHECK: Region is Data Race Free. // END
core_slaset.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/core_blas/core_zlaset.c, normal z -> s, Fri Sep 28 17:38:22 2018 * **/ #include <plasma_core_blas.h> #include "pla...
pi.c
#include <err.h> #include <stdio.h> #include <stdlib.h> #ifdef WITH_MPI #include <mpi.h> #endif #ifdef _OPENMP #include <omp.h> #endif typedef struct { long n; int is_verbose; } Params; Params get_params(int argc, char *argv[]); double *compute_limits(); double partial_pi(double left, double right, Params *pa...
utils.c
// Copyright (c) 2015, UChicago Argonne, LLC. All rights reserved. // Copyright 2015. UChicago Argonne, LLC. This software was produced // under U.S. Government contract DE-AC02-06CH11357 for Argonne National // Laboratory (ANL), which is operated by UChicago Argonne, LLC for the // U.S. Department of Energy. The U.S....
GeometryConverterOCC.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 ...
original.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...
singleModificado.c
#include <stdio.h> #include <omp.h> main() { int n = 9, i, a, b[n]; for (i=0; i<n; i++) b[i] = -1; #pragma omp parallel { #pragma omp single { printf("Introduce valor de inicialización a: "); scanf("%d", &a ); printf("Single 1 ejecutada por el thread %d\n", omp_get_thread_num()); ...
SoftMax.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SoftMax.c" #else #ifdef _MSC_VER #define SOFTMAX_SIZE_TYPE int64_t #define SOFTMAX_CAST_TYPE (int64_t) #else #define SOFTMAX_SIZE_TYPE uint64_t #define SOFTMAX_CAST_TYPE #endif void THNN_(SoftMax_updateOutput)( THNNState *state, THTe...
delete_inf_refcount.c
// RUN: %libomptarget-compile-run-and-check-generic #include <stdio.h> #include <omp.h> #pragma omp declare target int isHost; #pragma omp end declare target int main(void) { isHost = -1; #pragma omp target enter data map(to: isHost) #pragma omp target { isHost = omp_is_initial_device(); } #pragma omp target u...
invert.c
/* Copyright 2016. The Regents of the University of California. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2016 Jon Tamir <jtamir@eecs.berkeley.edu> */ #include <stdlib.h> #include <assert.h> #include <complex.h> #i...
IJMatrix_parcsr.c
/****************************************************************************** * Copyright (c) 1998 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) ***************************************...
GB_binop__iseq_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_workshare3.c
/* { dg-do compile } */ /****************************************************************************** * OpenMP Example - Combined Parallel Loop Work-sharing - C/C++ Version * FILE: omp_workshare3.c * DESCRIPTION: * This example attempts to show use of the parallel for construct. However * it will generate error...
main.c
/* All changes to code are copyright, 2017, Jenniffer Estrada, jmestrada@unm.edu Research projects -- UNM and Jenniffer Estrada */ #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <omp.h> #define PI 3.14159265 typedef enum { FILTER_AVG, FILTER_GAUSS } filter_type; typedef ...
GB_unop__log10_fc64_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_binop__bxor_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_binop__second_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
5_for-par0.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> void inicializa(int **v, int size) { (*v) = (int *) malloc(sizeof(int)*size); for (int i = 0; i < size; i++) { (*v)[i] = rand() % 10000; } } float square(int x){ int k = 0; while(k < 5000) k++; return sqrt(x);...
real_self_energy.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
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) #...
bigtext.h
#ifndef AAALGO_BIGTEXT #define AAALGO_BIGTEXT #include <errno.h> #include <string.h> #include <iostream> #include <functional> #include <vector> #include <string> #include <utility> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <boost/progress.hpp> #include <boost/assert.hpp> #include <fcnt...
GB_binop__lt_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
matrix_stat.h
#ifndef MATRIX_STAT_H_ #define MATRIX_STAT_H_ #include <vector> #include <algorithm> namespace acspo { template <typename T> double sum(const matrix<T> &mat) { unsigned int elem = mat.elem(); unsigned int count = 0; double ret = 0; #pragma omp parallel for reduction(+:ret,count) for (unsigned int...
a.36.1.c
/* { dg-do run } */ #include <omp.h> #include <stdlib.h> void do_by_16 (float *x, int iam, int ipoints) { } void a36 (float *x, int npoints) { int iam, ipoints; omp_set_dynamic (0); omp_set_num_threads (16); #pragma omp parallel shared(x, npoints) private(iam, ipoints) { if (omp_get_num_threads () != 16) ...
OnDiscMSExperiment.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
ZQ_FaceIDPrecisionEvaluation.h
#ifndef _ZQ_FACEID_PRECISION_EVALUATION_H_ #define _ZQ_FACEID_PRECISION_EVALUATION_H_ #pragma once #include "ZQ_FaceRecognizer.h" #include "ZQ_FaceFeature.h" #include "ZQ_MathBase.h" #include "ZQ_MergeSort.h" #include <opencv2\opencv.hpp> #include <vector> #include <stdlib.h> #include <string> #include <omp.h> namespac...
callback.h
#ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif #include <stdio.h> #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <inttypes.h> #include <omp.h> #include <omp-tools.h> #include "ompt-signal.h" // Used to detect architecture #include "../.....
rose_matrixmultiply.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #define N 1000 #define M 1000 #define K 1000 #include "omp.h" int i; int j; int k; double a[1000][1000]; double b[1000][1000]; double c[1000][1000]; int mmm() { //#pragma omp parallel for private(i,j,k) shared(a,b,c) #pragma omp parallel for private (i,j,k) ...
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...
convolution_sgemm_pack4to1.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 ...
MiniBow2.h
/** * Original File: TemplatedVocabulary.h * Original Author: Dorian Galvez-Lopez * * Modified by: Darius Rückert * Modifications: * - Moved everything into this single header file * - Removed support for non-ORB feature descriptors * - Optimized loading, saving, matching * - Removed dependency to opencv ...
PatchSelect_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC and Diamond Light Source Ltd. * * Copyright 2017 Daniil Kazantsev * Copyright 2017 Srikanth Nagella, Edoardo Pasca * Copyright 2018 Diamond Light Sourc...
DRB042-3mm-tile-no.c
/** * 3mm.c: This file is part of the PolyBench/C 3.2 test suite. * with tiling 16x16 and nested SIMD * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include "omprace.h" #include <omp.h> #include <stdio.h> #include <un...
GB_binop__lxor_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-...
dynwave.c
//----------------------------------------------------------------------------- // dynwave.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/20/14 (5.1.001) // 03/28/14 (5.1.002) // 09/15/14 (5.1.007) // 03/19/15 (5.1.008) // 08/01/16 (5.1.011...
debug_private.c
// This testcase checks emission of debug info for variables inside // private/firstprivate/lastprivate. // REQUIRES: x86_64-linux // RUN: %clang_cc1 -debug-info-kind=constructor -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics // CHECK: define internal i...
pdgstrs_lsum.c
/*! \file Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) All rights reserved. The source code is distributed under BSD license, see the file License.txt at the top-level directory. ...
blockchain.c
/********************************************************************* Homework 5 CS 110: Computer Architecture, Spring 2021 ShanghaiTech University * Last Modified: 03/28/2021 *********************************************************************/ #include "blockchain.h" #include <stdlib.h> #include <string.h> #inclu...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
array_swap.c
#include<stdio.h> #include<omp.h> #include<stdlib.h> int main(int argc, char* argv[]) { int i, temp, n=5; int a[5] = {1, 2, 3, 4, 5}; int b[5] = {6, 7, 8, 9, 10}; #pragma omp parallel for private(temp) for (i=0;i<n;i++) { temp = a[i]; a[i] = b[i]; b[i] = temp; } prin...
DRB016-outputdep-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...
cones.c
#include "cones.h" #include "linalg.h" #include "scs.h" #include "scs_blas.h" /* contains BLAS(X) macros and type info */ #include "util.h" #define CONE_TOL (1e-9) #define CONE_THRESH (1e-8) #define EXP_CONE_MAX_ITERS (100) #define BOX_CONE_MAX_ITERS (25) #define POW_CONE_MAX_ITERS (20) /* In the box cone projection ...
WaveFunctionComponent.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Ken Esler...
opencl_geli_fmt_plug.c
/* * This software is Copyright (c) 2017 Dhiru Kholia, Copyright (c) 2012-2013 * Lukas Odzioba, Copyright (c) 2014 JimF, Copyright (c) 2014 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, ar...
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...
NeuralNet-OpenMP.c
/* Author: Makarios Christakis Description: Feedforward multi layer neural network implementation, parallelized for CPUs using the OpenMP API. Trained using the MNIST fashion dataset, after normalising the pixel values and initialising the neuron weights from a standard normal distribution. ...
professor_challenge_optmized.c
/* The number of primes up to 600000 is 49098 and took it 39s to solve it in parallel and 40s sequential */ #include <stdlib.h> #include <stdio.h> #include <time.h> #include <math.h> #include <omp.h> static const unsigned int verify_subdomain(const unsigned int start, const unsigned int chunck) { unsigned int i = ...
declare_variant_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s // expected-no-diagnostics int foo(void); #pragma omp declare variant(foo) match(xxx={}, yyy={ccc}) #pr...
ast-dump-openmp-for-simd.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 for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp for simd for (int i = 0; i < x; i++) f...
GB_binop__times_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
diagsm_x_bsr_u_col.c
#include "alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { const ALPHA_INT num_thread = alpha_g...
merge_sect_unnested.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> /* OpenMP Parallel Mergesort - Sections * * @author: ANDREW VAILLANCOURT * 2019 */ void merge(int a[], int size, int temp[]); void insertion_sort(int a[], int size); void mergesort_serial(int a[], int size, int temp[], int thresh); ...
5987.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...
modernFft.h
/** * @cond ___LICENSE___ * * Copyright (c) 2016-2018 Zefiros Software. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
softmax_ref.c
/* * 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 ma...
common.c
#include "common.h" void printb(const uint64_t v) { uint64_t mask = 0x1ULL << (sizeof(v) * CHAR_BIT - 1); int sum = 0; do{ putchar(mask & v ? '1' : '0'); sum++; if(sum%8==0) putchar(','); } while (mask >>= 1); } void create_adjacency(const int nodes, const int lines, const int degree, ...
alm2map_pol_der1.h
#ifndef _POLDER_H_ #define _POLDER_H_ #include <vector> #include "alm.h" #include "arr.h" // #include "fftpack_support.h" // #include "ylmgen.h" #include "healpix_map.h" #include "xcomplex.h" #ifndef DBL_MAX #define DBL_MAX 1.7976931348623158e+308 #endif #define SMAXCHK 50 // maximum size of chunk (in number of ...
updater_basemaker-inl.h
/*! * Copyright 2014 by Contributors * \file updater_basemaker-inl.h * \brief implement a common tree constructor * \author Tianqi Chen */ #ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #include <xgboost/base.h> #include <xgboost/tree_updater.h> #include <vector> #incl...
cpoinv.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/zpoinv.c, normal z -> c, Fri Sep 28 17:38:09 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
omp_dem_search.h
// // Project Name: Kratos // Last Modified by: $Author: clabra $ // Date: $Date: 2007-03-29 19:37:47 $ // Revision: $Revision: 1.2 $ // // #if !defined(KRATOS_OMP_DEM_SEARCH_H_INCLUDED ) #define KRATOS_OMP_DEM_SEARCH_H_INCLUDED // System includes #include <string> #includ...
option_warn.c
// RUN: %clang_cc1 -verify -Wsource-uses-openmp -o - %s // RUN: %clang_cc1 -verify -Wsource-uses-openmp -o - %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} int a; #pragma omp threadprivate(a,b) // expected-warning {{unexpected '#pragma omp ...' in program}} #pragma omp parallel
CSRPlus.c
// --------------------------------------------------------------- // @brief : CSRPlus matrix implementation file // @author : Hua Huang <huangh223@gatech.edu> // Edmond Chow <echow@cc.gatech.edu> // // Copyright (c) 2017-2020 Georgia Institute of Technology // -----------------------------...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__identity_uint32_uint64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_binop__eq_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-...
DRB010-lastprivatemissing-var-yes.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...
GB_binop__second_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-...
integration.c
#include <stdio.h> #include <omp.h> #define N 10000 double f(double x) { return 4. / (1. + x * x); } int main() { double a = 0., b = 1., h = (b - a) / N, sum = 0.; #pragma omp parallel for reduction(+:sum) for (int i = 1; i < N; ++i) { sum += f(a + i * h); } printf("%f\n", (sum + 3.) * h); ...
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. // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in...
openmp.c
#include<omp.h> double dot(double* a, double* b, long N){ double s = 0.0; #pragma omp parallel for reduction(+: s) for(long n = 0; n < N; n++){ s += a[n]*b[n]; } return s; } void cdot(double* c, double* a, double* b, long N){ double r = 0.0, i = 0.0; #pragma omp parallel for reduction(+: r, i) for...
matrix.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...
elastic_avx.h
//***************************************************************************** // Title : src/equation_avx/elastic_avx.h // Author : Tanabe Yuta // Date : 2021/02/13 // Copyright : (C)2021 TanabeYuta //***************************************************************************** #pragm...
DRB024-simdtruedep-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...
GB_binop__ge_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
ligra.h
// This code is part of the project "Ligra: A Lightweight Graph Processing // Framework for Shared Memory", presented at Principles and Practice of // Parallel Programming, 2013. // Copyright (c) 2013 Julian Shun and Guy Blelloch // // Permission is hereby granted, free of charge, to any person obtaining a // copy of ...
threadpool.h
/* Copyright 2015 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...