source
stringlengths
3
92
c
stringlengths
26
2.25M
soxr.c
/* SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net * Licence for this file: LGPL v2.1 See LICENCE for details. */ #include <math.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "soxr.h" #include "data-io.h" #include "internal.h" char const * soxr_...
wino_conv_kernel_arm.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
aux_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
GB_binop__rdiv_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_binop__rminus_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-...
target_data.c
// RUN: %libomptarget-compile-generic -fopenmp-version=51 // RUN: %libomptarget-run-fail-generic 2>&1 \ // RUN: | %fcheck-generic #include <stdio.h> int main() { int i; // CHECK: addr=0x[[#%x,HOST_ADDR:]], size=[[#%u,SIZE:]] fprintf(stderr, "addr=%p, size=%ld\n", &i, sizeof i); // CHECK-NOT: Libomptarget #...
mesh.c
/* Copyright (c) 2012 by Marcin Krotkiewski, University of Oslo See ../License.txt for License Agreement. */ #include "mesh.h" #include <libutils/utils.h> #include <libutils/parallel.h> dimType validate_elems(const dimType *elems, dimType n_elems, dimType n_nodes, dimType n_elem_nodes) { dimType n_ref_nodes_...
geo_yeefdtd.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "geo_yeefdtd.kernel_inc.h" int openmp_GEO_YEE_CURL_L_init (openmp_pscmc_env * pe ,openmp_GEO_YEE_CURL_L_struct * kerstr ){ return 0 ;} void openmp_GEO_YEE_CURL_L_get_struct_len (size_t * len )...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
convolution_3x3_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. All rights reserved. // 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 /...
GB_binop__rdiv_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
DRB049-fprintf-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...
9785.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
GB_binop__lor_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
ceil_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
9672.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...
ex02.c
#include <stdio.h> #include <omp.h> static long num_steps = 1000000; double step; int main(int argv, char* argc) { int num_threads; double pi, total_sum = 0.0; step = 1.0 / (double) num_steps; int num_procs = omp_get_num_procs(); // omp_set_num_threads(num_procs); double* sum; int steps_per_thread; // int n...
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) #...
convolution_5x5.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 ...
omp_parallel_private.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel private directive.</ompts:testdescription> <ompts:ompversion>3.0</ompts:ompversion> <ompts:directive>omp parallel private</ompts:directive> <ompts:dependences>omp for omp critical</ompts:dependences> <ompts:testcode> #include <stdio.h> #include <std...
polybench.c
/** * polybench.c: This file is part of the PolyBench/C 3.2 test suite. * * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <assert.h> ...
ballAlg.c
#include "ballAlg.h" #include "../lib/genPoints.h" #include "../lib/msort.h" #include "pointArith.h" #include <mpi.h> #include <omp.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> int nProcesses; int myRank; int nDims; int nNodes = 0; int nid = 1; int nodesCapacity; Node *nodes; MPI_Datatype mpiMedianIn...
GB_unaryop__ainv_int8_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
deconvolution_packnto1_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 ...
GB_bitmap_add_template.c
//------------------------------------------------------------------------------ // GB_bitmap_add_template: C = A+B, C<M>=A+B, and C<!M>=A+B, C bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
nco_s1d.c
/* $Header$ */ /* Purpose: NCO utilities for Sparse-1D (S1D) datasets */ /* Copyright (C) 2020--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO under the terms of the 3-Clause BSD License with exceptions described in the LIC...
algebra_lineare_par.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #define NUM_BLOCCHI 156 #define K 6000 #define NUM_PRIMI 128 #define N_BITS 64 #define TYPE unsigned long typedef TYPE word; struct row_stats { // bit piu a destra long unsigned b_dx; // num di bit a 1 long unsigned n_bit; }; struct r...
Common.h
// Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. // 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,...
omp_critical_with_hint.c
// RUN: %libomp-compile-and-run // critial with hint was introduced with icc 19 // UNSUPPORTED: icc-18 #include <stdio.h> #include <omp.h> #include "omp_testsuite.h" int test_omp_critical(int iter) { int sum; int known_sum; sum = 0; #pragma omp parallel { int mysum = 0; int i; #pragma omp for for...
blurtiles.c
#include <stdlib.h> #include "blurtiles.h" void blurtiles(float* l,int m,int n,float*output){ #pragma omp parallel for for (int H80 = 0; H80 < 1; H80++) { for (int H81 = 0; H81 < m; H81++) { float tmp2 = 0; float tmp3 = 0; if (0 <= H80 - (1)) { float tmp4 = 0; float tmp5 = 0; if (0 <= H81 - (1)...
move_shallow_water_particle_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // ...
GB_unaryop__identity_uint64_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
matrix_vector_functions_intel_mkl.c
/* high level matrix/vector functions using Intel MKL for blas */ #include "matrix_vector_functions_intel_mkl.h" #include "mkl_scalapack.h" /* initialize new matrix and set all entries to zero */ mat * matrix_new(int nrows, int ncols) { mat *M = malloc(sizeof(mat)); //M->d = (double*)mkl_calloc(nrows*ncols, s...
GB_unop__isnan_bool_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...
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...
GB_unaryop__abs_uint16_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...
ams.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) **************************************...
eltwise_layernorm.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
rumi-64-128-18r.c
/* * Date: 11 December 2015 * Contact: Thomas Peyrin - thomas.peyrin@gmail.com */ /* * Simulation of boomerang analysis for Skinny * Date: March 21, 2020 * Author: Hosein Hadipour * Contact: hsn.hadipour@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #incl...
nodal_residualbased_block_builder_and_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // ...
cpu_ctc.h
#pragma once #include <tuple> #include <cmath> #include <limits> #include <algorithm> #include <numeric> #include <dmlc/omp.h> #include "ctc_helper.h" namespace mxnet_warpctc { template<typename ProbT> class CpuCTC { public: // Noncopyable CpuCTC(int alphabet_size, int minibatch, void* workspace, ...
mpncbo.c
/* $Header$ */ /* mpncbo -- netCDF binary operator */ /* Purpose: Compute sum, difference, product, or ratio of specified hyperslabs of specfied variables from two input netCDF files and output them to a single file. */ /* Copyright (C) 1995--present Charlie Zender This file is part of NCO, the netCDF Operator...
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 ...
v_p_strategy.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: January 2016 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_V_P_STRATEGY_H #define KRATOS_V_P_STRATEGY_...
1539.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...
sgemm_spec.c
#include "config.h" #include <unistd.h> #include <stdlib.h> #ifdef HAVE_PNG #include <png.h> #endif #include <sys/time.h> #include <omp.h> #include <CUnit/Basic.h> #include <CUnit/Console.h> #include "mkl.h" static double get_time() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec + t.tv...
implicit_blender.c
/* * This program 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 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
IcgMask.c
// Copyright (C) 2016 Gernot Riegler // Institute for Computer Graphics and Vision (ICG) // Graz University of Technology (TU GRAZ) // 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 m...
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) ...
c-tree.h
/* Definitions for C parsing and type checking. Copyright (C) 1987-2019 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, or (at yo...
target.c
#pragma omp target [clauses] structured-block
nanort.h
// // NanoRT, single header only modern ray tracing kernel. // /* The MIT License (MIT) Copyright (c) 2015 - 2016 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 Softw...
Example_target_data.4.c
/* * @@name: target_data.4c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ void vec_mult(float*, float*, float*, int); extern void init(float*, float*, int); extern void output(float*, int); void foo(float *p0, float *v1, float *v2, int N) { init(v1, v2, N); #pr...
bistack.c
// -*-Mode: C++;-*- // technically C99 // * BeginRiceCopyright ***************************************************** // // $HeadURL$ // $Id$ // // -------------------------------------------------------------------------- // Part of HPCToolkit (hpctoolkit.org) // // Information about sources of support for research an...
GB_binop__div_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
task-dependency.c
/* * task-dependency.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ...
omp-parallel-if.c
#include <stdio.h> #include <omp.h> #define THREADS 4 int main(void) { #pragma omp parallel num_threads(THREADS) if(0) { #pragma omp single printf("There are %d threads\n", omp_get_num_threads()); } }
matMult_neon.c
/* * File: saxpy.c * Author: Malcolm Davis * Course: Computer Architecture II * Created on May 12, 2018 * Simple matrix multiplication with OpenMP + NEON * * Ussage: * ./argv[0] for default parameters and random vectors or; * ./argv[0] <m matrix 1 size> <n matrix 1 size> <m matrix 2 size> <n matrix 2 size>...
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) ...
GB_unop__tanh_fc64_fc64.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...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "omp.h" #include "functions.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p;...
3mm.c
/** * 3mm.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic....
inplace_binary_operation.h
/* Copyright 2021 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
GB_binop__band_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
neighbor.h
#pragma once #ifdef USE_SIMPLEMAP #include "simplemap.hpp" #endif class ExPair{ public: PS::S64 id_in; PS::S64 id_out; PS::S64 id_cluster; PS::S32 * rank_list; static PS::S32 size; static PS::S32 rem; static PS::S32 n_bit; static void initialize() { const PS::S32 n_pr...
BaggingEnsemble.h
#ifndef GENIF_BAGGINGENSEMBLE_H #define GENIF_BAGGINGENSEMBLE_H #include <chrono> #include <genif/Learner.h> #include <random> namespace genif { /** * Provides a generic Bagging ensemble, that randomly subsamples given datasets and outputs a vector of learned models and predictions. * * @tparam Mod...
main.c
/*======================================*/ /*= Autor: Tiago Serique Valadares =*/ /*= GRR: 20195138 =*/ /*= Disciplina: Aprendizado de Maquina =*/ /*======================================*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "knn.h" #include "read_data....
rar5_fmt_plug.c
/* RAR 5.0 cracker patch for JtR. Hacked together during May of 2013 by Dhiru * Kholia. * * http://www.rarlab.com/technote.htm * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the * following terms: * * Redistribution and use i...
linop.h
#pragma once #include <Eigen/Dense> #include <Eigen/Sparse> #include <Eigen/IterativeLinearSolvers> #include <SmurffCpp/Utils/MatrixUtils.h> #include <SmurffCpp/Utils/Error.h> #include <SmurffCpp/Utils/counters.h> #include <SmurffCpp/SideInfo/SparseSideInfo.h> namespace smurff { namespace linop { class AtA; } } ...
constant_density_acoustic_time_scalar_1D_4.h
#ifndef __CDA_TIME_SCALAR_1D_4__ #define __CDA_TIME_SCALAR_1D_4__ #include <stdlib.h> template< typename T, int ACCURACY > void cda_time_scalar_1D_4( T* km1_u, int nr_km1_u, int nc_km1_u, // in - padded wavefield shape T* k_Phiz, int nr_k_Phiz, int nc_k_Phiz, // in - padde...
atomic-updates-2.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define irand(n) (n * (double)rand()/(RAND_MAX + 1.0)) int bucket[10]; int main() { int i; for (i = 0; i < 10; i++) bucket[i] = 1000; omp_set_num_threads(3); #pragma omp parallel private(i) for (i = 0; i < 10000; i++) { int from, to, mode, diff = 0, sum;...
1.norace6.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp parallel for schedule(runtime) for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i][j - 1]; } // CHECK: Region is Data Race Free. // END
7601.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...
template_cpu_02.h
/* Copyright 2015 The math21 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 agree...
tree-ssa-loop-ivcanon.c
/* Induction variable canonicalization and loop peeling. Copyright (C) 2004-2020 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, ...
sampler.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <gsl/gsl_sort.h> #include <gsl/gsl_math.h> // gsl_finite #ifdef _OPENMP #include <omp.h> #endif const size_t N=10000; const size_t T=1000; const size_t K=20;...
GB_unop__round_fp64_fp64.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...
pq_filter.h
/** * Skyline filter based on a priority queue */ #ifndef PQ_FILTER_H_ #define PQ_FILTER_H_ #include <queue> #include <vector> #include <math.h> #if defined(_OPENMP) #include <omp.h> //#include <parallel/algorithm> #else #include <algorithm> #define omp_get_thread_num() 0 #define omp_set_num_threads( t ) 0 #endif ...
openmp_exemplo.c
/****************************************************************************** * FILE: mm.c * DESCRIPTION: * Matrix Multiply - C Version * Modified from Blaise Barney OpenMP code. ******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <omp.h>...
task_dep-5.c
/* { dg-do run } */ #define N 128 #define BS 16 #define EPS 0.000001 #include <stdlib.h> void matmul_depend (float A[N][N], float B[N][N], float C[N][N]) { int i, j, k, ii, jj, kk; for (i = 0; i < N; i+=BS) for (j = 0; j < N; j+=BS) for (k = 0; k < N; k+=BS) // Note 1: i, j, k, A, B, C are firstpri...
graphProcessing.h
/* FINISH TEMPFLATPATH CODE AS WRITTEN, THESE FUNCTIONS WILL ONLY WORK WITH GRAPHS THAT ARE IMPLEMENTED IN THE boost NAMESPACE. */ #define LP 1 #define PERFDEBUG 0 //#define FULLDEBUG 1 #ifdef _OPENMP #include <omp.h> #endif #include <boost/regex.hpp> #include <iostream> #include <fstream> #include <string> #inc...
common.h
#ifndef __COMMOM_H__ #define __COMMOM_H__ #include <stdint.h> #include <string.h> #include "gap_common.h" #include "gap_cluster.h" #include "gap_dmamchan.h" performance_t perf; #define l2malloc malloc #define l2free free #define l1malloc L1_Malloc #define l1free L1_Free #define ANSI_COLOR_RED "\x1b[1m\x1b[...
data_env_scalar_map.c
#include <stdio.h> #include <omp.h> int main(int argc, char *argv[], char **envp) { int numdev = omp_get_num_devices(); printf ("Machine has %d GPU device%s\n", numdev, (numdev==1 ? "" : "s") ); int from = 13; int tofrom = 17; printf("ON HOST before: from = %d, tofrom = %d\n", from, tofrom); #pragma...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 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 can ob...
AnisotropicTensorUtils.h
/* * Copyright 2016 University of Basel, Medical Image Analysis Center * * Author: Christoph Jud (christoph.jud@unibas.ch) * * 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 * * ...
bfsdfs.h
namespace TSnap { ///////////////////////////////////////////////// // BFS and DFS /// Returns a directed Breadth-First-Search tree rooted at StartNId. ##GetBfsTree1 template <class PGraph> PNGraph GetBfsTree(const PGraph& Graph, const int& StartNId, const bool& FollowOut, const bool& FollowIn); /// My BFS Funct...
laplace2d.c
/* Copyright (c) 2012, NVIDIA CORPORATION. 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 copyright * notice, this list of condi...
cg.20190408_morph.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "globals.h" #include "randdp.h" #include "timers.h" #include <omp.h> //--------------------------------------------------------------------- #define CACHE_LINE_SIZE_PAD 128 #define INT_PAD_SIZE CACHE_LINE_SIZE_PAD/sizeof(int) #define DOUBLE_PAD_SIZE CA...
gemver.pluto.par.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> #define alpha 1 #define beta 1 double A[N][N +20]; double B[N][N +20]; double x[N]; double u1[N]; double u2[N]; double v1[N]; double v2[N]; double w[N]; double y[N]; double z[N]; void init_arrays() { int i, j; for (i=0; i<N; i++)...
convolution_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 ...
train9.c
#define _GNU_SOURCE #include <syscall.h> #include <sched.h> #include "graph.h" #include "mainFunctions.h" #include "powerperformacetracking.h" #include "print.h" #include <stdlib.h> #include<unistd.h> #define NO_OF_ARGS 2 //#define REPEAT 25 #define REPEAT 15 long long iters[8]; struct timeval start, end; // We d...
GB_unaryop__ainv_int64_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
time_multi_omp.c
////////////////////////////////////////////////////////////////////////////////////// // 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: Jeremy Mc...
variables.c
#include <stdio.h> int main(void) { int var1 = 1, var2 = 2; #pragma omp parallel private(var1, var2) { printf("Region 1: var1=%i, var2=%i\n", var1, var2); var1++; var2++; } printf("After region 1: var1=%i, var2=%i\n\n", var1, var2); #pragma omp parallel firstprivate(va...
rectangle_cmap.h
#pragma omp parallel for schedule(dynamic,1) reduction(+:counter) for (vidType v0 = 0; v0 < g.V(); v0++) { auto tid = omp_get_thread_num(); auto &cmap = cmaps.at(tid); for (auto v1 : g.N(v0)) { for (auto u : g.N(v1)) { if (u >= v0) break; cmap[u] = 1; } if (v1 >= v0) break; for (auto v...
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 ...
omp_clause.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> /** * 记录openmp中子句的用法 * * 包括shared, private, default, firstprivate, lastprivate, nowait, schedule, if, reduction, copyin, copyprivate, num_threads */ void omp_shared_private_default() { int i, n = 10; #pragma omp parallel for default(none) \ private(i...
ft.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - FT This benchmark is an OpenMP C version of the NPB FT code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS. ...
bicg.c
/** * bicg.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * Web address: http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardos...
rose_jacobi_avx2.c
#include "rex_kmp.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #include <immintrin.h> #include <immintrin.h> #define REAL float static double read_timer_ms() { struct timeb tm; ftime(&tm); return ((double )tm . time) * 1000.0 + ((double )tm . millitm);...