source
stringlengths
3
92
c
stringlengths
26
2.25M
has-include-1.c
/* { dg-do preprocess } */ #if __has_include ("stdlib.h") #else #error error 1 #endif #if __has_include (<stdlib.h>) #else #error error 2 #endif #if !__has_include ("stdlib.h") #error error 3 #elif !__has_include (<stdlib.h>) #error error 4 #endif #if __has_include ("stdlib.h") && __has_include (<stdlib.h>) #else #err...
setup.c
/*! \file \brief Functions that deal with setting up the matrices \date Started 3/9/2015 \author George Karypis with contributions by Xia Ning, Athanasios N. Nikolakopoulos, Zeren Shui and Mohit Sharma. \author Copyright 2019, Regents of the University of Minnesota */ #include "slimlib.h" /************************...
AsynchronousGibbsSampler.h
#ifndef __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #define __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #include "../atomic/ConcurrentAtomicDomain.h" #include "../atomic/ProposalQueue.h" #include "../data_structures/Matrix.h" #include "../math/Math.h" #include "../math/VectorMath.h" #include "../math/MatrixMath.h" #i...
gimple.h
/* Gimple IR definitions. Copyright 2007, 2008, 2009 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 Found...
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. ...
3d7pt_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 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
3d7pt_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 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
core_spotrf.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_zpotrf.c, normal z -> s, Fri Sep 28 17:38:22 2018 * **/ #include <plasma_core_blas.h> #include "pla...
GB_unop__asinh_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
OnDiscMSExperiment.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
GB_unaryop__identity_uint64_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
kernel_ecc.h
#pragma omp declare target void kernel_ecc(const fp timeinst, const fp* initvalu, fp* finavalu, const int valu_offset, const fp* params){ //===================================================================== // VARIABLES //=========================================...
GB_unop__identity_uint16_int32.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...
reduction-clauseModificado3.c
/* * reduction-clause.c * * Created on: 09/04/2014 * Author: Carlos de la Torre */ #include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n = 20, a[n], suma = 10; if (argc < 2) { fprintf(stderr,"Falta...
GB_assign_zombie4.c
//------------------------------------------------------------------------------ // GB_assign_zombie4: delete entries in C(i,:) for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_binop__plus_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-...
ast-dump-openmp-begin-declare-variant_1.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s // expected-no-diagnostics int also_before(void) { return 0; } #pragma omp begin declare variant match(device={kin...
task-taskwait-nested.c
/* * task-taskwait-nested.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-except...
absval_hcl_arm.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...
GB_unop__lnot_int16_int16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
target-8.c
/* { dg-do run } */ void foo (int *p) { int i; #pragma omp parallel #pragma omp single #pragma omp target teams distribute parallel for map(p[0:24]) for (i = 0; i < 24; i++) p[i] = p[i] + 1; } int main () { int p[24], i; for (i = 0; i < 24; i++) p[i] = i; foo (p); for (i = 0; i < 24; i++) ...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
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. AL...
DenseMatrix.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseMatrix.h // \brief Header file for the OpenMP-based dense matrix SMP implementation // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of th...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nstream-memcpy-target.c
/// /// Copyright (c) 2019, Intel Corporation /// /// 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 ...
resource_manager.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
GB_dense_subassign_22_template.c
//------------------------------------------------------------------------------ // GB_dense_subassign_22_template: C += b where C is dense and b is a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. ...
SumaVectoresOMPfor.c
#include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se encuentra la función printf() #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif //#define PRINTF_ALL #define MAX 67108864 //=2^26 //#define MAX 4294967295 //=2^32-1 doub...
GB_unop__trunc_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...
hello_world_mpi_openmp.c
#include <stdio.h> #include <omp.h> #include "mpi.h" int main(int argc, char *argv[]) { int size, rank; // int namelen; // char processor_name[MPI_MAX_PROCESSOR_NAME]; int tid = 0; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); // MPI_Get_processor...
parallel-simple.c
/* * parallel-simple.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ...
shortpe.h
#ifndef SHORTPE_H #define SHORTPE_H #include <iostream> #include <fstream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graphviz.hpp> #include <boost/graph/connected_components.hpp> #include <boost/container/flat_set.hpp> #include <boost/unordered_map.hpp> #include <boost/program_options/cmdline.h...
elect_energy.c
/* --- File elect_energy.c --- */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> int main(int argc, char **argv) { struct timespec ts_start, ts_end; float time_total; int n = 60; /* number of atoms per side */ int n_charges = n * n * n; /* total number of charges */ float a = 0.5; /* l...
grid_basis.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_unop__identity_int64_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unaryop__abs_int8_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...
convolution_7x7.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 ...
GB_assign_zombie2.c
//------------------------------------------------------------------------------ // GB_assign_zombie2: delete all entries in C(i,:) for GB_assign //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://su...
no_omp_cpu.c
/* * Copyright (c) 2015 - 2021, Intel Corporation * * 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 condition...
HaloArray3D.h
/* ParSGCT Code source file. Copyright (c) 2015 Peter Edward Strazdins. All rights reserved. Licensed under the terms of the BSD License as described in the LICENSE_SGCT file. This comment must be retained in any redistributions of this source file. */ // Simple 3D (x,y) array with a halo class. // Storage is contig...
linalg.c
#include "linalg.h" #include <omp.h> #include <stdio.h> #include <stdlib.h> #define ELEMENT double ELEMENT squared_norm_of_diff(ELEMENT *vect_a, ELEMENT *vect_b, int size) { ELEMENT sum = 0, tmp = 0; for (int i = 0; i < size; i++) { tmp = vect_a[i] - vect_b[i]; sum += tmp * tmp; } ret...
isotope.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...
common.h
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h> #include <cstdio> #include <string> #include <vector> #include <sstream> #include <cstdint> #include <algorithm> #include <cmath> #include <functional> #include <memory>...
GB_reduce_each_vector.c
//------------------------------------------------------------------------------ // GB_reduce_each_vector: Tx(j)=reduce(A(:,j)), reduce a matrix to a vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. /...
sum.c
#include<stdio.h> #include<omp.h> int main(int argc, char *argv[]){ int nThreads = 4; omp_set_num_threads(nThreads); int n = 0; scanf("%d", &n); double sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0; double sum1P[nThreads]; double sum2P[nThreads]; for(int i = 0; i < nThreads+1; i++) sum1P[i] = sum2P[i] = 0; /* ...
BF_std.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2008,2010,2011,2013,2015 by Solar Designer * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUTELY NO WARRANTY, express or implied. * * A public domain vers...
1cfea_so4_gcc_advfsg.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; i...
convolutiondepthwise_3x3_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 copy ...
transformdyn-impl.h
//================================================================================== // BSD 2-Clause License // // Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors // // All rights reserved. // // Author TPOC: contact@openfhe.org // // Redistribution and use in source and binary forms, wi...
cf72ae4_prot.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double sect...
search_core.c
/* This is a rather cumbersome solution to two problems I have with OpenMP. 1) multiple threads and OpenMP don't mix on a Mac. It segfaults during the first openmp call. I want people to be able to use chemfp in multi-threaded environments, even with diminished performance, so the single thread version should not ...
lock-nested-unrelated.c
/* * lock-nested-unrelated.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exce...
prefix_sum.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) ***************************************...
blurtiles.c
#include <stdlib.h> #include "blurtiles.h" void blurtiles(float* l,int m,int n,float*output){ #pragma omp parallel for for (int H80 = 0; H80 < 1; H80++) { for (int H81 = 0; H81 < m; H81++) { float tmp2 = 0; float tmp3 = 0; if (0 <= H80 - (1)) { float tmp4 = 0; float tmp5 = 0; if (0 <= H81 - (1)...
GB_unop__bnot_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...
blas_wrappers.h
#ifndef __BLAS_WRAPPERS_H__ #define __BLAS_WRAPPERS_H__ #include <h2opus/core/h2opus_defs.h> #include <h2opus/core/h2opus_compute_stream.h> #ifdef H2OPUS_PROFILING_ENABLED #include <h2opus/util/perf_counter.h> #endif // n = norm(x, 2) template <class T, int hw> inline T blas_norm2(h2opusComputeStream_t stream, int n...
GB_add_template.c
//------------------------------------------------------------------------------ // GB_add_template: phase1 and phase2 for C=A+B, C<M>=A+B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitespa...
declare_reduction_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -emit-llvm %s -triple %itanium_abi_triple -o - -femit-all-decls -disable-llvm-passes | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple -emit-pch -o %t %s -femit-all-decls -disable-llvm-passes // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple ...
ast-dump-openmp-barrier.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(void) { #pragma omp barrier } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-barr...
GB_unaryop__abs_uint64_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
convolutiondepthwise_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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 ...
simd-5.c
/* { dg-do run } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #define N 128 #define M 16 #define EPS 0.0000000000000001 #define SAFELEN 16 #include <stdlib.h> void init(double a[N][N], double b[N][N], int n) { int i, j, s = -1; ...
rt_dsyrk.c
#include "runtime.h" #ifdef PLASMA_WITH_SMP #pragma omp target device (smp) copy_deps #pragma omp task in([lda*k]A) inout([ldc*n]C) label(dsyrk_n_smp) void CORE_dsyrk_ompss_n(PLASMA_enum uplo, PLASMA_enum trans, int n, int k, double alpha, double *A, int lda, double beta, double *C, int ldc, int nb) { CORE_dsyrk(uplo...
schelude-clause-ejercicio5.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main(int argc, char **argv) { int i, n = 16,chunk, a[n],suma=0,x; if(argc < 2) { fprintf(stderr,"\nFalta chunk \n"); exit(-1); } omp_sched_t kind;int modifier; omp_get_schedule(&kind, &modifier)...
blake2sp.c
/* BLAKE2 reference source code package - reference C implementations Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at your option. The terms of these licenses can be found at: - CC0 1.0 Universal :...
emd.h
// fix inttypes for GCC #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <cinttypes> // fix for the fix - it conflicts with numpy #undef __STDC_FORMAT_MACROS #include <cstdint> #include <cmath> #include <algorithm> #include <string> #include "cache.h" #include "graph/min_cost_flow.h" /*! @ma...
openmp-ex22.c
#include <stdio.h> #include <unistd.h> int main(void) { #pragma omp parallel { int i; char wait[BUFSIZ] = {'\0'}; /* Again, there is implicit synchronization at the end of a for directive */ #pragma omp for for (i = 0; i < 4; i++) { int j; for (j = 0; j < 4 * i; j++) wait[j] = ' '; ...
GB_unop__cosh_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...
RCCE_lib.h
// // Copyright 2010 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.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
independent_clusters.c
#define N 1000 #define NB_CLUSTERS 4 #define NB_PES 16 #define MIN(x, y) ((x) < (y) ? x : y) #include <stdio.h> /* Initialize an array between 2 given lines */ void init_array(int a[N][N]) { #pragma omp parallel for for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) a[i][j] = 2*i + 3*j; } void mult(...
reciprocal_to_normal.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...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
labeling_HT_CCL_Diaz2019_v1_2_0.h
// Copyright (c) 2020, the YACCLAB contributors, as // shown by the AUTHORS file, plus additional authors // listed below. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // // Additional Authors: // Fernando Diaz-del-Rio, Pablo Sanchez-Cu...
draw.c
#include "blocko.h" int is_framebuffer_incomplete() { int status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch (status) { case GL_FRAMEBUFFER_COMPLETE: return 0; case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: print...
LAGraph_matrix_extract_keep_dimensions.c
//------------------------------------------------------------------------------ // LAGraph_matrix_extract_keep_dimensions: extract submatrix but keep the // dimensions of the original matrix // ------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contribut...
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...
GB_unop__identity_fc64_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...
fft.c
/* * fft.c * * Code generation for function 'fft' * */ /* Include files */ #include "rt_nonfinite.h" #include "yaapt.h" #include "fft.h" #include "yaapt_emxutil.h" #include "eml_int_forloop_overflow_check.h" #include "yaapt_data.h" #include "blas.h" #include "lapacke.h" /* Variable Definitions */ static emlrtRSI...
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 // //===---------------------------...
source.c
#include <stdio.h> #include <stdint.h> #include <malloc.h> #include <string.h> #include <time.h> #include <omp.h> #include "aes.h" void readAllBytes(const char* file, uint8_t** buffer, uint64_t* length) { FILE* input = fopen(file, "rb"); if (!input) { printf("File not found!\n"); return; } fs...
mandelbrot.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <complex.h> #include <omp.h> #include "mlog/mlog.h" mlog_data_t g_md; int mandelbrot(double complex c, int depth) { int count = 0; double complex z = 0; for (int i = 0; i < depth; i++) { if (cabs(z) >= 2.0) { break; } z = z *...
reduction.c
#include <stdio.h> #include <omp.h> #define n 1000000 int main(int argc, char *argv[]) { int i, chunk; float a[n], b[n], result; chunk = 10; result = 0.0; for(i = 0; i < n; i++){ a[i] = i * 1.0; b[i] = i * 2.0; }; #pragma omp parallel for \ default(sha...
irbuilder_for_unsigned_auto.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -no-opaque-pointers -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected...
DRB001-antidep1-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_binop__le_int8.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_unaryop__identity_int32_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...
omp_whereami.c
#include <stdio.h> #include <omp.h> void load_cpu_nsec(int nsec); void omp_report_mask(); int map_to_cpuid( int icore); int main(){ int nthrds, thrd, cpuid; //Thread info int nsec = 10; // Load, default time int ierr; // Error number #pragma omp parallel private(thrd,ierr) { thrd = ...
array_args.h
#ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_ #define LIGHTGBM_UTILS_ARRAY_AGRS_H_ #include <vector> #include <algorithm> #include <LightGBM/utils/openmp_wrapper.h> namespace LightGBM { /*! * \brief Contains some operation for a array, e.g. ArgMax, TopK. */ template<typename VAL_T> class ArrayArgs { public: inline static s...
interpolate_op.h
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. 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...
dpado.202001060737.multiple_rounds_for_memory.h
// // Created by Zhen Peng on 1/6/20. // #ifndef PADO_DPADO_H #define PADO_DPADO_H #include <vector> //#include <unordered_map> #include <map> #include <algorithm> #include <iostream> #include <limits.h> //#include <xmmintrin.h> #include <immintrin.h> #include <bitset> #include <math.h> #include <fstream> #include <o...
GB_unaryop__ainv_int64_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...
symmetrize.c
// Modified from the coop package. Copyright (c) 2016-2017 Drew Schmidt #include <float/float32.h> #include <float/slapack.h> #include "../blocksize.h" #include "../unroll.h" // uplo: triangle to copy FROM, i.e. uplo=UPLO_L means copy lower to upper void float_symmetrize(const float_len_t uplo, const float_len_t n,...
naive_math_impl.h
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
GB_unaryop__lnot_int8_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
flush.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { #pragma omp parallel num_threads(2) { int tid = omp_get_thread_num(); #pragma omp flush print_current_address(); } // Check if libomp supports the callbacks for thi...
InsertionSort_OpenMP.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #define SIZE 2000 long array[SIZE]; double avg; void InsertionSort(int start, int end){ for (int i = start+1 ; i < end ; i++){ int temp = array[i]; int j = i; while (j > 0 && array[j-1] > temp){ array[j] = array[j...