source
stringlengths
3
92
c
stringlengths
26
2.25M
convolutiondepthwise_5x5_pack4_bf16s.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 ...
GB_binop__ge_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-...
elemwise_binary_scalar_op.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 ...
progress_counter.h
/* * Copyright (C) 2015, Nils Moehrle * TU Darmstadt - Graphics, Capture and Massively Parallel Computing * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the LICENSE.txt file for details. */ #ifndef TEX_PROGRESSCOUNTER_HEADER #define TE...
bounds.c
/*--------------------------------------------------------------------------------- BOUNDS.C -Implements physical boundary conditions -Ensure no inflow at radial boundaries -Ensure radial mass flux at radial boundaries is zero -B2 flux at X1 and X3 faces at polar boundaries is reflected for ghost zones -A...
omptest.c
#include "gptl.h" #include <stdio.h> #include <omp.h> extern void sub (int); int main () { int ret; int iter; double value; static const char *thisprog = "omptest"; omp_set_num_threads (2); ret = GPTLinitialize (); ret = GPTLstart ("main"); ret = GPTLstart ("omp_loop"); #pragma omp parallel for priva...
scalprod.c
#include <omp.h> #ifdef __cplusplus extern "C" #endif void scalprod(int n, double* x, double* y, double* res) { int i; double res_v = 0.; #pragma omp parallel for reduction(+ : res_v) for (i = 0; i < n; ++i) { res_v += x[i] * y[i]; } *res = res_v; }
tparallel.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ int first=0, second=0; int foo() { int i, x = 1023; #pragma omp parallel firstprivate(x) reduction(+:first) if(x>0) num_threads(2) { x++; first += x; } #pragma omp parallel firstprivate(x) reduction(+:first) if(0) {...
Tutorial.h
//================================================================================================= /*! // \file blaze/Tutorial.h // \brief Tutorial of the Blaze library // // Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or m...
dsposv.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/zcposv.c, mixed zc -> ds, Fri Sep 28 17:38:17 2018 * **/ #include "plasma.h" #include "plasma_async.h" #i...
matrix.c
#include "matrix.h" /* * matrix.c * * Copyright (c) 2014, Rafat Hussain * License : BSD 3-Clause * See COPYRIGHT for more details */ typedef struct { double* a; int b; } vipair; double macheps() { double macheps; macheps = 1.0; while ((macheps + 1.0) > 1.0) { macheps = macheps / 2.0; } macheps = ...
wave3d.c
#ifndef TAPENADE #include <math.h> #endif #define Max(x,y) fmax(x,y) #define Min(x,y) fmin(x,y) #define Heaviside(x) ((x>=0)?1.0:0.0) #define u(x,xx,xxx) u[x][xx][xxx] #define c(x,xx,xxx) c[x][xx][xxx] #define u_1(x,xx,xxx) u_1[x][xx][xxx] #define u_2(x,xx,xxx) u_2[x][xx][xxx] void wave3d(double* u_vec, double* c_vec...
GB_unop__lgamma_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
argon2_fmt_plug.c
/* * This software is Copyright (c) 2016 Agnieszka Bielec <bielecagnieszka8 at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * merged argon2d and argon2i into a single f...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
ast-dump-openmp-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 distribute for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp distribute for (int i = 0; i < x; i++) ...
GB_binop__pair_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-...
level.c
// RUN: %compile-run-and-check #include <omp.h> #include <stdio.h> const int MaxThreads = 1024; const int NumThreads = 64; int main(int argc, char *argv[]) { int level = -1, activeLevel = -1; // The expected value is -1, initialize to different value. int ancestorTNumNeg = 1, teamSizeNeg = 1; int ancestorTNu...
GB_unaryop__minv_uint32_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...
utils.h
#include "fstream" #include "iostream" #include <faiss/utils/random.h> #include <faiss/utils/Heap.h> #include <queue> #include <chrono> #include <string.h> #include <fstream> #include <sys/resource.h> #include <sys/stat.h> #include <dirent.h> namespace bslib{ using idx_t = int64_t; struct time_recorder{ ...
column_matrix.h
/*! * Copyright 2017 by Contributors * \file column_matrix.h * \brief Utility for fast column-wise access * \author Philip Cho */ #ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_ #define XGBOOST_COMMON_COLUMN_MATRIX_H_ #include <limits> #include <vector> #include <memory> #include "hist_util.h" namespace xgboost { names...
target-29.c
#include <omp.h> #include <stdlib.h> struct S { char p[64]; int a; int b[2]; long c[4]; int *d; char q[64]; }; __attribute__((noinline, noclone)) void foo (struct S s) { int d = omp_get_default_device (); int id = omp_get_initial_device (); int sep = 1; if (d < 0 || d >= omp_get_num_devices ()) d = id; ...
dropout_op.h
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
gost_fmt_plug.c
/* * GOST 3411 cracker patch for JtR. Hacked together during * May of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>, * Sergey V. <sftp.mtuci at gmail com>, and JimF * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * Sergey V. <sftp.mtuci at gmail com>, and JimF * and it is he...
pr80809-3.c
/* PR middle-end/80809 */ /* { dg-do run } */ __attribute__((noinline, noclone)) void foo (int x) { int i, v[x], w[16]; for (i = 0; i < x; i++) v[i] = i; for (i = 0; i < 16; i++) w[i] = 0; #pragma omp parallel #pragma omp single { int z[x]; for (i = 0; i < x; i++) z[0] = 0; for (i = 0...
mult_impl_basic.h
#ifndef _MULT_IMPL_BASIC_H #define _MULT_IMPL_BASIC_H #define DO_REORDER //Testing on my laptop indicated its better to reorder the matrices to improve cache usage //Implementations for meson field contractions template<typename mf_Policies, template <typename> class lA2AfieldL, template <typename> class lA2Afie...
Ransac.h
/** * Copyright (c) 2021 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include "saiga/core/util/Thread/omp.h" #include "saiga/vision/VisionTypes.h" namespace Saiga { // This seed is used for all ransac classes. // You can change this in your applicati...
omp_hash_set.h
#ifndef omp_hash_set_H_ #define omp_hash_set_H_ #include <array> #include <functional> #include <memory> #include <vector> #include "omp.h" // A high performance concurrent hash map based on OpenMP. template <class K, class H = std::hash<K>> class omp_hash_set { public: omp_hash_set(); ~omp_hash_set(); // Se...
rt_dpltmg.c
#include "runtime.h" void RT_CORE_dpltmg( Quark *quark, Quark_Task_Flags *task_flags, PLASMA_enum mtxtype, int m, int n, double *A, int lda, int gM, int gN, int m0, int n0, unsigned long long int seed ) { plasma_context_t *plasma; plasma = plasma_context_self(); if ...
cxx-pretty-print.c
/* Implementation of subroutines for the GNU C++ pretty-printer. Copyright (C) 2003-2020 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> 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 Publi...
A1_3.c
// gcc -std=c99 -Wall -lm -fopenmp -o go A1_3.c #include <stdio.h> #include <omp.h> #include <stdlib.h> #include <time.h> void display(int, int *); void swap(int *, int *); unsigned long long tick(void) { unsigned long long d; __asm__ __volatile__("rdtsc": "=A"(d)); return d; } int main(int argc, char *...
matmul.c
#include "wtime.h" #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #define N 500 #define STEPS 10 /* IMPORTANTE * ---------- * La memoria es unidimensional, y en C las matrices multidimensionales se * representan de forma row-major: las filas se guardan de forma contigua. * * Matriz A 2x3: * a11 a...
TiledFrameBuffer.h
#pragma once #include <cstdint> #include <cassert> #include <vector> #include "alloc16.h" #include "LiteMath.h" /** \brief Frame Buffer \param PackedColor -- uint32_t, uint16_t, uint8_t \param FB_BIN_SIZE -- bin size; if 0, bins are not used and the framebuffer become 1-lvl! \param FB_TILE_SIZE_X -- s...
GB_binop__bxor_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-...
smod.c
#ifndef _SMOD_H_ #include "smod.h" #endif /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+--*/ /* * brinv - * @param1: description of param1 * @param2: description of param2 * * version: 20 Aug 2010 */ /*--+----1----+----2----+----3----+----4----+----5----+----6----+--...
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...
mxEvaluateStrongFormEdgeAlterRHS.c
#ifdef _OPENMP #include <omp.h> #endif #include "mex.h" #include "blas.h" // #if !defined(_WIN32) // #define dgemm dgemm_ // #endif #define DEBUG 0 #define NRHS 9 #define NLHS 1 void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { /* check input & output */ if (nrhs != NRHS) { mex...
add_omp.c
/* This file is part of ParTI!. ParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
fisher.c
/** @file fisher.c ** @brief Fisher - Declaration ** @author David Novotny **/ /* Copyright (C) 2013 David Novotny and Andrea Vedaldi. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). */ /** <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~...
generator_spgemm_csc_bsparse.c
/****************************************************************************** ** Copyright (c) 2015-2017, Intel Corporation ** ** All rights reserved. ** ** ** ...
SuperRayGenerator.h
/* * Copyright(c) 2016, Youngsun Kwon, Donghyuk Kim, and Sung-eui Yoon, KAIST * 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 copyri...
matrix.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
serialLocationTest.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ipps.h> #include "xcloc_finter.h" #include "test_suite.h" #include "acousticGreens2D.h" #ifndef M_PI #define M_PI 3.14159265358979323846 #endif /* static int computeTravelTimeTable(const int nx, const int ny, const int nz, ...
GB_binop__plus_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_AxB_saxpy3_slice_balanced.c
//------------------------------------------------------------------------------ // GB_AxB_saxpy3_slice_balanced: construct balanced tasks for GB_AxB_saxpy3 //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. /...
nr_numint.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include "cint.h" #include "gto/grid_ao_drv.h" #include "np_helper/np_helper.h" #include "vhf/fblas.h" #include <assert.h> #define BOXSIZE 56 int VXCao_empty_blocks(char *empty, unsigned char *non0t...
rose_dep_distance.c
/* *Test dependence distance * */ #include "omp.h" void foo() { int i; int a[100]; /* Constant offset*/ for (i = 0; i <= 98; i += 1) { a[i + 3] = a[i - 5] + 1; } } void foo2(int j,int k) { int i; int a[100]; /*variable offset*/ for (i = 0; i <= 98; i += 1) { a[i + j] = a[i + k] + 1; } } in...
atomic_read_codegen.c
// RUN: %clang_cc1 -no-opaque-pointers -verify -triple x86_64-apple-darwin10 -target-cpu core2 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -no-opaque-pointers -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -emit-pch -o %t %s // RUN: %clang_cc1 -no-opaque-pointers -fopenmp -x c -tri...
master.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // GCC generates code that does not call the runtime for the master construct // XFAIL: gcc #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { #pragma omp master { print_fuzzy_address(1); ...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
generator_3177.c
/* Author: David Zhu (P1703177) Class: DISM/FT/1A/21 */ #define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #include <ctype.h> #include <crypt.h> #include <omp.h> #include "functions_3177.h" void printHelp(char *); int isAllNumeric(char *); void writefile(ch...
hdp.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <float.h> #include <inttypes.h> #include "hdp.h" #include "hdp_math_utils.h" #include "sonLib.h" #include "ranlib.h" #define N_IG_NUM_PARAMS 4 #ifndef MINUS_INF #define MINUS_INF -0.5 * DBL_MAX #endif #ifndef M_PI #define M_PI 3.1415926535897932384626...
udr-2.c
/* { dg-do run } */ extern void abort (); struct S { int s; }; #pragma omp declare reduction (+:struct S:omp_out.s += omp_in.s) #pragma omp declare reduction (foo:struct S:omp_out.s += omp_in.s) #pragma omp declare reduction (foo:int:omp_out += omp_in) int main () { int u = 0, q = 0; struct S s, t; s.s = 0; t...
crop_and_resize.c
#include <TH/TH.h> #include <stdio.h> #include <math.h> void CropAndResizePerBox( const float * image_data, const int batch_size, const int depth, const int image_height, const int image_width, const float * boxes_data, const int * box_index_data, const int start_box, const int...
loops.c
/** * loops.c * * Counting loops with and without OpenMP * * @author pikryukov * @version 2.5 * * e-mail: kryukov@frtk.ru * * Copyright (C) Kryukov Pavel 2012 * for MIPT Parallel Algorithms course. */ #include <stdio.h> /* fprintf, fopen, fclose */ #include <stdlib.h> /* malloc, free */ #include <math.h> ...
GB_unop__identity_uint8_int8.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...
ast-dump-openmp-target-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 simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target simd for (int i = 0; i < x; i++)...
DRB028-privatemissing-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...
statistical_analysis.c
#include<stdio.h> #include<omp.h> #include<math.h> #define INT_MAX 9999999 #define INT_MIN -999999 int main() { int n; scanf("%d", &n); int marks[n]; for(int i=0; i<n; i++) { scanf("%d", (marks+i)); } int max = INT_MIN; int min = INT_MAX; int sum = 0; #pragma omp parallel for shared(marks) reduction (+:sum...
NeighborhoodGraph.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_NG_H_ #define _SPTAG_COMMON_NG_H_ #include "../VectorIndex.h" #include "CommonUtils.h" #include "Dataset.h" #include "FineGrainedLock.h" #include "QueryResultSet.h" #include <chrono> #if defined(GP...
GB_unop_transpose.c
//------------------------------------------------------------------------------ // GB_unop_transpose: C=op(cast(A')), transpose, typecast, and apply op //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SP...
dz1z1.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> void Usage(char *prog_name); #define ACCURACY 0.01 /* * RUCNO */ double sequential_solution(int argc, char *argv[]) { long long n, i; double factor; double sum = 0.0; if (argc != 2) Usage(argv[0]); n = strtoll(ar...
test.c
#include <stdio.h> #include "../utilities/check.h" #define N 100 int main() { check_offloading(); int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; // offload #pragma omp target map(tofrom: a[0:100]) { int k, l; #pragma omp simd linear(l: 2) ...
GB_unop__cosh_fc32_fc32.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...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
CGOpenMPRuntime.h
//===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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 // //===---------------------------...
hicoo.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...
task4_solution.c
#include <math.h> #include <string.h> #include "timer.h" #define NN 1024 #define NM 1024 float A[NN][NM]; float Anew[NN][NM]; int main(int argc, char** argv) { const int n = NN; const int m = NM; const int iter_max = 1000; const double tol = 1.0e-6; double error = 1.0; memset(A,...
GB_binop__le_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__bset_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
keychain_fmt_plug.c
/* Mac OS X Keychain cracker patch for JtR. Hacked together during Summer of * 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use i...
9.norace7.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 200 #define N 200 double sum = 0.0; #pragma omp threadprivate(sum) int main() { double A[M], B[M][N], C[N]; #pragma omp single copyprivate(sum) for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { sum += B[i][j...
QLA_D3_c1_veq_V_dot_V.c
/**************** QLA_D3_c_veq_V_dot_V.c ********************/ #include <stdio.h> #include <qla_config.h> #include <qla_types.h> #include <qla_random.h> #include <qla_cmath.h> #include <qla_d3.h> #include <math.h> static void start_slice(){ __asm__ __volatile__ (""); } static void end_slice(){ __asm__ __volatile...
residual_based_adjoint_bossak_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #if !defined(KRATOS_RESIDUAL_...
OMPDenseMatrix.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> int main (int argc, char* argv[]) { //Declarations float dampingFactor = 0.15; int numPage = atoi(argv[1]); int totalSize = numPage * numPage; float *sArray, *pageRank, *yArray; sArray = (float*)malloc(totalSize*sizeof(float)); pageRa...
guided.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <unistd.h> #define N 1000 int main() { int n_threads, i; /* Schedule allows you to create the scheme with which the threads distribute the work of an iteration of a cycle. "guided": It has a scheduling policy very similar to dynamic...
test.c
#include <stdlib.h> #include <stdio.h> int main(int argc, char *argv[]) { int dep = 0; #pragma omp target device(0) nowait map(tofrom: dep) depend(out: dep) { dep++; } #pragma omp target device(1) nowait map(tofrom: dep) depend(in: dep) { dep++; } #pragma omp taskwait if (dep == 2) { ...
dirfile.c
/* -*- mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: sw=4 ts=8 et tw=80 */ #include "pyactpol.h" #include <actpol/actpol.h> #include <actpol/dirfile.h> #include <actpol/getdata.h> #include "myassert.h" /* Extraction / conversion routines, for pulling bitfields out and * rescalin...
GB_binop__bset_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
convolution_1x1_pack4.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 ...
OpenMP-check.c
#include <stdio.h> #include <omp.h> int main(void) { #pragma omp parallel { printf("I'm a parallel region.\n"); } return 0; }
ast-dump-openmp-cancel.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 { #pragma omp cancel parallel } } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {...
GB_unop__identity_fc32_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
strmm.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/ztrmm.c, normal z -> s, Fri Sep 28 17:38:03 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
dem_fem_search.h
// // Project Name: Kratos // Last Modified by: $Author: msantasusana, croig $ // Date: $Date: 2015-10-26 19:37:47 $ // Revision: $Revision: 1.2 $ // // #if !defined(KRATOS_DEM_FEM_SEARCH_H_INCLUDED ) #define KRATOS_DEM_FEM_SEARCH_H_INCLUDED // System includes #include <st...
DRB033-truedeplinear-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...
9802.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...
fill_ints_sr.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 required ...
SparseDenseProduct.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You c...
lrthresh.c
/* Copyright 2015. The Regents of the University of California. * Copyright 2015. Tao Zhang and Joseph Cheng. * Copyright 2016-2018. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2014-2015 Frank Ong <frank...
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...
miniflux.gold.h
void miniflux_gold ( double *new_box_0_in, double *new_box_1_in, double *new_box_2_in, double *new_box_3_in, double *new_box_4_in, double *old_box_0_in, double *old_box_1_in, double *old_box_2_in, double *old_box_3_in, double *old_box_4_in, double *gx_0_in, double *gx_1_in, double *gx_2_in, double *gx_3_in, doubl...
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) #...
GB_binop__band_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
5500.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...
text_parser.h
/*! * Copyright (c) 2015 by Contributors * \file text_parser.h * \brief iterator parser to parse text format * \author Tianqi Chen */ #ifndef DMLC_DATA_TEXT_PARSER_H_ #define DMLC_DATA_TEXT_PARSER_H_ #include <dmlc/data.h> #include <dmlc/omp.h> #include <thread> #include <mutex> #include <vector> #include <cstri...