source
stringlengths
3
92
c
stringlengths
26
2.25M
clm.c
#include "clm.h" #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "model.h" #include "type.h" #include "util.h" lbfgsfloatval_t evaluate_clm(void *instance, const lbfgsfloatval_t *x, lbfgsfloatval_t *g, const int n, ...
reduction_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Denis Demidov...
nstream-usm-target.c
/// /// Copyright (c) 2019, Intel Corporation /// /// Redistribution and use in source and binary forms, with or without /// modification, are permitted provided that the following conditions /// are met: /// /// * Redistributions of source code must retain the above copyright /// notice, this list of conditions ...
fill_r_3c.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
GB_binop__second_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-...
empty.c
/* { dg-do compile } */ /* { dg-options "-O -fopenmp -fdump-tree-ompexp" } */ int main() { #pragma omp parallel {;} } /* There should not be a GOMP_parallel_start call. */ /* { dg-final { scan-tree-dump-times "GOMP_parallel_start" 0 "ompexp"} } */
make_graph.c
/* Copyright (C) 2009-2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
omp_for_firstprivate.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" int sum1; #pragma omp threadprivate(sum1) int test_omp_for_firstprivate() { int sum; int sum0; int known_sum; int threadsnum; sum = 0; sum0 = 12345; sum1 = 0; #pragma omp parallel { #pragma omp sing...
convolution_sgemm.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. 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 of the License at // //...
HelloOpenMP_fix3.c
#include <stdio.h> #include <omp.h> int main(int argc, char *argv[]){ #pragma omp parallel { int nthreads = omp_get_num_threads(); int thread_id = omp_get_thread_num(); #pragma omp single { printf("Goodbye slow serial world and Hello OpenMP!\n"); printf(" I have %d thre...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
FlopCounterFunctor.h
/** * @file FlopCounterFunctor.h * * @date 22 Jan 2018 * @author tchipevn */ #pragma once #include "autopas/pairwiseFunctors/Functor.h" #include "autopas/utils/ArrayMath.h" namespace autopas { /** * This class helps in getting the number of performed floating point * operations. It is a functor that only calc...
GB_unaryop__minv_uint16_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
SB_TV_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...
_grave.c
//HESAFF void detectKeypointsList(int num_fpaths, // char** image_fpath_list, // float** keypoints_array, // uint8** descriptors_array, // int* length_array, // ...
libtorch_utils.h
#ifndef libtorch_UTILS #define libtorch_UTILS /* Copyright (c) 2019, Sanaxen All rights reserved. Use of this source code is governed by a MIT license that can be found in the LICENSE file. */ #include <random> #include "util/utils.h" #ifdef USE_IMAGE_UTIL #include "util/Image.hpp" #endif namespace cpp_torch { ...
GB_unaryop__ainv_uint8_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
RCCE_lib.h
// // Copyright 2010 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by app...
GB_unop__identity_fp64_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pr71371.c
/* PR middle-end/71371 */ /* { dg-do compile } */ void baz (int *); void foo (void) { int i; #pragma omp taskloop for (i = 0; i < 100; i++) baz (&i); } void bar (void) { int i; #pragma omp parallel { #pragma omp for for (i = 0; i < 100; i++) baz (&i); } }
GB_binop__pow_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
main.c
/* Il programma funziona solo de il numero di elementi dell'array è esattamente divisibile per il numero di core. Per esempio con N = 8 e t = 4. */ #include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { int N, i, t, nloc; float sumtot, sum, *a; sumtot = 0; printf("Inserire N: "); ...
hypergraph_cut.h
#ifndef HYPERGRAPHCUT_H #define HYPERGRAPHCUT_H #include "submodular.h" #include <vector> #include "../la/vector.h" template<class DT> class HyperEdge { public: std::vector<int64_t> v; DT w; HyperEdge(std::vector<int64_t> v_in, DT w_in) : v(v_in), w(w_in) {} }; template<class DT> class HyperCut final : ...
ex1-vector-addition-openmp.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define VALIDATE 0 #if VALIDATE #include "validate.h" #endif void vec_add(const size_t, const int * restrict, const int * restrict, int * restrict); void usage(char**); int main(int argc, char **argv) { int *u,*v,*w; size_t i,n; double t0,t1; ...
GB_binop__lt_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-...
mandelbrot.c
/* * mandelbrot.c: edge detection * (c)2010-2018 Seiji Nishimura * $Id: mandelbrot.c,v 1.1.1.3 2018/09/11 00:00:00 seiji Exp seiji $ */ #include <math.h> #include <pixmap.h> #include <palette.h> #include <stdbool.h> #define ROUND(x) ((int) round(x)) #define MIN(x,y) (((x)<(y))?(x):(y)) #define MAX(x,y) (((x)>(y))...
sections-4.c
/* PR c++/24613 */ /* { dg-compile } */ #pragma omp section /* { dg-error "may only be used in" } */ int i; void foo (void) { #pragma omp section /* { dg-error "may only be used in" } */ i++; }
utils.h
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
GB_unaryop__ainv_int8_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...
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_binop__isne_int16.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_split_full_template.c
//------------------------------------------------------------------------------ // GB_split_full_template: split a full matrix into a full tile //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Licen...
tinyexr.h
#ifndef TINYEXR_H_ #define TINYEXR_H_ /* Copyright (c) 2014 - 2021, Syoyo Fujita and many contributors. 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 th...
GB_unop__abs_fp32_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...
simple_env.c
// RUN: %libomp-compile // RUN: env OMP_DISPLAY_AFFINITY=true OMP_AFFINITY_FORMAT='TESTER-ENV: tl:%L tn:%n nt:%N' OMP_NUM_THREADS=8 %libomp-run | %python %S/check.py -c 'CHECK-8' %s // REQUIRES: !abt #include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char** argv) { #pragma omp parallel { }...
GB_unop__minv_uint8_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...
coordinate_common.h
/*! * Copyright 2018 by Contributors * \author Rory Mitchell */ #pragma once #include <algorithm> #include <string> #include <utility> #include <vector> #include <limits> #include "xgboost/data.h" #include "xgboost/parameter.h" #include "./param.h" #include "../gbm/gblinear_model.h" #include "../common/random.h" n...
atomic-15.c
// { dg-do run } extern void abort (void); int x = 6; int main () { int v, l = 2, s = 1; #pragma omp atomic x = -3 + x; #pragma omp atomic read v = x; if (v != 3) abort (); #pragma omp atomic update x = 3 * 2 * 1 + x; #pragma omp atomic read v = x; if (v != 9) abort (); #pragma...
innerProd.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 t...
trans.c
/*Daala video codec Copyright (c) 2013 Daala project contributors. 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 o...
eavlInfoTopologyMapOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_INFO_TOPOLOGY_MAP_OP_H #define EAVL_INFO_TOPOLOGY_MAP_OP_H #include "eavlCUDA.h" #include "eavlCellSet.h" #include "eavlCellSetExplicit.h" #include "eavlCellSetAllStructured.h" #include "eavlDataSet.h" #include "eavlArray.h" #...
GB_unop__tanh_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
kmp_detach_tasks_t1.c
// RUN: %libomp-compile && env OMP_NUM_THREADS='3' %libomp-run // RUN: %libomp-compile && env OMP_NUM_THREADS='1' %libomp-run // REQUIRES: !abt #include <stdio.h> #include <omp.h> #include "omp_my_sleep.h" // detached untied #define PTASK_FLAG_DETACHABLE 0x40 // OpenMP RTL interfaces typedef unsigned long long kmp_u...
DormandPrinceSolver.h
#pragma once #include "../DifferentialSolver.h" template<typename Scalar> class DormandPrinceSolver : public DifferentialSolver<Scalar> { public: using DifferentialSolver<Scalar>::timeStep; using DifferentialSolver<Scalar>::currTime; using DifferentialSolver<Scalar>::tolerance; using DifferentialSolver<Scalar>...
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) >...
task_early_fulfill.c
// RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' \ // RUN: %libomp-run | %sort-threads | FileCheck %s // REQUIRES: ompt // Checked gcc 10.1 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10 // clang supports detach clause s...
sum.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <sys/time.h> enum { N = 10000000 }; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec + (double)t.tv_usec * 1E-6; } double sum(double *v, int low, int high) { if (low == high) ...
GB_transpose.c
//------------------------------------------------------------------------------ // GB_transpose: C=A' or C=op(A'), with typecasting //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifie...
q3.c
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include "common.h" const i32 REPEAT_COUNT = 512; typedef struct { i32 x; i32 y; i32 temp; } heat_source; typedef struct { i32 dim_x; i32 dim_y; i32 heat_count; heat_source* heat_sources; } heat_data; heat_data* ge...
DenseVector.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseVector.h // \brief Header file for the OpenMP-based dense vector SMP implementation // // Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved // // This file is part ...
uts_omp_task_shmem.c
/* * ---- The Unbalanced Tree Search (UTS) Benchmark ---- * * Copyright (c) 2010 See AUTHORS file for copyright holders * * This file is part of the unbalanced tree search benchmark. This * project is licensed under the MIT Open Source license. See the LICENSE * file for copyright and licensing i...
Example_target_mapper.2.c
/* * @@name: target_mapper_map.2.c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_5.0 */ #include <stdio.h> // N MUST BE EVEN #define N 100 typedef struct dzmat { double r_m[N][N]; double i_m[N][N]; } dzmat_t; #pragma omp declare mapper( top_...
pchetrf_aasen.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/pzhetrf_aasen.c, normal z -> c, Fri Sep 28 17:38:12 2018 * **/ #include <math.h> #include "plasma_async.h"...
GB_unop__expm1_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...
parallel_sort.h
#include "utility.h" #ifndef PARALLEL_SORT_STL_H #define PARALLEL_SORT_STL_H namespace internal { std::size_t g_depth = 0L; // The lower cutoff boundary const std::size_t cutoff_low = 100; // The higher cutoff boundary const std::size_t cutoff_high = 1000; template<class BidirIt, class _Pred> ...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2018 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2018 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
ClusterCreator.h
//class for running clustering algorithm on Charts struct ClusterCreator { //takes a chart id map that was created by grid/octree clusters, and creates a list of Chart objects static uint32_t create_chart_clusters_from_grid_clusters(Polyhedron &P, const double cost_threshold , ...
idasFoodWeb_bnd_omp.c
/* * ----------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU * Based on idaFoodWeb_bnd.c and parallelized with OpenMP * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2021, Lawr...
edge_data.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Antonia Larese // #if !defined(KRATOS_EDGE_DA...
9.norace6.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 40 int main() { int F[N], x = 1, y = 1; #pragma omp parallel { #pragma omp single firstprivate(x, y) for (int i = 3; i < N; i++) { F[i] = x + y; y = x; x = F[i]; } } return 0; } // We do not support...
section.c
#include <omp.h> #include <stdio.h> #define N 100 #define chunk 10 main () { int i; float a[N], b[N], c[N], d[N]; /* Some initializations */ for (i=0; i < N; i++) { // a[i] = i * 1.5; // b[i] = i + 22.35; a[i] = i * 1.0; b[i] = i * 1.0; } #pragma omp parallel shared(a,b,c,d) private(i) { #prag...
core_cttmqr.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zttmqr.c, normal z -> c, Fri Sep 28 17:38:25 2018 * **/ #include <plasma_core_blas.h> #include "pla...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
PixelBasedRenderFunc.h
#include"..\Core\SanTypes.h" #include"SanGraphics.h" namespace San { namespace Graphics { #ifndef __SANPIXELBASEDRENDERFUNC_H__ #define __SANPIXELBASEDRENDERFUNC_H__ struct PIXCAMERA { SVECTOR3 Coord; SVECTOR3 LookAt; SVECTOR3 Dir; SVECTOR3 UpDir; sfloat Cutoff; sfloat Near; sfloat Far; SV...
regul.h
#ifndef REGUL_H #define REGUL_H #include "linalg.h" Timer timer_global, timer_global2, timer_global3; enum regul_t { L2, L1, ELASTICNET, L1BALL, L2BALL, FUSEDLASSO, L1L2, L1LINF, NONE, L1L2_L1, INCORRECT_REG }; static bool is_regul_for_matrices(const regul_t& reg) { return reg==L1L2 || reg==L1LINF; } template <...
GB_binop__plus_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
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...
matmul_double.c
/* * Square matrix multiplication * A[N][N] * B[N][N] = C[N][N] * */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N 512 //#define N 16 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (do...
GB_unaryop__one_bool_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...
single2.c
/* * a pragma immediately following another */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void foo(void) { int num_threads =0; #pragma omp parallel #pragma omp single num_threads = omp_get_num_threads(); } void sort_par (int size) { #pragma omp parallel #pragma omp single nowait #pragma omp tas...
private-clauseModificado3.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num()0 #endif main(){ int i,n=7; int a[n], suma; for(i=0;i<n;i++) a[i]=i; #pragma omp parallel //private(suma) { suma=0; #pragma omp for for(i=0; i<n; i++){ suma=suma+a[i]; printf ("thread %d suma a[...
GB_binop__min_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
update_ops_pauli_multi.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif /** * perform multi_qubit_Pauli_gate with XZ mask. * * This function assumes bit_flip_mask is not 0, i.e., at least one bit is fli...
main.c
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <time.h> #include <omp.h> #define NDEBUG #ifndef NDEBUG #define DEBUG(cmd) cmd; #else #define DEBUG(cmd) ; #endif // Check if number is prime bool is_prime(int n) { DEBUG( int thread_id = omp_get_thread_num(); printf(...
GB_unop__identity_uint64_uint16.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...
par_strength.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) **************************************...
ccv_bbf.c
#include "ccv.h" #include "ccv_internal.h" #include <sys/time.h> #ifdef HAVE_GSL #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #endif #ifdef USE_OPENMP #include <omp.h> #endif const ccv_bbf_param_t ccv_bbf_default_params = { .interval = 5, .min_neighbors = 2, .accurate = 1, .flags = 0, .size = { 24, 2...
par_csr_matrix.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__frexpx_fp64_fp64.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...
sgemm.c
/*********************************************************************/ /* Copyright 2009, 2010 The University of Texas at Austin. */ /* All rights reserved. */ /* */ /* Redistribution and use in...
GB_binop__eq_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
yolov2_forward_network_quantized_origin.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 MAX_VAL_8 (256/2 - 1) /...
omp_fill_taskqueue.c
// RUN: %libomp-compile && env KMP_ENABLE_TASK_THROTTLING=0 %libomp-run // RUN: %libomp-compile && env KMP_ENABLE_TASK_THROTTLING=1 %libomp-run // REQUIRES: !abt && !icc #include<omp.h> #include<stdlib.h> #include<string.h> /** * Test the task throttling behavior of the runtime. * Unless OMP_NUM_THREADS is 1, the m...
dpbsv.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/zpbsv.c, normal z -> d, Fri Sep 28 17:38:08 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
atomic.c
#include <stdio.h> #include <omp.h> int sum = 0; int main(int argc, char const *argv[]) { #pragma omp parallel num_threads(3) { #pragma omp atomic sum += 10; #pragma omp barrier printf("%d\n", sum); } return 0; }
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convolution_sgemm_pack4.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 ...
rundata.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "gomptestdata.h" #define MAXN 5100 /* Max value of N */ //static int N; /* Matrix size */ static int procs; /* Number of processors to use */ /* Matrices and vectors */ //static volatile float A[MAXN][MAXN], B[MAXN], X[MAXN]; //static volatile floa...
DenseMatrix.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseMatrix.h // \brief Header file for the OpenMP-based dense matrix SMP implementation // // Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved // // This file is part ...
nested_loop.c
/* * This example illustrates nested loop parallelization with OpenMP * * @author Apan Qasem */ #include<stdlib.h> #include<stdio.h> #include <omp.h> #define M 4 int main(int argc, char *argv[]) { int N = atoi(argv[1]); omp_set_num_threads(N); int j, k; #pragma omp parallel for private(j) collapse(2...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
Tutorial.h
//================================================================================================= /*! // \file blaze/Tutorial.h // \brief Tutorial of the Blaze library // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or modify...
pr85696.c
/* PR c/85696 */ #ifndef __cplusplus void foo (int n, int a[][n]) { #pragma omp parallel shared(a) default(none) #pragma omp master a[23][0] = 42; } #endif void bar (int n, void *p) { int (*a)[n] = (int (*)[n]) p; #pragma omp parallel shared(a) default(none) #pragma omp master a[23][0] = 42; }
bondarenko_2004.c
#include <stdlib.h> #include "bondarenko_2004.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } SET_ODE_INITIAL_CONDITIONS_CPU(set_model_initial_conditions_cpu) { sv[0] = -82.4...
conv_direct_hcl_x86.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...
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 ...
CBasedTraversal.h
/** * @file CBasedTraversal.h * @author C. Menges * @date 26.04.2019 */ #pragma once #include "autopas/containers/cellPairTraversals/CellPairTraversal.h" #include "autopas/utils/ArrayMath.h" #include "autopas/utils/DataLayoutConverter.h" #include "autopas/utils/ThreeDimensionalMapping.h" namespace autopas { /**...
cpu_resample.h
// 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...