source
stringlengths
3
92
c
stringlengths
26
2.25M
2.hello_shared.c
#include <stdio.h> #include <omp.h> /* If the OMP_NUM_THREADS variable is set to 8 with */ /* export OMP_NUM_THREADS=8 */ /* Q1: Is the execution of the program correct? Add a */ /* data sharing clause to make it correct */ /* Q2: Are the lines always printed in the same...
DRB012-minusminus-var-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
nusd.c
#pragma warning(disable : 4996) #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <locale.h> #define _CRT_SECURE_NO_WARNINGS #define min(x,y) ((x) < (y) ? (x) : (y)) #define max(x,y) ((x) > (y) ? (x) : (y)) #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) ...
QuadNode.h
/* * QuadNode.h * * Created on: 21.05.2014 * Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu) */ #ifndef QUADNODE_H_ #define QUADNODE_H_ #include <vector> #include <algorithm> #include <functional> #include <assert.h> #include "../../auxiliary/Log.h" #include "../../auxiliary/Parallel.h" #include ".....
target-3.c
/* { dg-do run } */ #include <stdlib.h> #define N 100000 void init (long long *a1, long long *a2) { long long s = -1; int i; for (i = 0; i < N; i++) { a1[i] = s; a2[i] = i; s = -s; } } void check (long long *a, long long *b) { int i; for (i = 0; i < N; i++) if (a[i] != b[i]) ...
zsymm.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 ...
permute.c
// Permutations that enable SSE and AVX vectorization. #include "fasttransforms.h" void permute(const double * A, double * B, const int N, const int M, const int L) { #pragma omp parallel for if (N < 2*M) for (int j = 0; j < M; j += L) for (int i = 0; i < L*N; i++) B[(L*i)%(L*N)+(L*i)/(L*N...
paged_text_inl.h
/* * nvbio * Copyright (c) 2011-2014, 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,...
nr_sgx_direct.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_unaryop__abs_int8_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...
GB_binop__lt_int64.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_unop__isfinite_bool_fc64.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...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "omp.h" #include "functions.h" int main (int argc, char **argv) { int Nthreads = 20; omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will make your program ru...
dgemv.c
/* * Copyright (c) 2017-2019 Triad National Security, LLC * All rights reserved. * * This file is part of the libquo project. See the LICENSE file at the * top-level directory of this distribution. */ #include <stdlib.h> #include <stdio.h> #include <stdbool.h> #include <stdint.h> #include...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Sampler.h
/** * @file Sampler.h * * @brief This private head contains the definition of the Sampler type * * @author Stefan Reinhold * @copyright Copyright (C) 2018 Stefan Reinhold -- All Rights Reserved. * You may use, distribute and modify this code under the terms of * the AFL 3.0 li...
proposal.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
quest.h
/** * Copyright 2021 Huawei Technologies Co., Ltd * * 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...
comm.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 ...
ep.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - EP This benchmark is an OpenMP C version of the NPB EP code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
ConnectedComponentsAnalysisKeepLargestRegionImageFilter.h
/* * MIT License * * Copyright (c) 2018-2019 Benjamin Köhler * * 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, c...
fast.c
#include "omp.h" #include "fast.h" /* THRESHOLD used on circular_detection */ #define FAST_THRESHOLD 255 void make_offsets(int32_t offset[], uint32_t width) { offset[0] = 0 + width * 3; offset[1] = 1 + width * 3; offset[2] = 2 + width * 2; offset[3] = 3 + width * 1; offset[4] = 3 + width * 0; ...
nr_numint.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 ...
3d25pt.c
/* * Order-2, 3D 25 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)...
rose_slowInput.c
#include "omp.h" typedef double real8; /************************************************************************ * Function : StressZero * * Purpose : ************************************************************************/ void StressZero(real8 *newSxx,real8 *newSyy,real8 *newSzz,real8 *newTxy,real8 *newTx...
task-dependency.c
/* * task-deoendency.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 ...
pr6.c
//Write an OpenMP program to show how thread private clause works. #include <omp.h> #include<stdio.h> int a, b, i, tid; float x; #pragma omp threadprivate(a, x) int main () { /* Explicitly turn off dynamic threads */ omp_set_dynamic(0); printf("1st Parallel Region:\n"); #pragma omp parallel private(b,tid) { ...
GB_unop__identity_int8_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...
b-sum.h
const static unsigned long N = 100*1000*1000; typedef array<TYPE, N> array_t; //////////// CREATE ARRAY array_t A; for (size_t i=0; i<N-1; i+=2) { A[i] =1; A[i+1]=2; } A[333] = 3; // for max() testing /////////////////////////////////////////// cout << "*** SUM type:" << typeid(TYPE).name() << endl; #if...
tree.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_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/dataset.h> #include <LightGBM/meta.h> #include <string> #include <map> #includ...
reorder_and_optimize_modelpart_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pooyan Dadvand // // #if !defined(KRATOS_REORDER...
lu_par_loop.c
#include "trace.h" #include "common.h" /* This routine performs the LU factorization of a square matrix by block-columns */ void lu_par_loop(Matrix A){ int i, j; /* Initialize the tracing system */ trace_init(); #pragma omp parallel private (i) { for(i=0; i<A.NB; i++){ #pragma omp single {...
GB_assign_zombie3.c
//------------------------------------------------------------------------------ // GB_assign_zombie3: delete entries in C(:,j) for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
write_output.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* Here, the output is written to grib and/or netcdf files and integrals are written to text files if configured that way. In addition t...
trsm_x_sky_n_lo_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, cons...
mttkrp.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "mttkrp.h" #include "thd_info.h" #include "tile.h" #include "util.h" #include "mutex_pool.h" /* XXX: this is a memory...
GB_binop__band_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...
dgeinv.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/zgeinv.c, normal z -> d, Fri Sep 28 17:38:05 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
loss.h
#ifndef LOSS_H #define LOSS_H #include "data.h" #define VECM Vector<typename M::value_type> enum loss_t { SQUARE, LOGISTIC, HINGE, SQHINGE, SAFE_LOGISTIC, MULTI_LOGISTIC, PPA, INCORRECT_LOSS }; static bool is_loss_for_matrices(const loss_t& loss) { return loss==SQUARE || loss==MULTI_LOGISTIC; } static bool is_...
reduce_demo.c
//------------------------------------------------------------------------------ // GraphBLAS/Demo/Program/reduce_demo: reduce a matrix to a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
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...
dcraw.c
#ifndef IGNOREALL /* dcraw.c -- Dave Coffin's raw photo decoder Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net This is a command-line ANSI C program to convert raw photos from any digital camera on any computer running any operating system. No license is required to download and use dcraw...
common.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_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h>...
GB_binop__div_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...
extra_mixed_models.c
// // Created by berg on 03/04/19. // #include "../config/extra_data_config.h" #include "../config_helpers/config_helpers.h" #include "../libraries_common/common_data_structures.h" SET_EXTRA_DATA (set_mixed_model_if_x_less_than) { uint32_t num_active_cells = the_grid->num_active_cells; *extra_data_size = siz...
non_local_operator.h
// Copyright (c) 2013-2017 Anton Kozhevnikov, Thomas Schulthess // 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, ...
urnlearning_simulation.c
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <errno.h> #include <inttypes.h> #include "urnlearning_urns.h" #include "urnlearning_game.h" #include "urnlearning_simulation.h" #include "randomkit.h" #include "commander.h" #include "timestamp.h" #ifdef _OPENMP #include <omp.h> #e...
pointernoaliasing-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...
covariance_teams.c
/** * covariance.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@stud...
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...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
voronoinoise.h
#pragma once #ifndef VORONOI_NOISE_H #define VORONOI_NOISE_H #include "noisecommon.h" #define DEFAULT_VORONOI_FREQUENCY 1.0 #define DEFAULT_VORONOI_DISPLACEMENT 1.0 #define DEFAULT_VORONOI_SEED 0 #define DEFAULT_VORONOI_ENABLE_DISTANCE true #define DEFAULT_VORONOI_POSITION_X 0.0 #define DEFAULT_VORONOI_POSITION_Y 0.0...
omp-axpy3.c
// // omp-axpy.c // // // Created by Yaying Shi on 10/2/19. // #include "omp-axpy.h" void axpy(int N, float *Y, float *X, float a) { int i,j; //#pragma omp target map(to:X[0:N]) map(tofrom:Y[0:N]) #pragma omp parallel for for (i = 0; i < N; ++i){ Y[i] += a * X[i]; printf("this a tset: %f %f\n",X[i],...
app.c
/** * Christina Giannoula * cgiannoula: christina.giann@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <dpu.h> #include <dpu_log.h> #include <unistd.h> #include <getopt.h> #include <assert.h> #include <math.h> #include <omp.h> #include "../support/common.h" #i...
SegmentationUtil.h
/** * spaint: SegmentationUtil.h * Copyright (c) Torr Vision Group, University of Oxford, 2016. All rights reserved. */ #ifndef H_SPAINT_SEGMENTATIONUTIL #define H_SPAINT_SEGMENTATIONUTIL #include <boost/mpl/identity.hpp> #include <orx/base/ORImagePtrTypes.h> namespace spaint { /** * \brief This class provides...
Example_task_dep.10.c
/* * @@name: task_dep.7c * @@type: C * @@compilable: no * @@linkable: no * @@expect: failure * @@version: omp_5.0 */ extern int longTaskA(), shortTaskB(); extern int shortTaskAC(int,int), longTaskBC(int,int); void foo (void) { int a, b, c; c = 0; #pragma omp parallel #pragma omp single { #pragma omp task...
ten_tusscher_2004_RS_CPU_epi_S2.c
// Ten Tusscher version for the Scenario 2 (AP + max:dvdt + Rc) #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S2.h" 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->numb...
GB_unaryop__abs_bool_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...
SwathFileConsumer.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
libimagequant.c
/* ** © 2009-2018 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <stdbool.h> #include <stdint...
direct.c
#include <stdlib.h> #include <string.h> #include <complex.h> #include <math.h> #include <fftw3.h> /* Define OpenMP locking functions if locking is not used. */ #ifdef _OPENMP #include <omp.h> #else typedef int omp_lock_t; int omp_set_lock (omp_lock_t *x) { return 0; } int omp_init_lock (omp_lock_t *x) { return 0; } i...
convolution_1x1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
QMC_Main.h
/*************************************************************************** * Copyright (C) 2009-2013 by Florian Goth * * fgoth@wthp095 * * * * All rights reserved. * * ...
many-microtask-args.c
// RUN: %libomp-compile-and-run #include <stdio.h> int main() { int i; int i1 = 0; int i2 = 1; int i3 = 2; int i4 = 3; int i5 = 4; int i6 = 6; int i7 = 7; int i8 = 8; int i9 = 9; int i10 = 10; int i11 = 11; int i12 = 12; int i13 = 13; int i14 = 14; int i15 = 15; int i16 = 16; int...
GB_unop__identity_bool_uint16.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...
hw2b-v1.c
#ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #define PNG_NO_SETJMP #include <sched.h> #include <assert.h> #include <png.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include <mpi.h> #include <pthread.h> void write_png(const char* filename, int iters, int width, int height, const int...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__frexpe_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...
get_vdw0.c
#include <stdio.h> #include <string.h> #include "mcce.h" #include <sys/timeb.h> //int n_elem; //float C6_matrix[N_ELEM_MAX][N_ELEM_MAX]; //float C12_matrix[N_ELEM_MAX][N_ELEM_MAX]; FILE *vdwf; void get_vdw0(PROT prot) { int i_res, i_conf, i_atom; get_connect12(prot); setup_vdw_fast(prot); ...
GB_binop__bor_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-...
convolutiondepthwise_3x3_pack8_fp16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
q1.c
#include<stdio.h> #include<omp.h> int main(){ int num = 5, id; omp_set_dynamic(0); #pragma omp parallel num_threads(2) { id = omp_get_thread_num(); // Reader thread if(id == 0){ while(1){ #pragma omp critical { ...
GB_subassign_01.c
//------------------------------------------------------------------------------ // GB_subassign_01: C(I,J) = scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free...
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...
jacobi_parallel_omp.c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <stdbool.h> #include <omp.h> #include <memory.h> #include "matrix.h" #include "jacobi.h" jacobi_result* jacobi_parallel_omp(matrix *m, int thread_count, bool verbose) { int k = 0, t, termina = 0; double norma = 0, norma_ant = 0, n1 = 0, n2 = 0; //...
tanh_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...
GB_unop__acosh_fc32_fc32.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...
coordinator.c
/* This source file is part of GAME-DA, which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME-DA */ /* This file coordinates the data assimilation process. */ #include <stdlib.h> #include "enum.h" #include "game-da.h" #include <stdio.h> #include <string.h> #include <math.h> #incl...
zgels.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 ...
Stmt.h
//===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
GB_unop__tanh_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
omp_section_private.c
<ompts:test> <ompts:testdescription>Test which checks the omp section private directive by upcounting a variable in a to several sections splitted loop.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp section private</ompts:directive> <ompts:dependences>omp critical</ompts:dependen...
OmpForEndLink.c
int main() { int i; #pragma omp for for (i = 0; i < 10; i++) { 123; } }
tensor_operators.h
#pragma once template <typename Type> tensor<Type> tensor<Type>::operator+=(tensor<Type> const& other) { if (shape().first == other.shape().first && other.shape().second == 1) { #pragma omp parallel for for (int64_t i = 0; i < shape().first; ++i) { auto const elem = other[{i, 0}]; for (int64_t j = 0; j <...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
triangle_counting.h
#pragma once #include "util/containers/boolarray.h" #include "util/graph/graph.h" #include "util/libpopcnt.h" #include "util/intersection/set_inter_cnt_utils.h" #define MAX_PACK_NUM (32768) #define FIRST_RANGE_SIZE (32768) using row_ptr_t = uint32_t; template<typename OFF, typename WI, typename WC> void PackWords(gr...
convolution_1x1_pack8to1_int8.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 ...
top_k_v2_op.h
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
ccluster_ext.c
#include <Python.h> #include <numpy/arrayobject.h> #include <stdio.h> #include <stdlib.h> #include <float.h> #include <omp.h> static PyObject *cclusterError; /* Returns a kmeans-clustering of all the N observations. points is a NxM matrix whereas each row is an observation k is the number of clusters the...
mandel.c
#include <math.h> #include <stdlib.h> #include <time.h> #include <stdio.h> #include <omp.h> #include <sys/time.h> typedef struct Complex { long double real; long double imaginary; } Complex; typedef unsigned char RGB_Pixel[3]; static const unsigned char MAX_RGB_VAL = 255; static const int Image_Width = 5000; ...
diagmv_x_sky_n.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_Number ...
DRB009-lastprivatemissing-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
edgeList.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
MultiwayMerge.h
#ifndef _MULTIWAY_MERGE_H_ #define _MULTIWAY_MERGE_H_ #include "CombBLAS.h" namespace combblas { /* Multithreaded prefix sum Inputs: in: an input array size: the length of the input array "in" nthreads: number of threads used to compute the prefix sum Output: return an array of size "size+1" ...
ls_affinity.c
/* Copyright (c) 2013 Janne Blomqvist Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
loop-15.c
/* { dg-do run } */ volatile int ji = 100, ki = 2; volatile unsigned int ju = 100, ku = 2; volatile long long int jll = 100, kll = 2; volatile unsigned long long int jull = 100, kull = 2; unsigned long long l; void f0 (void) { int i, j, k; unsigned int j2, k2; #pragma omp for reduction(+: l) schedule(runtime) ...
print.c
/* Copyright (c) 2010-2011, Jun Namikawa <jnamika@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "A...
detector_backup.c
#include "darknet.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; void train_detector(char *datacfg, cha...
lineindex_lib.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> #include "lineindex_lib.h" #include <assert.h> #define DEF_LINEINDEX_SIZE 1000 void lineindex_resize(lineindex_table * lineindex, size_t size) { assert(lineindex->size<size); char ** ptr = (char**)malloc(sizeof(char**)*size); if (lineinde...