source
stringlengths
3
92
c
stringlengths
26
2.25M
threadpool.h
/* Copyright 2015 The TensorFlow 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 a...
remote.h
#pragma once #include "adabs/adabs.h" #include "adabs/pgas_addr.h" #include "adabs/memcpy.h" #include "adabs/tools/ptr_divider.h" namespace adabs { template <typename T> class local; /** * Maybe BYTEWISE COPIED after the copy constructor! * Make sure the copy will work fine even on different nodes */ template <t...
single1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (int i) { #pragma omp single copyprivate (i) ; #pragma omp single nowait ; #pragma omp single copyprivate (i) nowait /* { dg-error "clause must not be used together with" } */ ; #pragma omp single nowait copyprivate (i) /* { dg-error ...
integrator_whfasthelio.c
/** * @file integrator_whfasthelio.c * @brief WHFASTHELIO integration scheme. * @author Hanno Rein <hanno@hanno-rein.de> * @details This file implements the WHFast integration scheme in * Heliocentric Coordinates. * Based on WHFast, described in Rein & Tamayo 2015. * * @section LICENSE ...
shortcut_layer.c
#include "shortcut_layer.h" #include "convolutional_layer.h" #include "dark_cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_shortcut_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2, int assisted_excitation) { if(assisted_excitation) fprintf(stderr, "Shortcut Laye...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "durbin.h" /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /*d...
column_solvers.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 */ /* This file contains the implicit vertical solvers. */ #include <stdlib.h> #include <stdio.h> #include <atmostracers.h> #include "../game_typ...
nested_loop.c
#include <stdio.h> #include "assert.h" #include <unistd.h> #define TRIALS 1 #define N 960 int main() { int fail = 0; double A[N], B[N], C[N]; for (int i = 0; i < N; i++) { A[i] = 0.0; B[i] = 0.0; C[i] = 1.0; } int nte = 32; int tl = 6; int blockSize = 5; int Inner=0, Outer=0; int wayou...
GB_unaryop__identity_int32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
dpbtrs.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/zpbtrs.c, normal z -> d, Fri Sep 28 17:38:09 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
RandomGenerator.h
// // Created by tommaso on 21/11/18. // #ifndef ACTIVE_MICROEMULSION_RANDOMGENERATOR_H #define ACTIVE_MICROEMULSION_RANDOMGENERATOR_H #include <random> #include <algorithm> #include <functional> #include <boost/random/random_device.hpp> #include <boost/random/mersenne_twister.hpp> // Testing PCG generator: more info...
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 ...
sparse_matrix_multiplication_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
mainapp.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <windows.h> //This block of codes was made by M. Raihan Azhari// //------------------------------------------------ struct amalan{ //variabel amanalan ibadah harian int tahajud; int dhuha; int wajib; int tilawah; int tahfidz; struct amalan *nex...
P011.c
/*11. Design, develop and execute a parallel program in C to add, element-wise, two one dimensional arrays A and B of N integer elements and to store the result in another one dimensional array C of N integer element.*/ #include<stdio.h> #include<omp.h> int main() { int i,j,k,n,a[10],b[10],c[10]; printf("enter the s...
mergesort.c
#include <stdio.h> #include <stdlib.h> int arr[20]; // array to be sorted int main() { int n,i; const int p = 4; printf("Introduce el tamanyo del vector\n"); // input the elements scanf("%d",&n); printf("Introduce los elementos del vector\n"); // input the elements for(i=0; i<n; i++) scanf("%...
descriptors_dt.h
/* Copyright (c) 2012, MAURO BIANCO, UGO VARETTO, SWISS NATIONAL SUPERCOMPUTING CENTRE (CSCS) 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 c...
ZQ_CNN_MTCNN_AspectRatio.h
#ifndef _ZQ_CNN_MTCNN_ASPECT_RATIO_H_ #define _ZQ_CNN_MTCNN_ASPECT_RATIO_H_ #pragma once #include "ZQ_CNN_Net.h" #include "ZQ_CNN_BBoxUtils.h" #include <omp.h> namespace ZQ { class ZQ_CNN_MTCNN_AspectRatio { public: using string = std::string; ZQ_CNN_MTCNN_AspectRatio() { min_size = 60; thresh[0] = 0.6; ...
maxwell_physbdy.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...
main.c
#include <stdio.h> #include<omp.h> #include<math.h> #include <stdlib.h> int main() { // Define the domain double x_len = 2.0; double y_len = 1.0; int x_points = 251; int y_points = 251; double del_x = x_len/(x_points-1); double del_y = y_len/(y_points-1); double x[x_poin...
jacobi_par.c
/** * A parallel Jacobi iteration program for solving partial differential equations. * * Usage: ./a.out <gridSize> <numIters> <numWorkers> * Output: Prints command-line arguments used, execution time and maximum error to stdout. * Prints final grid values to a file 'seq-data.out' * * Authors: Lucas Vi...
GB_binop__first_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
pfunc.c
/* Generated by Cython 0.29.20 */ /* BEGIN: Cython Metadata { "distutils": { "name": "MulOps", "sources": [ "pfunc.pyx" ] }, "module_name": "MulOps" } END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers need...
GB_unaryop__lnot_int32_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...
673.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...
CycladesPartitioner.h
/* * Copyright 2016 [See AUTHORS file for list of authors] * * 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 require...
real_to_reciprocal.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* 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 abo...
sddmmspmm.h
#ifndef DGL_ARRAY_CPU_SDDMMSPMM_H_ #define DGL_ARRAY_CPU_SDDMMSPMM_H_ #include <dgl/array.h> #include <dgl/bcast.h> #include <math.h> #include <iostream> #include <omp.h> #include "../selector.h" #include "sddmm.h" #include "kernels.h" #define SOP_UDEF_IMPL 1 #define ROP_UDEF_IMPL 1 #define VSC_UDEF_IMPL 1 #include "fu...
omp-single-3.c
extern void abort (void); void single (int a, int b) { #pragma omp single copyprivate(a) copyprivate(b) { a = b = 5; } if (a != b) abort (); } int main() { #pragma omp parallel single (1, 2); return 0; }
openmp-ex13.c
#include <stdio.h> #include <omp.h> int main(void) { int N = 10; int i; /* The "fork" in fork-join incurs some overhead for spawning the threads */ #pragma omp parallel for for (i = 0; i < N; i++) { int my_thread = omp_get_thread_num(); printf("iteration %d, thread %d\n", i, my_thread); } printf("...
amatrix.c
/* contains routines common to direct and indirect sparse solvers */ #include "amatrix.h" #include "linsys.h" #define MIN_SCALE (1e-4) #define MAX_SCALE (1e4) #define NUM_SCALE_PASSES 10 /* additional passes don't help much */ scs_int SCS(copy_a_matrix)(ScsMatrix **dstp, const ScsMatrix *src) { scs_int Anz = src->...
reduce_weight_grads.c
int jobs = ofm * ifm * kh * kw; int jn = jobs/gp->num_numa_nodes; int jnv = jn/VLEN; int jpt = (jnv % ntps == 0) ? (jnv/ntps)*VLEN : ((jnv/ntps)+1)*VLEN; int ltid = tid - n*ntps; int tb = (ltid * jpt < jn) ? ltid*jpt : jn; int te = ((ltid+1)*jpt < jn) ? (ltid+1)*jpt : jn; float *wgp = (float*)dwt_ptr[n]+n*jn; for(int...
declare_reduction_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp-simd -emit-pch...
section_gomp.c
/****************************************************************************** * FILE: omp_workshare2.c * DESCRIPTION: * OpenMP Example - Sections Work-sharing - C Version * In this example, the OpenMP SECTION directive is used to assign * different array operations to each thread that executes a SECTION. ...
flexProxDualHuber.h
#ifndef flexProxDualHuber_H #define flexProxDualHuber_H #include "flexProx.h" //! represents prox for a Huber term /*! \f$ \alpha \|\cdot\|_{H_\epsilon} \f$ */ template<typename T> class flexProxDualHuber : public flexProx<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> Tdata; #else typedef std::vector<T>...
GB_binop__div_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
place_report_omp.c
#define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <sched.h> #include <omp.h> #include <sys/syscall.h> /* Heavily modified from xthi.c code for use with OpenMP */ /* xthi.c code is used in examples for hybrid MPI/OpenMP affinity from a few HPC sites */ /* xthi.c originally borrowed some of this code ...
GB_binop__iseq_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
ptr_and_obj_motion.c
// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu // RUN: %libomptarget-compile-run-and-check-nvpt...
solvers.h
#ifndef SOLVERS_H #define SOLVERS_H #include "loss.h" #include "regul.h" #include "list.h" #define USING_SOLVER \ typedef typename loss_type::variable_type D; \ typedef typename loss_type::value_type T; \ typedef typename loss_type::index_type I;\ typedef loss_type LT; \ using Solver<loss_type>::_L; \ ...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
example_03-ArrayOfStructs-Naive-Omp-SIMD.c
/* * SPDX-License-Identifier: BSD-3-Clause * * example_03-ArrayOfStructs-Naive-Omp-SIMD.c : * Example of SPH Density Calculation using a * naive implementation of the main density loop, * no neighbours earch, and Array of Structs (AoS) * data layout, OpenMP parallelization and SIMD * ...
uts_shm.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...
quantized_conv2d.h
/* Copyright 2018 The Blueoil 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 agre...
5-3.c
#include <omp.h> #include <stdio.h> int main() { int w = 10; #pragma omp parallel num_threads(2) #pragma omp for lastprivate(w) for (int i = 0; i < 100; i++) { int id = omp_get_thread_num(); printf("T%d:ai%d w=%d\n", id, i, w++); } printf("W=%d\n", w); }
uni_dir_ctx.h
/* * Copyright (c) 2018 Intel Corporation. All rights reserved. * This software is available to you under the BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributi...
GB_unop__identity_uint8_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...
GB_unop__identity_int16_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...
sparse_block_matrix_ccs.h
// g2o - General Graph Optimization // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard // 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 r...
LAGraph_BF_full.c
//------------------------------------------------------------------------------ // LAGraph_BF_full.c: Bellman-Ford single-source shortest paths, returns tree //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2019 LAGrap...
trmm_x_dia_n_hi_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *...
kmeans_utils.c
#include "kmeans_utils.h" #include <math.h> #include <float.h> #include "kmeans.h" #include "../../utils/fcl_logging.h" #include "../../utils/fcl_time.h" #include "../../utils/matrix/csr_matrix/csr_to_vector_list.h" #include "../../utils/matrix/csr_matrix/csr_math.h" #include "../../utils/matrix/vector_list/vector_lis...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
for_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -triple x86_64-unknown-unknown -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -t...
GB_unop__identity_int32_uint64.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...
test.c
/* /gsa/yktgsa/home/e/i/eichen/lnew/obj/bin/clang -v -I/usr/local/cuda/include -I/gsa/yktgsa/home/e/i/eichen/new-tlomp/lomp/source/lib64/ -I/gsa/yktgsa/home/e/i/eichen/new-tlomp/lomp/source/ -L/gsa/yktgsa/home/e/i/eichen/new-tlomp/lomp/source/lib64/ -L/gsa/yktgsa/home/e/i/eichen/new-tlomp/lomp/source/lib64/ -fopenmp=...
pi_parallel_pad.c
/* * Parallel pi calculator using array padding to avoid memory collisions * * Author: Matt Cufari * Version 1.0.0 * Date Created: Dec 18 2020 * Date last modified: Jan 4 2021 * */ /* * This program is extra content if there is time to cover */ #include "omp.h" #include <stdio.h> #define NUM_THREADS 6 #def...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
omp_for_schedule_guided.c
<ompts:test> <ompts:testdescription>Test which checks the guided option of the omp for schedule directive.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp for schedule(guided)</ompts:directive> <ompts:dependences>omp flush,omp for nowait,omp critical,omp single</ompts:dependences> ...
pr72781.c
/* PR middle-end/72781 */ /* { dg-do compile } */ /* { dg-additional-options "-O2 -Wuninitialized" } */ int u; void foo (int *p) { int i; #pragma omp for simd lastprivate(u) schedule (static, 32) /* { dg-bogus "may be used uninitialized in this function" } */ for (i = 0; i < 1024; i++) u = p[i]; } void bar...
GB_unop__isinf_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...
replacement_filter_impl.h
/* The MIT License (MIT) * * (c) Jürgen Simon 2014 (juergen.simon@uni-bonn.de) * * 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 ri...
GB_unaryop__abs_int64_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
traverse.h
#ifndef traverse_eager_h #define traverse_eager_h #include "exafmm.h" #include "kernel.h" namespace exafmm { //! Recursive call to post-order tree traversal for upward pass void upwardPass(Cell * Ci) { for (Cell * Cj=Ci->child; Cj!=Ci->child+Ci->numChilds; Cj++) { #pragma omp task untied if(Cj->numBodies > 100...
client.c
#include <omp.h> #include "YggInterface.h" #include <stdio.h> int model_function(char* in_buf, uint64_t length_in_buf, char** out_buf, uint64_t* length_out_buf) { // Initialize yggdrasil outside the threaded section ygg_init(); // Get the number of threads from an environment variable set in the yaml ...
sort.c
/** * @file sort.c * @author timoteus <mail@timoteus.se> */ #include "sort.h" #include "print.h" /* Use default values if not manually overridden. */ int rock_radix_bits = ROCK_USE_DEFAULT; int rock_num_threads = ROCK_USE_DEFAULT; static inline void indx_sort_thread(rock_desc_t *desc, rock_uint_t...
displacement_lagrangemultiplier_frictional_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
test3.c
int main() { int x; #pragma omp parallel { 0; int p; if (1) { 2; if (3) { #pragma omp atomic write x = 0; 4; #pragma omp barrier 5+x; } else { x=6; #pragma omp barrier 7+x; } x= 8; } else { 9+x; if (x+10) { x=11; #pragma omp barrier x=12+x; } else { 13+x...
primo_grande.c
#include <stdio.h> #include <math.h> #include <limits.h> #include <omp.h> typedef unsigned long long Entero_grande; #define ENTERO_MAS_GRANDE ULLONG_MAX int primo(Entero_grande n) { int p; Entero_grande i, s; p = (n % 2 != 0 || n == 2); if (p) { s = sqrt(n); int numberOfThreads; int offset; ...
fdtd-2d.sched.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <assert.h> #ifdef PERFCTR #include <papi.h> #include "papi_defs.h" #endif #include "decls.h" #include "util.h" #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > ...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
minion.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <omp.h> typedef struct { long long int re; long long int im; } com; typedef struct { com x; com y; } PO; typedef struct { unsigned int p; unsigned int e2; unsigned int e3; unsigned int xQ20; unsigned int xQ21;...
GB_subassign_08.c
//------------------------------------------------------------------------------ // GB_subassign_08: C(I,J)<M> += A ; no S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com See Gra...
omp-matrix-transponse.c
/***************************************************************************** Example : omp-matrix-transpose.c Objective : Write an OpenMP Program for Transpose of a Matrix and measure the performance. This example demonstrates the use of ...
checkpoint-synchronization.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <omp.h> int main() { int jobs = 41, tid; omp_set_num_threads(5); #pragma omp parallel shared(jobs) private(tid) { tid = omp_get_thread_num(); while (jobs > 0) { /...
qgaussian.h
#ifndef XFIELDS_QGAUSSIAN #define XFIELDS_QGAUSSIAN /*gpufun*/ double LongitudinalProfileQGaussian_line_density_scalar( LongitudinalProfileQGaussianData prof, double z){ const double number_of_particles = LongitudinalProfileQGaussianData_get_number_of_particles(prof); const double q = LongitudinalPr...
getStartLists.c
#include "defs.h" double getStartLists(graph* G, edge** maxIntWtListPtr, INT_T* maxIntWtListSizePtr) { //mcsim_skip_instrs_begin(); LONG_T *local_max, maxWeight; edge *maxIntWtList; LONG_T maxIntWtListSize; LONG_T *p_start, *p_end; double elapsed_time; elapsed_time = get_se...
bench.c
#include "ghost/util.h" #include "ghost/machine.h" #include "ghost/bench.h" #include "ghost/task.h" #include "ghost/timing.h" #include "ghost/cu_bench.h" #ifndef __FUJITSU #include <immintrin.h> #endif #ifdef GHOST_BUILD_MIC #ifdef GHOST_BUILD_AVX512 #define MIC_STREAMINGSTORE _mm512_stream_pd #else #define MIC_STREA...
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__round_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
drsdd.c
/*! @copyright (c) 2017 King Abdullah University of Science and * Technology (KAUST). All rights reserved. * * STARS-H is a software package, provided by King Abdullah * University of Science and Technology (KAUST) * * @file src/backends/mpi/blrm/drsdd.c * @version 1.3.0 * @auth...
pooling_2x2_pack4.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 ...
star3d4r.c
#define BENCH_DIM 3 #define BENCH_FPP 49 #define BENCH_RAD 4 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize][dimsize] = (SB_TYPE (*)[dimsize][...
axpy4.orio.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> double getClock() { struct timezone tzp; struct timeval tp; gettimeofday (&tp, &tzp); return (tp.tv_sec + tp.tv_usec*1.0e-6); } int main(int argc, char *argv[]) { double *y; double *x1; double *x2; double *x3...
outer_mult2.h
#include "CSC.h" #include "CSR.h" #include "Triple.h" #include "radix_sort/radix_sort.hpp" #include "utility.h" #include <map> #include <algorithm> #include <iostream> #include <omp.h> #include <unistd.h> #include <cstring> #include<set> #include "cpp-TimSort/include/gfx/timsort.hpp" using namespace std; static uint3...
GB_unop__identity_fp64_int16.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...
taskgroup.c
#include <omp.h> #include <stdio.h> #include <unistd.h> int main() { #pragma omp parallel #pragma omp single { #pragma omp taskgroup { { #pragma omp critical printf ("Task 1\n"); { sleep(1); #pragma omp critical printf ("Task 2\n"); } ...
ConverterOSG.h
/* -*-c++-*- IfcQuery www.ifcquery.com * MIT License Copyright (c) 2017 Fabian Gerold 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 ...
merging.c
#include "tools.h" #include <string.h> #include <stdio.h> #include <fitsio.h> #include <time.h> #include <math.h> #include <stdlib.h> /* for exit */ #include <sys/resource.h> #ifdef _OPENMP #include <omp.h> #endif #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX_FILES 500 #define MAX_FILE_LENGTH 500 #define MAX_FILE...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
8.race2.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 200 #define N 200 int main() { double A[M], B[M][N], C[N], sum = 0.0; #pragma omp parallel for // private(sum) for (int i = 0; i < M; i++) { sum = 0.0; for (int j = 0; j < N; j++) { sum += B[i][j] * C[j]; } ...
ZKBpp_bool_VERIFIER.c
/* =============================================================================== Name : ZKBpp_bool_VERIFIER.c Author : ANONYMOUS - based on Sobuno's ZKBoo v0.1 Version : 1.0 Description : Verifies a proof for BITDEC generated by ZKBpp_bool.c using ZKBpp ==========================================...
tp1.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #define N_MAX 1000 #define N_THREADS 24 #define MAT_SIZE 1024 #define M_SIZE MAT_SIZE + 2 int main() { FILE *file = fopen("result.txt", "w+"); int **G1, **G2; G1 = (int **)malloc(sizeof(int *) * M_SIZE); G2 = (int **)malloc(si...
loops.c
/** * loops.c * * Counting loops with and without OpenMP * * @author pikryukov * @version 2.5 * * e-mail: kryukov@frtk.ru * * Copyright (C) Kryukov Pavel 2012 * for MIPT Parallel Algorithms course. */ #include <stdio.h> /* fprintf, fopen, fclose */ #include <stdlib.h> /* malloc, free */ #include <math.h> ...
GB_unop__identity_uint32_uint64.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...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_subref_phase0.c
//------------------------------------------------------------------------------ // GB_subref_phase0: find vectors of C = A(I,J) and determine I,J properties //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. ...
alifold.c
/* * minimum free energy folding * for a set of aligned sequences * * c Ivo Hofacker * * Vienna RNA package */ /** *** \file alifold.c **/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef VRNA_DISABLE_BACKWARD_COMPATIBILITY #include <stdio.h>...
matmean.c
#include "matrix.h" /** \brief Computes the mean of a matrix * * \param A Input matrix * \return \f$ \textrm{mean}(\mathbf{A}) \f$ * */ mtype mat_mean(MATRIX A) { int m, n; mtype mn; m = MatCol(A); n = MatRow(A); mn = mat_sum(A)/(m*n); return mn; } /** \brief Computes row-mean of a matr...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...