source
stringlengths
3
92
c
stringlengths
26
2.25M
csr_matvec_oomp.c
/****************************************************************************** * Copyright 1998-2019 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) **************************************...
dd_graph.h
#pragma once #include "./dd_header.h" #if defined(koala) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" #pragma GCC diagnostic ignored "-Wcast-qual" #pragma GCC diagnostic ignored "-Wextra" #pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wpedan...
7952.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...
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...
yolov2_forward_network_quantized.c
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h // softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h #define GEMMCONV //#define SSE41 //#undef AVX #define W_MAX_VAL (256/2 - 1) /...
terrain.c
#include "blocko.h" float hmap[TILESW][TILESD]; float hmap2[TILESW][TILESD]; int tscootx, tscootz, tchunk_scootx, tchunk_scootz; void gen_hmap(int x0, int x2, int z0, int z2) { unsigned seed = SEED4(x0, x2, z0, z2); // pick corners if they aren't set if (hmap[x0][z0] == 0) hmap[x0][z0] = RAN...
declare_variant_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s // expected-no-diagnostics int foo(void); #pragma omp declare variant(foo) match(xxx={}, yyy={ccc}) #pr...
pzgstrf2.c
/*! \file Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) All rights reserved. The source code is distributed under BSD license, see the file License.txt at the top-level directory. ...
openmp_no_error.c
#include <stdio.h> #include <omp.h> int main () { int i = 0; #pragma omp parallel { #pragma omp critical { ++i; } } printf("Ausgabe: %d\n", i); return i; }
reduce-kernels.h
#ifndef __REDUCE_KERNELS_FUNCTIONAL_CORE_H__ #define __REDUCE_KERNELS_FUNCTIONAL_CORE_H__ #include <omp.h> #include "../../../macros/macros.h" #include "../../../types/types.h" #include "../../../meta/meta.h" namespace __core__ { namespace __functional__ { namespace __reduce__ { namespace __array__ { namespace __pri...
par_nongalerkin.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
GB_unop__isinf_bool_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://...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
critical_multiple.c
// PASS: * // RUN: ${CATO_ROOT}/src/scripts/cexecute_pass.py %s -o %t // RUN: diff <(mpirun -np 4 %t) %s.reference_output #include <stdio.h> #include <omp.h> int main() { int x = 0; #pragma omp parallel { #pragma omp critical { x += omp_get_thread_num(); } #pra...
pyfr_gemm_rm.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
orderedConstruct.c
int main() { int x = 10; #pragma omp parallel { int localX, localY; #pragma omp for for(localX = 0; local < 10; localX++) { #pragma omp ordered { localY = x; } } localX = 20; } x = 30; }
GB_unop__identity_fp32_uint8.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__lnot_uint64_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unop__identity_uint16_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...
SourceCode.c
#ifdef _WIN32 #include <stdio.h> #else #define _GNU_SOURCE // for fcloseall() on linux #include <stdio.h> #endif #include <stdbool.h> #include <string.h> #include <omp.h> #include <math.h> #include <SpiceUsr.h> #include <ini.h> #include <PIConfig.h> #ifdef _WIN32 #include <windows.h> // only needed for Sleep() #in...
n_body.c
/* * N Body problem * * Available in High Performance Parallelism Pearls ch 9/10 * * questions ask Brian Gravelle gravelle@lanl.gov * */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> #include <math.h> #ifdef USE_CALI #include <caliper/cali.h> #endif #define double double #define...
a.15.1.c
/* { dg-do run } */ #include <stdio.h> void work (int n) { printf ("[%d of %d], nested = %d, n = %d\n", omp_get_thread_num (), omp_get_num_threads(), omp_get_nested (), n); } void sub3 (int n) { work (n); #pragma omp barrier work (n); } void sub2 (int k) { #pragma omp parallel shared(k) sub3 (k); } void su...
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...
2Dfold.c
/* * minimum free energy * RNA secondary structure with * basepair distance d_1 to reference structure 1 and distance d_2 to reference structure 2 * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <string.h> #include...
GB_binop__first_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
AUC-openmp.c
// Program: AUC-openmp // Author: Jason Regina // Date: 12 November 2015 // Description: This program approximates pi using the Riemann Sum method #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <math.h> #include <omp.h> // This function returns a y-value on a unit circle // centered at the origi...
clean.h
/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyri...
collective_alltoall.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable 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) >...
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) #...
nanort.h
// // NanoRT, single header only modern ray tracing kernel. // /* The MIT License (MIT) Copyright (c) 2015 Light Transport Entertainment, Inc. 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 wit...
GB_unaryop__abs_int64_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__isle_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:...
zlag2c.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions mixed zc -> ds * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "pl...
ten_tusscher_3_two_region.c
#include "model_common.h" #include <assert.h> #include <stdlib.h> #include "ten_tusscher_3_two_region.h" #define ENDO GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ...
GB_binop__bclr_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...
GB_binop__lxor_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
fftw.c
/*----------------------------------------------------------------*/ #include "hclfftw.h" #include <sys/time.h> #include <omp.h> /*----------------------------------------------------------------*/ fftw_plan fftw1d_init_plan( const int sign, const int m, const int n, fftw_complex* X, fftw_complex* Y ) {...
Example_declare_variant.1.c
/* * @@name: declare_variant.1c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #define N 100 #include <stdio.h> #include <omp.h> void p_vxv(int *v1,int *v2,int *v3,int n); void t_vxv(int *v1,int *v2,int *v3,int n); #pragma omp declare variant( p_vxv ) match( construct=...
two_step_v_p_strategy.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: January 2016 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_TWO_STEP_V_P_STRATEGY_H #define KRATOS_TWO_...
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. // //===-------------------------------------------------------...
EW.c
// SW4 LICENSE // # ---------------------------------------------------------------------- // # SW4 - Seismic Waves, 4th order // # ---------------------------------------------------------------------- // # Copyright (c) 2013, Lawrence Livermore National Security, LLC. // # Produced at the Lawrence Livermore Nationa...
pi02.c
#include <omp.h> static long num_steps = 100000; double step; #define NUM_THREADS 4 void main () { int i; double x, pi, sum[NUM_THREADS]; step = 1.0/(double) num_steps; omp_set_num_threads(NUM_THREADS); #pragma omp parallel private(i) { double x; int id; id = omp_get_thread_num...
GB_unop__lnot_int32_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...
kernel_cpu.c
#ifdef __cplusplus extern "C" { #endif //========================================================================================================================================================================================================200 // DEFINE/INCLUDE //======================================================...
gbdt.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
link-list-alg-openmp3x.c
/********************************************************************************* OpenMP-3.0 Example Codes Beta-v1.0 File : link-list-alg-openmp3x.c Date : March 2010 Description : The program perform the link list traversal(irregular parallelism) in parall...
grid_ao.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 ...
convolution_packn_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
terrain.c
#include <string.h> #include <stdlib.h> #include <stdio.h> #include "globals.h" #include "terrain.h" #include "../lib/FastNoiseLite.h" #include "xorshift.h" #include "utils.h" static TerrainTreeNode terrain_tree_root = {0}; void initialize_terrain_tree(TerrainTreeNode *node, int depth) { TerrainTreeNode *p = nod...
if-clause.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char **argv) { int i, n=20, tid, x; int a[n],suma=0,sumalocal; if(argc < 3) { fprintf(stderr,"[ERROR]-Faltan parametros: iteraciones nthreads\n"); exit(-1); } n = atoi(argv[1]); if (n>20) n=20; x = atoi(argv[...
displacement_lagrangemultiplier_residual_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
oskar_cross_correlate_point_time_smearing_scalar_omp.c
/* * Copyright (c) 2014-2015, The University of Oxford * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this ...
second.c
#include <stdio.h> #include <omp.h> int main(){ int A[10] = {1,2,3,4,5,6,7,8,9,10}, i, m, k; omp_set_dynamic(0); m = omp_get_num_procs(); printf("Max No. of threads: %d\n", omp_get_max_threads()); omp_set_num_threads(6); #pragma omp parallel printf("Hello from thread no. %d of...
nodal_two_step_v_p_strategy.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: June 2018 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_NODAL_TWO_STEP_V_P_STRATEGY_H #define KRATO...
lu_decompose.c
/** * \file * \brief [LU decomposition](https://en.wikipedia.org/wiki/LU_decompositon) of a * square matrix * \author [Krishna Vedala](https://github.com/kvedala) */ #include <stdio.h> #include <stdlib.h> #include <time.h> #ifdef _OPENMP #include <omp.h> #endif /** Perform LU decomposition on matrix * \param[in]...
nvector_openmp.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Carol S. Woodward @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen,...
GB_unop__identity_uint64_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://...
dropout-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 ...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convolution_1x1_pack4to8_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 ...
exemplo_for.c
#include "exemplos.h" //exemplo For int main(int argc, char **argv) { int i, thread_id, nloops; #pragma omp parallel private(thread_id, nloops) { nloops = 0; thread_id = omp_get_thread_num(); #pragma omp for for (i = 0; i < 1000; ++i) { if (nloops == 0) ...
compression.h
// // Created by Bangtian Liu on 6/30/19. // #ifndef PROJECT_COMPRESSION_H #define PROJECT_COMPRESSION_H #include <vector> #include <algorithm> #include <random> #include <cstring> #include "../sympiler/HMatrix.h" #include "HTree.h" #include "../sympiler/HTree.h" using namespace Sympiler::Internal; using namespace ...
convolution_7x7_pack1ton.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
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__plus_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- 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 // //===---------------------------...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
convolution_sgemm_packnto1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
axpy_double.c
//axpy.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix and a vect...
reorder.c
// // reorder.c // // Created by Hussian Alamri on November 2013 // #include <stdio.h> #include <stdlib.h> #include "reorder.h" int index_gc = 0; int P[20000] = {0}; void column_intersection(double** input, double** output, int nrows, int ncols) { /* input: original sparse matrix - will not be modified ...
easyopt.c
/* This implementation does some easy optimization on the baseline code. */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #define L1 2000 #define L2 2000 #define LT 100 #define SEED 0 #define LS (L1 * L2) char world[L1 + 2][L2 + 2]; char result[L1 + 2][L2 + 2];...
softmax-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
GB_binop__rdiv_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...
rowsums.c
// Jacobi 3D skeleton program #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "timing.h" int main(int argc, char** argv) { double wct_start,wct_end,cput_start,cput_end,runtime,r; int iter,nrows,ncols,i,j,k,n, size; double *f1, *f2, *rsum, *rsumtrue; iter=50; double min...
GB_binop__band_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
bert_layer_mb1_dynamic_tokens.h
#ifndef BERT_LAYER_H_ #define BERT_LAYER_H_ #include <new> #include <string> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <math.h> #include <mkl.h> #include <omp.h> #include <iostream> #include <immintrin.h> #include "my_types.h" //#include "timer.h" class BertLayer { public...
openmp_matrix.c
/** * Implement some parallel algorithms operating on matrixes with OpenMP */ #ifndef _GNU_SOURCE # define _GNU_SOURCE /* for snprintf */ #endif /* Define inline for OpenMP compatibility with "clang -ansi" */ #ifdef __clang__ # define inline __inline__ #endif #include <errno.h> #include <omp.h> #include <stdd...
zsyr2k.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 ...
GB_binop__bxnor_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-...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
c55c7aec73df0f31d67fbe39510946453b899e1d.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double section0; double section1; double section2; } ...
denseAsyncBlocksJacobi.h
// // Created by mbarb on 14/02/2018. // #ifndef PARALLELITERATIVE_DENSEASYNCBLOCKJACOBI_H #define PARALLELITERATIVE_DENSEASYNCBLOCKJACOBI_H #include <Eigen> #include <iostream> #include <omp.h> #include "utils.h" #include "denseParallelJacobi.h" namespace Iterative { template <typename Scalar, long long SIZE>...
kmp_num_teams.c
// RUN: %libomp-compile-and-run // UNSUPPORTED: gcc #include <stdio.h> #include <stdlib.h> #include <omp.h> #define NT 8 #ifdef __cplusplus extern "C" { #endif typedef int kmp_int32; typedef struct ident { kmp_int32 reserved_1; kmp_int32 flags; kmp_int32 reserved_2; kmp_int32 reserved_3; char const *psourc...
Blank.h
/// \ingroup base /// \class ttk::Blank /// \author Your Name Here <Your Email Address Here> /// \date The Date Here. /// /// \brief TTK %blank processing package. /// /// %Blank is a TTK processing package that takes a scalar field on the input /// and produces a scalar field on the output. /// /// \sa ttk::Triangul...
Main.c
/******************************************************************************* Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of so...
vec2d_add.c
////////////////////////////////////////////////////////////// // ____ // // | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ // // | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| // // | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ // // |...
omp_parallel_default.c
<ompts:test> <ompts:testdescription>Test which checks the default option of the parallel construct.</ompts:testdescription> <ompts:ompversion>3.0</ompts:ompversion> <ompts:directive>omp parallel default</ompts:directive> <ompts:testcode> #include <stdio.h> #include <unistd.h> #include "omp_testsuite.h" int <ompts:tes...
firstlastprivate.c
#include <stdio.h> #include <omp.h> #include <assert.h> int main() { int i,sum=77; int num_steps=100; omp_set_num_threads(4); #pragma omp parallel for firstprivate (sum) lastprivate (sum) for(i=1;i<=num_steps;i++) { sum=sum + i; } printf("sum=%d\n",sum); return 0; }
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 // //===---------------------------...
2013.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 <...
omp.c
// note not doing O0 below as to ensure we get tbaa // TODO: %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - && ./a.out // RUN: %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 %s -S -emit-l...
openmptest.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include</usr/include/stdint.h> #include<stdbool.h> #include "db.h" int listSize; uint32_t maxValue; double seq; int output = 0; uint32_t* list; struct cgmResult{ int read[3]; // 16 bases in each int uint32_t* matches; // pointer to list o...
TGV_core.c
/* This work is part of the Core Imaging Library developed by Visual Analytics and Imaging System Group of the Science Technology Facilities Council, STFC Copyright 2017 Daniil Kazantsev Copyright 2017 Srikanth Nagella, Edoardo Pasca Licensed under the Apache License, Version 2.0 (the "License"); you may not use this...
binary_move_generator.h
/*****************************************************************************/ // Copyright (c) 2020-2021 Yuji KOGUMA // Released under the MIT license // https://opensource.org/licenses/mit-license.php /*****************************************************************************/ #ifndef PRINTEMPS_NEIGHBORHOOD_BINAR...
enq_deq_pairs.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * See COPYRIGHT in top-level directory. */ #include <stdlib.h> #include <stdio.h> #include <omp.h> #include "zmtest_absqueue.h" #define TEST_NELEMTS 1000 /*------------------------------------------------------------------------- * Function: run ...
GrB_Vector_nvals.c
//------------------------------------------------------------------------------ // GrB_Vector_nvals: number of entries in a sparse vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Ide...
displacement_criteria.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_DISPLAC...
mysql_fmt_plug.c
/* MYSQL_half_fmt.c * * Copyright (c) 2008 by <earthquake at rycon.hu> * * John the ripper MYSQL-fast module * * * Note: The mysql hash's first 8byte is relevant, * the another ones depends on the first 8. Maybe * the passwords after 9-10character have collision * in the first 8byte, so we have to check the f...