source
stringlengths
3
92
c
stringlengths
26
2.25M
operator_tune-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 ...
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 o...
pr64734.c
/* PR middle-end/64734 */ #include <stdlib.h> void foo (int *x, int *y) { #pragma omp target map (alloc:x[0]) map (alloc:y[0:8]) { int i; for (i = 0; i < 8; i++) if (y[i] != 2 + i) break; if (i != 8 || *x != 1) *x = 6; else { *x = 8; for (i = 0; i < 8; i++) y[i] = 9 + i; ...
ast-dump-openmp-parallel.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() { #pragma omp parallel ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-par...
spmv_compiler_explorer.c
// TODO Mark regions #include <assert.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <omp.h> #include "../../support/matrix.h" #include "../../support/params.h" #include "../../support/timer.h" #include "../../support/utils.h" int main() { // Proc...
ccm.h
#pragma once #include <ctime> #include <deque> #include <queue> #include "hash.h" #include "update.h" #include "median.h" #include "compact_vector/compact_vector.hpp" #include "vec/vec.h" namespace sketch { inline namespace common { namespace detail { template<typename T1, unsigned int BITS, typename T2, typename A...
GB_unop__identity_uint8_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...
stencil_opt4.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "malloc2D.h" #include "timer.h" #define SWAP_PTR(xnew,xold,xtmp) (xtmp=xnew, xnew=xold, xold=xtmp) int main(int argc, char *argv[]) { #pragma omp parallel if (omp_get_thread_num() == 0) printf("Running with %d thread(s)\n",omp_get_num_threads(...
ZQ_BinaryImageProcessing.h
#ifndef _ZQ_BINARY_IMAGE_PROCESSING_H_ #define _ZQ_BINARY_IMAGE_PROCESSING_H_ #pragma once #include <string.h> #include <stdlib.h> #include <vector> #ifdef ZQLIB_USE_OPENMP #include <omp.h> #endif namespace ZQ { class ZQ_BinaryImageProcessing { public: static bool Dilate(const bool* input, bool* output, int width...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
DenseSegment.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
scalar_product.h
//============================================================================== // // Copyright 2018 The InsideLoop 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 Lic...
zlascl.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
omp.c
#include "shared.h" void update_velocity(struct Body *bodies) { //F = GmM/r^2 //a = Gm/r^2 m is mass of the other, our mass cancels //r^2 = distance^2 //distance = sqrt(x^2 + y^2 + z^2) //r^2 = x^2 + y^2 + z^2 fptype r2, new_mass; int i,j; #pragma omp parallel for private(new_mass, r2, j) f...
region_layer.c
#include "region_layer.h" #include "activations.h" #include "blas.h" #include "box.h" #include "cuda.h" #include "utils.h" #include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h> #define DOABS 1 region_layer make_region_layer(int batch, int w, int h, int n, int classes, int coords, int max_boxe...
calculate_discontinuous_distance_to_skin_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pooyan Dadvand // ...
inv_power.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdint.h> #include <math.h> #include "nb/memory_bot.h" #include "nb/solver_bot.h" #include "../sparse_struct.h" #define POW2(a) ((a)*(a)) int nb_sparse_eigen_ipower(const nb_sparse_t *const A, nb_solver_t solver, int h, double mu, ...
uct.c
/* Heuristic UCT-RAVE implementation. With RAVE and criticality. Playout is limited with dynamic offset depending on stone count. Cutoff playouts are rated. Playouts are cut short with a mercy threshold (like pachi, orego and others). Initilizes expanded states with prior values. Last-good-reply with forgetting (LGRF1...
pca_elkan_kmeans.c
#include "pca_elkan_kmeans.h" #include "kmeans_utils.h" #include "../../utils/matrix/csr_matrix/csr_to_vector_list.h" #include "../../utils/matrix/vector_list/vector_list_math.h" #include "../../utils/matrix/csr_matrix/csr_math.h" #include "../../utils/vector/common/common_vector_math.h" #include "../../utils/vector/s...
GB_sparse_add_template.c
//------------------------------------------------------------------------------ // GB_sparse_add_template: C=A+B, C<M>=A+B when C is sparse/hypersparse //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // S...
critical_flet.h
/*++ Copyright (c) 2011 Microsoft Corporation Module Name: critical flet.cpp Abstract: Version of flet using "omp critical" directive. Warning: it uses omp critical section "critical_flet" Author: Leonardo de Moura (leonardo) 2011-05-12 Revision History: --*/ #ifndef CRITICAL_FLET_H_ #defin...
GB_binop__iseq_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
BKTree.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_BKTREE_H_ #define _SPTAG_COMMON_BKTREE_H_ #include <stack> #include <string> #include <vector> #include <shared_mutex> #include "../VectorIndex.h" #include "CommonUtils.h" #include "QueryResultSet.h...
utils.h
#ifdef HAVE_CONFIG_H #include <config.h> #endif #include <assert.h> #include "pixman-private.h" /* For 'inline' definition */ #include "utils-prng.h" #if defined(_MSC_VER) #define snprintf _snprintf #define strcasecmp _stricmp #endif #define ARRAY_LENGTH(A) ((int) (sizeof (A) / sizeof ((A) [0]))) /* A primitive pse...
J1OrbitalSoA.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: // // Fil...
declare_reduction_messages.c
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s int temp; // expected-note 6 {{'temp' declared here}} #pragma omp declare reduction // expected-error {{expected '(' after 'declare reduction'}} #pragma ...
gimple-pretty-print.c
/* Pretty formatting of GIMPLE statements and expressions. Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> and Diego Novillo <dnovillo@google.com> This file is part of GCC. GCC is free software; you can redi...
hello.c
#include <stdio.h> #include <omp.h> int main (void) { int nthreads, tid; #pragma omp parallel private(tid) { tid = omp_get_thread_num(); printf("Hello OpenMP from thread %d\n", tid); if (tid == 0) { // main thread nthreads = omp_get_num_threads(); printf("nthreads = %d\n", nthreads); } } return ...
convolution_sgemm_packn.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 ...
rawBLAKE2_512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2012 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. * * Re-used for BLAKE2 by Dhiru Kholia (dhiru at openwall.com) */ #if FMT_EXTERNS_H extern struct fmt_main fmt_rawBLAKE2; #elif FMT_REGISTERS_H john_re...
GB_unop__identity_uint32_int64.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...
blackscholes.c
#include "bullmoose.c" // Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, // Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string....
pooling_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_binop__gt_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
1.hello.c
#include <stdio.h> #include <omp.h> /* Q1: How many times will you see the "Hello world!" */ /* message if the program is executed with "./1.hello"? */ /* Q2: Without changing the program, how to make it to */ /* print 4 times the "Hello World!" message? */ int main () { #pra...
feature_group.h
/*! * Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for * license information. */ #ifndef LIGHTGBM_FEATURE_GROUP_H_ #define LIGHTGBM_FEATURE_GROUP_H_ #include <LightGBM/bin.h> #include <LightGBM/meta.h> #include <LightGBM/utils...
DRB030-truedep1-var-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...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB030-truedep1-var-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_unop__exp2_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...
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...
GB_binop__minus_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
hsa-gen.c
/* A pass for lowering gimple to HSAIL Copyright (C) 2013-2020 Free Software Foundation, Inc. Contributed by Martin Jambor <mjambor@suse.cz> and Martin Liska <mliska@suse.cz>. 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 Li...
loss.h
#ifndef LOSS_H #define LOSS_H #include "data.h" #define VECM Vector<typename M::value_type> enum loss_t { SQUARE, LOGISTIC, HINGE, SQHINGE, SAFE_LOGISTIC, MULTI_LOGISTIC, PPA, INCORRECT_LOSS }; static bool is_loss_for_matrices(const loss_t& loss) { return loss==SQUARE || loss==MULTI_LOGISTIC; } static bool is_...
convolution_1x1.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 ...
motif_base.h
// This code is modified from AutoMine and GraphZero // Daniel Mawhirter and Bo Wu. SOSP 2019. // AutoMine: Harmonizing High-Level Abstraction and High Performance for Graph Mining // Please do not copy or distribute without permission of the author void automine_3motif(Graph &g, std::vector<std::vector<uint64_t>> &gl...
cluster.c
/** Edited by: Shuai Che, David Tarjan, Sang-Ha Lee **/ /** University of Virginia **/ /** **/ /** Description: No longer supports fuzzy c-means clustering; **/ /** only regular k-means clustering. **/ /** No longer performs "validity" function to analyze **/ /** c...
box2d2r.c
#define BENCH_DIM 2 #define BENCH_FPP 49 #define BENCH_RAD 2 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize] = (SB_TYPE (*)[dimsize][dimsize])A1; ...
GB_unaryop__ainv_int16_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
adlm_sparse.h
#ifndef __LDA_ADLMSparse #define __LDA_ADLMSparse #include "concurrent_matrix.h" #include "publisher_subscriber.h" #include "types.h" #include "cva.h" #include "xorshift.h" #include "sort.h" #include <omp.h> #include "thread_local.h" #include <thread> #include "clock.h" // TODO: make the period of sync tunable // Asyn...
rom_residuals_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: RAUL BRAVO // #if !defined( ROM_RESIDUALS_UTI...
bml_transpose_ellpack_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_parallel.h" #include "../bml_transpose.h" #include "../bml_types.h" #include "bml_allocate_ellpack.h" #include "bml_transpose_ellpack.h" #include "bml_types_ellpack.h" #include <complex.h> #include <math.h> #include <stdli...
GB_binop__lxor_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:...
rose_v1_plusAssign.c
#include <omp.h> int main(int argc,char *argv[]) { int i; int j; double a[20][20]; // memset(a,0,(sizeof(a))); for (i = 0; i <= 18; i += 1) { #pragma omp parallel for private (j) for (j = 0; j <= 19; j += 1) { a[i][j] += a[i + 1][j]; } } return 0; }
GB_unop__ainv_uint32_uint32.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_unaryop__ainv_fp32_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...
task_dep_iterator1.c
#include <stdio.h> int main() { int x = 1; #pragma omp parallel #pragma omp single { #pragma omp task shared(x) depend(iterator ( int a=1:100:2 , b=1:50:6 , double c=1:100 ) , out : x) x = 2; #pragma omp task shared(x) depend(in : x) printf("x = %d\n",x); } return 0; }
descriptors_dt.h
/* Copyright (c) 2012, MAURO BIANCO, UGO VARETTO, SWISS NATIONAL SUPERCOMPUTING CENTRE (CSCS) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above c...
csr_matop.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322. * This file is part of AMG. See files READ...
bloom_multi_thread.c
#include <stdlib.h> #include <stdio.h> #include "../src/bloom.h" #include "timing.h" /* URL: https://github.com/barrust/timing-c */ #include <omp.h> #define SIZE 100000000 int main() { printf("Testing BloomFilter version %s\n\n", bloom_filter_get_version()); int THREADS = 1; #if defined (_OPENMP) p...
ofmo-init-dens.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <mpi.h> #ifdef _OPENMP #include <omp.h> #else #include "omp-dummy.h" #endif #include "ofmo-def.h" #include "ofmo-data.h" #include "ofmo-integ.h" #include "ofmo-scf.h" #include "ofmo-mat.h" #ifdef DEBUG_MODE extern FILE *fp_debug; #endif static doub...
GB_to_hyper.c
//------------------------------------------------------------------------------ // GB_to_hyper: convert a matrix to hyperspasre //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com S...
DFTW_omp.c
// the code calculates a DFT of a random complex number input and // then an IDFT. The IDFT result should be the input vector // to compile with gcc // gcc -Wall -O2 -fopenmp -o DFTW DFTW.c -lm // written by stef // exercise #include "stdio.h" // printf #include "stdlib.h" // malloc and r...
mxEvaluateSurfValue.c
#ifdef _OPENMP #include <omp.h> #endif #include "mex.h" #include "blas.h" #define NRHS 4 #define NLHS 2 // #define DEBUG void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { /* check input & output */ if (nrhs != NRHS) { mexPrintf("Matlab:%s:InvalidNumberInput,\n", __FILE__); m...
ast-dump-openmp-target-teams-distribute-parallel-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 target teams distribute parallel for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target team...
singleModificado.c
#include <stdio.h> #include <omp.h> int main(int argc, char ** argv) { 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 ejecutada por el thread %d\n", omp_...
openmp_wrapper.h
/*! * Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_ #ifdef _OPENMP #include <LightGBM/utils/log.h> #include <omp.h> #include <e...
utils.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef _OPENMP #include <omp.h> #endif #if USE_MPI #include <mpi.h> #endif #include "graph.h" #define PQSORT_SWAP(a, b, size) \ do \ { \ register size_t __size = (size); \ register char *__a = (a), ...
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...
c-typeck.c
/* Build expressions with type checking for C compiler. Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, o...
GB_binop__second_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...
inputBug342.c
/* -rose:C_only does not work! */ int main(void) { int i,j; #pragma omp for for (i=0;i<10;i++) j=0; return 0; }
reduction-15.c
extern void abort (void); int a[16], b[16], c[16], d[5][2]; __attribute__((noinline, noclone)) void foo (int x, int y) { int i; #pragma omp for schedule (static, 1) reduction (+:a[:3]) for (i = 0; i < 64; i++) { a[0] += i; a[1] += 2 * i; a[2] += 3 * i; } #pragma omp for schedule (guid...
DRB062-matrixvector2-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...
cg.c
struct __sFILEX ; int printf(const char *restrict , ...); void exit(int ); extern double fabs(double ); extern double pow(double , double ); extern double sqrt(double ); typedef int boolean; extern double randlc(double *, double ); extern void timer_clear(int ); extern void timer_start(int ); extern void timer_stop(int...
kmp.c
/* * author: alessandro bitocchi */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #ifdef _OPENMP # include <omp.h> #endif #include "../lib/include/reader.h" int KMPSearch(char *P, char *S); void computeLPSArray(char* pat, int M, int* lps); int main(int argc, char** argv){ struc...
main-brisbane.c
/*************************************************************************** *cr *cr (C) Copyright 2010 The Board of Trustees of the *cr University of Illinois *cr All Rights Reserved *cr *******************************************************************...
reduction_1.c
#include<omp.h> #include<stdio.h> int main(){ if (omp_get_num_threads() == 1) { omp_set_num_threads(4); } int a[10],b[10]; for(int j=0;j<10;j++){ a[j]=j+1; b[j]=j+1; } int i=0; int sum=0; #pragma omp parallel for reduction(+:sum) for(i=0;i<10;i++){ sum=sum+a[i]+b[i]; printf("%d\n", ...
GB_unop__identity_fp32_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...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
bml_allocate_ellsort_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_types.h" #include "bml_allocate_ellsort.h" #include "bml_types_ellsort.h" #include <complex.h> #include <math.h> #include <stdlib.h> #include <string.h> #ifdef _OPENMP #include <omp.h> #endif /** Clear a matrix. * * Nu...
ex1b.c
#include <stdio.h> #include <omp.h> int main() { #pragma omp parallel { int ID = omp_get_thread_num(); printf("hello(%d)", ID); printf(" world(%d) \n", ID); } }
prime0.c
#include <stdio.h> #define LEFT 30000000 #define RIGHT 30000200 int main() { int i, j; int mark; #pragma omp parallel for private(j, mark) for (i=LEFT;i<=RIGHT;++i) { mark=1; for (j=2;j<i/2;++j) { if (i%j==0) { mark=0; break; } } if (mark==1) { printf("%d is a prime\n...
valid.res1.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_64_112_112_3_7_7.h" #include "gen_ukr_A4B2gemm_1_64_112_112_3_7_7.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 112; int Ny = 112; int Nh = 7; long long...
GB_unop__identity_uint8_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
munit.c
/* Copyright (c) 2013-2018 Evan Nemerson <evan@nemerson.com> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy...
Par-06-OmpParallelNestedForLoops.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {0, 0, 0, 0}; #pragma omp parallel { #pragma omp for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; #pragma omp for for (int j = 0; j < 4; ++j) { b[j] = b[j] + a[i]; } } } return 0; }
mpi_cpd.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "../splatt_mpi.h" #include "../kruskal.h" #include "../mttkrp.h" #include "../timer.h" #include "../thd_info.h" #include "../tile.h" #incl...
BFSFriends.h
#ifndef _BFS_FRIENDS_H_ #define _BFS_FRIENDS_H_ #include "mpi.h" #include <iostream> #include "SpParMat.h" #include "SpParHelper.h" #include "MPIType.h" #include "Friends.h" #include "OptBuf.h" #include "ParFriends.h" #include "SpImplNoSR.h" #include "BitMap.h" #include "BitMapCarousel.h" #include "BitMapFringe.h" us...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nmt_master_flat.c
#include "utils.h" static void purify_generic_flat(nmt_field_flat *fl,flouble *mask,fcomplex **walm0,flouble **maps_in,fcomplex **alms_out) { if(fl->pure_b || fl->pure_e) { nmt_purify_flat(fl,mask,walm0,maps_in,maps_in,alms_out); } else { int im1; for(im1=0;im1<fl->nmaps;im1++) fs_map_product(f...
convolutiondepthwise_5x5_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 ...
lapl_ss.c
#include <xmmintrin.h> #include "defs.h" /* * Convert to super-site packed format */ void to_supersite(supersite *ssarr, float *arr) { for(int y=0; y<Ly; y++) for(int x=0; x<Lx/4; x++) { int vv = x + (Lx/4)*y; int v = x + (Lx)*y; ssarr[vv].site4[0] = arr[v+0*Lx/4]; ssarr[vv].site4[1] = ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRACC_OMP_017_Counter_wrong_lock_Inter_yes.c
/* Concurrent access on a counter with the wrong lock, by utilising OpenMP Lock Routines. Atomicity Violation. Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams. Although they are able to interrupt eachother leading to a wrong result. Inter Region. */ #inclu...
GB_unop__identity_fp32_int64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_split_bitmap_template.c
//------------------------------------------------------------------------------ // GB_split_bitmap_template: split a bitmap matrix into a bitmap tile //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_unop__sin_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...
cmfrec.h
/******************************************************************************* Collective Matrix Factorization ------------------------------- This is a module for multi-way factorization of sparse and dense matrices intended to be used for recommender system with explicit feedback data plus ...
antidep1-var-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...