source
stringlengths
3
92
c
stringlengths
26
2.25M
mxEvaluateSurfValue.c
#ifdef _OPENMP #include <omp.h> #endif #define DEBUG // #include "blas.h" #include "mex.h" #define NRHS 5 #define NLHS 2 void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { /* check input & output */ if (nrhs != NRHS) { mexPrintf("Matlab:%s:InvalidNumberInput,\n", __FILE__); m...
domdec_top.c
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2008 * Copyright (c) 2012,2013, by the GROMACS development team, led by * David van der Spoel, Berk Hess, Erik Lindahl, and including many * others, as listed in the AUTHORS file in the top-level source * directory and at ...
conv_dw_kernel_rv64.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...
ExampleClusterer_Shared.h
/** * grove: ExampleClusterer_Shared.h * Copyright (c) Torr Vision Group, University of Oxford, 2017. All rights reserved. */ #ifndef H_GROVE_EXAMPLECLUSTERER_SHARED #define H_GROVE_EXAMPLECLUSTERER_SHARED #include <ORUtils/MathUtils.h> #include <ORUtils/PlatformIndependence.h> #include "../../util/Array.h" name...
GB_binop__isne_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-...
bellmanFord.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
scaling_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_SCALING_SO...
simple_matrix_dyn_array.h
#ifndef __SIMPLE_MATRIX_H #define __SIMPLE_MATRIX_H #include <iostream> #include <cstdlib> #pragma omp declare target template <typename T> class Simple_Matrix { private: unsigned n_rows; unsigned n_cols; T* matrix; public: Simple_Matrix(unsigned _n_rows, unsigned _n_cols, const T& _init_number); Simple_...
if-clauseModificado.c
/* * if-clauseModificado.c * * Created on: 28/04/2014 * Author: Carlos de la Torre */ #include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, hebras = 1, n = 20, tid; int a[n], suma = 0, sumalocal; if (a...
convolutiondepthwise_3x3_pack8.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 ...
kronecker.c
#include <stdio.h> #include <omp.h> #include <math.h> #include <complex.h> void kronecker(int *a, int *b, int *c, size_t m1, size_t n1, size_t m2, size_t n2) { #pragma omp parallel for for (size_t j1 = 0; j1 < m1; ++j1) { size_t j1n1m2n2 = j1 * n1 * m2 * n2; for (size_t i1 = 0; i1 < n1; +...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mat_mul_p4a_3000.c
/* * file for mat_mul.c */ #include "./mat_mul.h" #include "./size.h" void mat_mul(int *a, int *b, int *c); void mat_mul(int *a, int *b, int *c) { int i, j, k, t; #pragma omp parallel for private(j, t, k) for(i = 0; i <= 2999; i += 1) for(j = 0; j <= 2999; j += 1) { c[i*3000+j] = 0; for...
cblas_wrapper.c
/* # # * The source code in this file is developed independently by NEC Corporation. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
fci_rdm.c
/* * */ #include <stdlib.h> #include <string.h> //#include <omp.h> #include "config.h" #include "vhf/fblas.h" #include "fci.h" #define MIN(X,Y) ((X)<(Y)?(X):(Y)) #define CSUMTHR 1e-28 #define BUFBASE 96 #define SQRT2 1.4142135623730950488 #define BRAKETSYM 1 #define PARTICLESY...
executor.h
/* Copyright (c) 2018 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...
dbscan_graph.h
#ifndef DBSCAN_GRAPH_H #define DBSCAN_GRAPH_H #include "dataset.h" namespace { bool has_nonzero( std::vector< uint8_t >& v ) { for ( size_t i = 0; i < v.size(); ++i ) { if ( v[i] > 0 ) return true; } return false; } } namespace clustering { class DBSCAN_GRAPH : private boost::noncopya...
SE_fg_extend_fcn_kaiser_mex.c
#include "mex.h" #include "../SE_fgg.h" #include "../SE_fkg.h" void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int); #define HIN prhs[0] #define OPT prhs[1] #define HOUT plhs[0] // Output #ifndef VERBOSE #define VERBOSE 0 #endif void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray...
GB_unop__exp_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...
core_dtrtri.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_ztrtri.c, normal z -> d, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
mpncflint.c
/* $Header$ */ /* mpncflint -- netCDF file interpolator */ /* Purpose: Linearly interpolate a third netCDF file from two input files */ /* Copyright (C) 1995--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 t...
libdwt.c
/** * @file * @author David Barina <ibarina@fit.vutbr.cz> * @brief Fast wavelet transform implemented via lifting scheme. */ #include "libdwt.h" #define MEASURE_PER_PIXEL //#define DEBUG_VERBOSE //#define DISABLE_MEMCPY //#define ENABLE_LAZY_MEMCPY //#define DISABLE_Y //#define DISABLE_X //#define MEASURE_FACTOR 1...
GB_unop__tanh_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...
atomic-19.c
/* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-original" } */ /* { dg-final { scan-tree-dump-times "omp atomic release" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "omp atomic relaxed" 3 "original" } } */ /* { dg-final { scan-tree-dump-times "omp atomic read relaxed" 1 "original" } } */ /*...
hmTriDistance.c
#include "hmTriDistance.h" #include "hmVec3.h" #include "hmUtility.h" #include "hmConstants.h" #include "hmVectorSizeT.h" #include <float.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <sys/time.h> #include<OpenCL/opencl.h> void hmTriDistanceInitialize( hmTriDistance* distance...
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 ...
mixed_tentusscher_myo_epi_2004_S3_19.c
// Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S3_19.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_o...
DRB048-firstprivate-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...
rose_v1_complexCondition.c
// Contributed by Jeff Keasler // 5/24/2010 #include <omp.h> void goo(int numAB) { double *c; double *bufLoc; int k_nom_22; #if 0 #else #pragma omp parallel for private (k_nom_22) firstprivate (numAB) for (k_nom_22 = 0; k_nom_22 <= numAB * numAB * 3 - 1; k_nom_22 += 1) { #endif bufLoc[k_no...
naiv_dense_layer.c
/* Copyright (C) 2020 David Cornu for the Convolutional Interactive Artificial Neural Networks by/for Astrophysicists (CIANNA) Code (https://github.com/Deyht/CIANNA) 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...
common.h
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h> #include <cstdio> #include <string> #include <vector> #include <sstream> #include <cstdint> #include <algorithm> #include <cmath> #include <functional> #include <memory>...
mixing_time.h
/* * Created on: Sep 23, 2016 * Author: Steffen Rechner <steffen.rechner@informatik.uni-halle.de> * * This file is part of the marathon software. * * Copyright (c) 2016, Steffen Rechner * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation...
GB_binop__isgt_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__identity_int32_uint8.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...
build_depth.h
#ifndef __DepthMapping_H__ #define __DepthMapping_H__ #include <iostream> #include <vector> #include <fstream> #include <sstream> using namespace std; #include <boost/timer.hpp> // for sophus #include <sophus/se3.h> using Sophus::SE3; // for eigen #include <Eigen/Core> #include <Eigen/Geometry> using namespace Ei...
convolutiondepthwise_3x3_pack8.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 ...
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 ".....
Partition.h
/* * Partition.h * * Created on: 03.10.2013 * Author: cls */ #ifndef PARTITION_H_ #define PARTITION_H_ #include <cinttypes> #include <set> #include <vector> #include <map> #include <cassert> #include <limits> #include "../graph/Graph.h" namespace NetworKit { /** * @ingroup structures * Implements ...
Parallel_update_ldl_02_2.h
// // Created by Kazem on 1/21/19. // #ifndef PROJECT_PARALLEL_UPDATE_LDL_02_2_H #define PROJECT_PARALLEL_UPDATE_LDL_02_2_H namespace nasoq { // // Created by kazem on 12/12/18. // #include <stdlib.h> #include <cmath> #include <cassert> #include "mkl.h" #include "Reach.h" #include "Sym_BLAS.h" #undef TIMING #undef ...
GB_binop__lxor_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
cgemm.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "cgemm.fatbin.c" static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; } static inline CUresult cuMemcpyHtoD2DAsync(CUdevic...
dgelqf.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/zgelqf.c, normal z -> d, Fri Sep 28 17:38:01 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
GB_unop__tan_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
chetrs.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/zhetrs.c, normal z -> c, Fri Sep 28 17:38:07 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
GB_unop__identity_int8_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...
sstruct_matrix.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
DenseVector.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseVector.h // \brief Header file for the OpenMP-based dense vector SMP implementation // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of th...
fill_nr_s8.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <string.h> #include <math.h> //#include <omp.h> #include "config.h" #include "cint.h" #include "cvhf.h" #include "nr_direct.h" #include "optimizer.h" #define MAX(I,J) ((I) > (J) ? (I) : (J)) int GTOmax_shell_dim(int *ao_loc, int ...
stencil_parallel_vect.c
#include <stdio.h> #include <omp.h> #include <inttypes.h> #include "matrix_utils.h" int main(int argc, const char* argv[]){ if(argc==2){ int numThreads = strtoimax(argv[1], NULL, 0); if(numThreads>0){ double c[5], start_time, end_time, temp; static double g[2]...
GB_binop__land_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_binop__div_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_unaryop__abs_uint16_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
4538.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...
blackberry_ES10_fmt_plug.c
/* Cracker for BlackBerry Enterprise Server 10 hashes. * * Thanks to Nicolas RUFF for providing the algorithm details and sample * hashes! * * USE BDSMgmt; * SELECT LoginPassword FROM EASUsers; * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> * and it is hereby released to the gener...
task_types_serialized.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> __attribute__ ((noinline)) // workaround for bug in icc void print_task_type(int id) { #pragma omp critical { int task_type; char buffer[2048]; ompt_get_task_info(0, &task_type, NULL, NULL, NULL, NU...
HybridRepCenterOrbitals.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2019 QMCPACK developers. // // File developed by: Ye Luo, yeluo@anl.gov, Arg...
irbuilder_nested_parallel_for.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -verify -fopenmp -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefixes=CHECK %s // RUN: %clang_cc1 -fopenmp -fopenmp-enable-irbuilder -...
parallel_measurement.c
#include <stdio.h> #include <math.h> #include <omp.h> #include <time.h> #include <string.h> #include <stdlib.h> #define CLK CLOCK_MONOTONIC struct timespec diff(struct timespec start, struct timespec end){ struct timespec temp; if((end.tv_nsec-start.tv_nsec)<0){ temp.tv_sec = end.tv_sec-start.tv_sec-1...
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2017. AL...
common.c
#include "common.h" void printb(const uint64_t v) { uint64_t mask = 0x1ULL << (sizeof(v) * CHAR_BIT - 1); int sum = 0; do{ putchar(mask & v ? '1' : '0'); sum++; if(sum%8==0) putchar(','); } while (mask >>= 1); } void create_adjacency(const int nodes, const int lines, const int max_degree, int* res...
Example_SIMD.3.c
/* * @@name: SIMD.3c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ double work( double *a, double *b, int n ) { int i; double tmp, sum; sum = 0.0; #pragma omp simd private(tmp) reduction(+:sum) for (i = 0; i < n; i++) { tmp = a[i] + b[i]; sum += ...
loop1.c
#include <stdio.h> #include <omp.h> int main() { int i,j; int innerreps = 100; #pragma omp parallel private(j) { // for (j=0; j<innerreps; j++) { #pragma omp for schedule(static,2) for (i=0; i<32; i++) { printf ("thread %d is executing %d \n",omp_get_thread_num(),i); // ...
convolution_3x3_pack8to1.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 ...
task-taskwait-nested.c
/* * task-taskwait-nested.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-excep...
Reduced_gaussian_grid.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include "grb2.h" #include "wgrib2.h" #include "fnlist.h" /* * Reduced_gaussian_grid.c * * 10/2017: Public Domain: Wesley Ebisuzaki * * convert from reduced Gaussian to full Gaussian * need to do: convert from full Ga...
GB_unaryop__lnot_int64_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
is_initial_device.c
// RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu // RUN: %libomptarget-compile-x86_64-pc-linux-gnu -DUNUSED -Wall -Werror // only run for x86_64 host offloading: // REQUIRES: x86_64-pc-linux-gnu #include <omp.h> #include <stdio.h> int main() { int errors = 0; #ifdef UNUSED // Test if it is OK to lea...
reduction.h
#ifndef __DACE_REDUCTION_H #define __DACE_REDUCTION_H #include <cstdint> #include "types.h" #include "math.h" // for ::min, ::max #ifdef __CUDACC__ #include "../../../external/cub/cub/device/device_segmented_reduce.cuh" #include "../../../external/cub/cub/device/device_reduce.cuh" #include "../../../ext...
GxB_stats.c
//------------------------------------------------------------------------------ // GxB_stats: return memory usage and other statistics //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved. // http://suitesparse....
fdtd-2d.pluto.par.l2tile.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> #define tmax T #define nx N #define ny N double ex[nx][ny +1]; double ey[nx +1][ny]; double hz[nx][ny]; void init_arrays() { int i, j; for (i=0; i<nx+1; i++) { for (j=0; j<ny; j++) { ey[i][j] = 0; } ...
GB_binop__lxor_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
mosaic.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include "common.h" /** abritrary maximum number of colours */ #define MAXCOLOURS 24 /** the colours */ static pixel_t colours[MAXCOLOURS]; static size_t ncolours = 0; static unsigned char distrib[256]; /** used to add a new colour */ void m...
global.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 di...
GB_binop__rminus_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
Fig_10.1_parClaws.c
// sample compile command: "gcc -fopenmp -c Fig_10.1_parClaw.c" to generate *.o object file #include <stdio.h> #include <stdlib.h> #include <omp.h> // initialization and transform functions // (we will not show the function bodies) extern void initMats(int N, float *A, float *T); extern void transform(int N, int id,...
middle6r.c
/* * Date: 11 December 2015 * Contact: Thomas Peyrin - thomas.peyrin@gmail.com */ /* * Simulation of boomerang analysis for Skinny * Date: March 21, 2020 * Author: Hosein Hadipour * Contact: hsn.hadipour@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #in...
Jacobi1D-NaiveParallel-OMP_static.test.c
/****************************************************************************** * Jacobi1D benchmark * Basic parallelisation with OpenMP * * Usage: * make omp * export OMP_NUM_THREADS=8 * bin/Jacobi1D-NaiveParallel-OMP `cat src/$V.perfexecopts` * For a run on 8 threads *****************************************...
GB_unop__abs_uint32_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_emult_template.c
//------------------------------------------------------------------------------ // GB_emult_template: phase1 and phase2 for C=A.*B, C<M>=A.*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suit...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
init.h
#ifndef GoL_CHUNK_INIT_H #define GoL_CHUNK_INIT_H #include <mpi.h> // Enable MPI support #include <stdio.h> #include <sys/types.h> // Custom includes #include "chunk.h" #include "../utils/func.h" /** * Allocate memory for the current and next slice of GoL data. */ void malloc_chunk(chunk_t *chunk) { int i; ...
semi_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
thdat105.c
/* * 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 this list * of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce t...
GB_unop__isnan_bool_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...
diagmm_x_bsr_u_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include <memory.h> #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number ...
conv_dw_kernel_mips.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...
floorplan.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...
target_teams_distribute_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}} #pragma omp target teams distribute simd // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}} #pragma omp target teams distrib...
hermm_c_dia_n_hi_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include <memory.h> #include <stdlib.h> alphasparse_status_t ONAME(const ALPHA_Complex alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Complex *x, const ALPHA_INT columns, const ALPHA_INT ld...
tiger_fmt_plug.c
/* Tiger cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary ...
threadprivate.c
// OpenMP ThreadPrivate Example // Inclusions #include <omp.h> #include <stdio.h> #include <stdlib.h> // Global Variable for ThreadPrivate int num = 0; // Main int main( int argc, char** argv ) { // Disable Dynamic Threads omp_set_dynamic( 0 ); // Set Num as ThreadPrivate #pragma omp threadprivate( num ...
DemBones.h
/////////////////////////////////////////////////////////////////////////////// // Dem Bones - Skinning Decomposition Library // // Copyright (c) 2019, Electronic Arts. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// ...
vsum.c
// // vsum.c : Demo of multi-target mulit-source OpenMP offload // #include <stdio.h> void vsum(int*a, int*b, int*c, int N){ #pragma omp target teams map(to: a[0:N],b[0:N]) map(from:c[0:N]) #pragma omp distribute parallel for for(int i=0;i<N;i++) { c[i]=a[i]+b[i*2]; } }
close_manual.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 #include <omp.h> #include <stdio.h> // -------...
main_omp.c
// // main_serial.cc // Non-parallelized version of Mandelbrot set calculation // Created by Joshua Wallace on 2/12/15. // #include <stdio.h> #include <stdlib.h> #include <complex.h> #include <omp.h> /*The following function computes z_{n+1} given z_n and the real and imaginary component of c*/ double complex ne...
oyranos_convert.c
/** @file oyranos_convert.c * * Oyranos is an open source Color Management System * * @par Copyright: * 2012-2018 (C) Kai-Uwe Behrmann * * @brief ICC conversion - on the command line * @internal * @author Kai-Uwe Behrmann <ku.b@gmx.de> * @par License: * new BSD <http://www.o...
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) ...
update_ops_named_H.c
#include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _USE_SIMD #ifdef _MSC_VER #include <intrin.h> #include <iostream> #else #include <x86intrin.h> #endif #endif //void H_gate_old_parallel(UINT target_qubit_index, CTYPE *state, ITYPE dim); //void H_gate_sin...
GB_unop__identity_uint8_int64.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...
eavlScatterOp.h
// Copyright 2010-2013 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_SCATTER_OP_H #define EAVL_SCATTER_OP_H #include "eavlCUDA.h" #include "eavlDataSet.h" #include "eavlArray.h" #include "eavlOpDispatch.h" #include "eavlOperation.h" #include "eavlException.h" #include <time.h> #ifdef HAVE_OPENM...