source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_binop__lxor_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
jacobi-1d.c
/** * 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 */ /* jacobi-1d.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #in...
DRB061-matrixvector1-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...
concom.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
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...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRACC_OMP_030_MxV_out_of_bounds_Copyout_yes.c
/* Matrix Vector multiplication with copying out of bounds memory from the Accelerator, by copying more Data back from the device than allocated on the host. Resulting in a segmentation fault. */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #define C 512 int *a; int *b; int *c; int init(){ for...
BubbleSort_OpenMP.c
#include <stdio.h> #include <omp.h> #include <time.h> #include <stdlib.h> #define SIZE 2000 long array[SIZE]; double avg; void BubbleSort(int start, int end){ long temp = 0; for (long i = start ; i < end ; i++ ) { for (long j = start ; j < end ; j++) { if (array[j] > array[i]) { temp = array[j]; ...
GB_unop__identity_fc64_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...
laplace_mp.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> // grid size #define GRIDY 2048 #define GRIDX 2048 #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) // smallest permitted change in temperature #define MAX_TEMP_ERROR 0.02 double T_new[GRIDX+2][GRIDY+2]; // temperature grid double T[GRIDX+...
GB_binop__max_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
cpu_kernels.h
#pragma once #include <torchaudio/csrc/rnnt/cpu/math.h> #include <torchaudio/csrc/rnnt/options.h> #include <torchaudio/csrc/rnnt/types.h> #include <cstring> #include <limits> #include <vector> namespace torchaudio { namespace rnnt { namespace cpu { template <typename DTYPE> struct LogProbs { DTYPE skip_; // blank...
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 ...
omp_parallel_sections_reduction.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" int test_omp_parallel_sections_reduction() { int sum; int known_sum; double dpt; double dsum; double dknown_sum; double dt=0.5; /* base of geometric row for + and - test*/ double rounding_error= 1.E-5; int...
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 ...
private.c
/* Copyright (c) 2013, 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 and the following disclaimer...
csr.h
/* * Copyright 2008-2009 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
gather.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...
_rsky.c
/* The batman package: fast computation of exoplanet transit light curves * Copyright (C) 2015 Laura Kreidberg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the L...
GB_split_bitmap_template.c
//------------------------------------------------------------------------------ // GB_split_bitmap_template: split a bitmap matrix into a bitmap tile //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
OMPIRBuilder.h
//===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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 // //===---------------------------...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives and clauses --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------------...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
SoaDistanceTableBA.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeongnim ...
GB_unop__identity_fp32_int64.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...
DRB109-orderedmissing-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...
zgetrs.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 ...
phono3py.c
/* Copyright (C) 2021 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...
rankSwapSort.h
#ifndef __HYPER_QUICKSORT_COMM_AVOID_H__ #define __HYPER_QUICKSORT_COMM_AVOID_H__ #include <cstdio> #include "dendro.h" // #define long long long #ifdef _PROFILE_SORT #include "sort_profiler.h" #endif #include <mpi.h> namespace par { template<typename T> int RankSwapSort(std::vector<T>& arr, MPI_Comm comm_){ ...
team.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc #include "callback.h" int main() { #pragma omp target teams num_teams(1) thread_limit(1) { printf("In teams\n"); } return 0; } // CHECK: 0: NULL_POINTER=[[NULL:.*$]] // CHECK-NOT: 0: parallel_data initially not null // CHECK-NOT...
GB_binop__islt_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #...
sbml_integration.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // 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. // // See the LICENSE file distrib...
GB_binop__plus_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
solver.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <malloc.h> #include <omp.h> #include "image.h" #include "solver.h" #include <xmmintrin.h> typedef __v4sf v4sf; //THIS IS A SLOW VERSION BUT READABLE //Perform n iterations of the sor_coupled algorithm //du and dv are used as initi...
GB_unop__identity_int16_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...
teams_host.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <omp.h> #define N 128 #define THRESHOLD 127 int main() { static float x[N],y[N] __attribute__ ((aligned(64))); float s=2.0; int return_code = 0 ; /// How can we set number of teams to number numa domains and what is the mapping? #pragma om...
callback.h
#ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #define _DEFAULT_SOURCE #include <stdio.h> #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <inttypes.h> #include <omp.h> #include <ompt.h> #include "ompt-signal.h" // Used to detect architecture #include "../../src/kmp_platform.h" static const c...
declare3.c
/* Example using the uniform and linear clauses for multidimension array access Access in the first dimension is uniform. The loop that calls the saxpy_2d() function indexes linearly through the second dimension via the variable j. */ #pragma omp declare simd uniform(x, y, d1, i, a) linear(j) void ...
GB_binop__minus_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...
DenseSegment.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
GB_binop__rminus_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unaryop__ainv_int64_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
fac_interp2.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...
omp_mm.c
/****************************************************************************** * FILE: omp_mm.c * DESCRIPTION: * OpenMp Example - Matrix Multiply - C Version * Demonstrates a matrix multiply using OpenMP. Threads share row iterations * according to a predefined chunk size. * AUTHOR: Blaise Barney * LAST REVISED:...
RCCE.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...
openmp_lock.c
#include <stdio.h> #include <omp.h> int main(){ int data=0; #pragma omp parallel num_threads(3) { for(int i = 0; i < 100; i++){ #pragma omp critical { data = data + 1; } } } printf("data = %d.\n", data); return 0; }
conv_kernel_arm.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
omp_stream.c
/******************************************************************************* * Copyright 2019 UChicago Argonne, LLC. * (c.f. AUTHORS, LICENSE) * * This file is part of the nrm-extra project. * For more info, see https://github.com/anlsys/nrm-extra * * SPDX-License-Identifier: BSD-3-Clause ******************...
GB_unop__identity_int64_int8.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...
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) ...
packet-inl.h
/*! * Copyright (c) 2014 by Contributors * \file packet-inl.h * \brief Generic packet vectorization code */ #ifndef MSHADOW_PACKET_INL_H_ #define MSHADOW_PACKET_INL_H_ #ifdef __APPLE__ #include <stdlib.h> #else #include <malloc.h> #endif #include "./base.h" #include "./tensor.h" #include "./expression.h" #includ...
ocp_nlp_sqp_rti.c
/* * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl * * This file is part o...
loopFilter.c
/*! ************************************************************************************* * \file loopFilter.c * * \brief * Filter to reduce blocking artifacts on a macroblock level. * The filter strength is QP dependent. * * \author * Contributors: * - Peter List Peter.List@t-sy...
jacobi-1d-imper.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...
residualbased_predictorcorrector_velocity_bdf_scheme_turbulent.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #if !defined(KRATOS_RESIDUALBASE...
Kernel_Serial_Base_Helper.h
//##################################################################### // Copyright 2010, Eftychios Sifakis. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### #i...
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-...
test.c
#include <stdio.h> #include "../utilities/check.h" #define N 100 int test_aligned(){ int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; int *b = a; // offload #pragma omp target map(tofrom: b[0:100]) { #pragma omp teams #pragma omp distribute simd a...
588f87_so4_icc_advfsg.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; i...
as400_des_fmt_plug.c
// AS/400 DES plugin for JtR // This software is Copyright (c) 2016 Rob Schoemaker (@5up3rUs3r) and Bart Kulach (@bartholozz) // and it is hereby released to the general public under the following terms: // Redistribution and use in source and binary forms, with or without // modification, are permitted. // // See http...
mat_default.c
// mat_default.c - default matrix implementation #include <cphis.h> #include <linalg.h> #include <stdlib.h> #include <string.h> CphisError CphisMatCreate_default( CphisMat *mat, CphisIndex numElements, int numLocalDOFRange ) { (*mat)->mat = malloc(sizeof(struct _Cp...
1386.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...
GB_binop__ldexp_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
distances_core.c
#define _GNU_SOURCE #include "distances_core.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <string.h> #include <sys/time.h> #define pi 3.141592653589793238462643383279502884197 #define nneigh 4 #define nneigh_hp 4 int yoffs[8] = { 0, 0, -1, +1, +1, +1, -1, -1 }; int xoffs[8] = {-1, +1, 0, 0, ...
parallel_section_reduction.c
// Skip testing on 64 bit systems for now! #ifndef __LP64__ #include <stdio.h> #include <math.h> #include "omp_testsuite.h" int check_parallel_section_reduction (FILE * logFile) { int sum = 7; int known_sum; double dpt, dsum = 0; double dknown_sum; double dt = 0.5; /* base of geometric row for + and - test...
csr_matvec_oomp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
GB_hyper_prune.c
//------------------------------------------------------------------------------ // GB_hyper_prune: remove empty vectors from a hypersparse Ap, Ah list //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
section.c
/** This Program uses Parallel Sections * Sai Suraj * 20/09/2021 **/ #include <stdio.h> #include <stdlib.h> #include <omp.h> void function1() { for (int i = 0; i <= 2; i++) { printf("\nSection 1 is executed by thread number : %d \n", omp_get_thread_num()); } } void function2() { fo...
graph_index.h
#ifndef YANNSA_GRAPH_INDEX_H #define YANNSA_GRAPH_INDEX_H #include "yannsa/base/type_definition.h" #include "yannsa/base/error_definition.h" #include "yannsa/base/constant_definition.h" #include "yannsa/util/sorted_array.h" #include "yannsa/util/parameter.h" #include "yannsa/util/logging.h" #include "yannsa/util/lock...
Gemm_MT_Loop1_MRxNRKernel.c
#include <stdio.h> #include <stdlib.h> #include<immintrin.h> #define alpha( i,j ) A[ (j)*ldA + (i) ] // map alpha( i,j ) to array A #define beta( i,j ) B[ (j)*ldB + (i) ] // map beta( i,j ) to array B #define gamma( i,j ) C[ (j)*ldC + (i) ] // map gamma( i,j ) to array C #define min( x, y ) ( ( x ) < ( y ) ? ...
pixrender.c
/** * My solution to being unable to * apply per-pixel effects using * the SDL2 primitive render functions * * (See header file for details on * PixBuffers) */ //#include <omp.h> #include "pixrender.h" uint32_t getColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a); /** * Precomputed 4x4 bayer matrix * to be...
csr.h
/******************************************************************************* DATA structures to store projection graph Functions to create projection graph Use CSR format to avoid individual memory allocations for each adj. list Functions in this file are SEQUENTIAL as each partition is processed by...
rose_v1_reduction_max.c
#include <omp.h> double a[10]; int foo() { double max_val = - 1e99; double min_val = 1e99; int i; #pragma omp parallel for private (i) reduction (max:max_val) reduction (min:min_val) for (i = 0; i <= 9; i += 1) { if (a[i] > max_val) { max_val = a[i]; } if (a[i] < min_val) min_val =...
main_morus.c
#include "main_morus.h" void copy_word(state_words* to, const state_words* from) { (*to)[0] = (*from)[0]; (*to)[1] = (*from)[1]; (*to)[2] = (*from)[2]; (*to)[3] = (*from)[3]; } void save_state(state* state_saved, state state, int i) { copy_word(&(state_saved[i][0]), &(state[0])); copy_word(&(state_saved[i...
nr_incore.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__identity_uint64_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
mg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG This benchmark is an OpenMP C version of the NPB MG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
DRB053-inneronly1-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...
health.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
flexProxDualL1Iso.h
#ifndef flexProxDualL1Iso_H #define flexProxDualL1Iso_H #include "flexProx.h" //! represents prox for a L1 non-data term /*! \f$ \alpha \|\cdot\|_{2,1} \f$ */ template<typename T> class flexProxDualL1Iso : public flexProx<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> Tdata; #else typedef std::vector<T> ...
GB_unaryop__identity_uint8_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
4b.c
v = start; sum = 0; for (int i = 0; i < N; i++) { sum = sum + f(v); v = v + step; } //paralelno sum = 0; #pragma omp parallel for reduction(+:sum) for (int i = 0; i < N; i++) { v = start + i * step; sum = sum + f(v); }
GB_AxB_colscale_meta.c
//------------------------------------------------------------------------------ // GB_AxB_colscale_meta: C=A*D where D is a square diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
gimple-pretty-print.c
/* Pretty formatting of GIMPLE statements and expressions. Copyright (C) 2001-2015 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> and Diego Novillo <dnovillo@google.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms o...
extra_data.c
// // Created by sachetto on 01/10/17. // #include "../config/extra_data_config.h" #include "../config_helpers/config_helpers.h" #include "../libraries_common/common_data_structures.h" real* set_commom_schemia_data(struct config *config, uint32_t num_cells, int num_par, size_t *extra_data_size) { *extra_data_si...
GB_emult_04_template.c
//------------------------------------------------------------------------------ // GB_emult_04_template: C<M>= A.*B, M sparse/hyper, A and B bitmap/full //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // S...
main.c
/*************************************************************************** * * (C) Copyright 2010 The Board of Trustees of the * University of Illinois * All Rights Reserved * ***************************************************************************/ ...
BAMarginals.h
/* +----------------------------------+ | | | *** BA Marginals *** | | | | Copyright (c) -tHE SWINe- 2016 | | | | BAMarginals.h ...
p99.h
/* This may look like nonsense, but it really is -*- mode: C -*- */ /* */ /* Except for parts copied from previous work and as explicitly stated below, */ /* the authors and copyright holders for this work are as follows: ...
actionAngleAdiabatic.c
/* C code for the adiabatic approximation */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <gsl/gsl_math.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_roots.h> #include <gsl/gsl_min.h> #include <gsl/gsl_integration.h> #ifdef _OPENMP #include <omp.h> #endif #define CHUNKSIZE ...
cygprofilesubs.c
#include "config.h" #include <stdio.h> extern void A (void); extern void B (void); extern void twice (void); void callsubs (int niter) { A(); } void A (void) { int n; #pragma omp parallel for private(n) for (n = 0; n < 2; ++n) { B (); } } void B (void) { twice (); twice (); } void twice (void) {...
mpi_approach.c
#ifdef __include_mpi #include <stdlib.h> #include <stdio.h> #include <mpi.h> #include <omp.h> #include "problem.h" #include "bignumbers.h" #include "mpi_approach.h" #include "log.h" struct ProblemSolution run_mpi_omp_iterative_brute_force ( const struct ProblemInstance instance, unsigned int iteration_size ...
parallel_blocked_ldlt.h
// // Created by kazem on 11/30/18. // #ifndef PROJECT_PARALLEL_BLOCKED_LDLT_H #define PROJECT_PARALLEL_BLOCKED_LDLT_H #include <stdlib.h> #include <cmath> #include <cassert> #include "mkl.h" #include "Reach.h" #include "Sym_BLAS.h" #undef TIMING #undef TLAST #undef TIMING1 namespace nasoq { bool ldl_left_sn_parallel...
apply_bcs_sommerfeld.h
// Boundary condtion driver routine: Apply BCs to all // boundary faces of the 3D numerical domain, filling in the // outer boundary ghost zone layers, starting with the innermost // layer and working outward. #include "sommerfeld_params.h" #include <string.h> void apply_bcs_sommer...
shape.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
GB_binop__land_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-...
firstprivate-clause.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif void main(){ int i, n=7; int a[n], suma=0; for(i=0;i<n;i++){ a[i]=i; } /*for(i=0;i<n;i++){ suma= suma + a[i]; printf("\nthread %d suma a[%d] suma=%d ", omp_get_thread_num(), i,suma); }*/ #pragma omp par...
three_step_v_p_strategy.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: June 2021 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_THREE_STEP_V_P_STRATEGY_H #define KRATOS_TH...