source
stringlengths
3
92
c
stringlengths
26
2.25M
driver.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <stdint.h> #include <unistd.h> #include <stdlib.h> #include <omp.h> #include <mpi.h> #include <string.h> #include "TT06Gates.h" void HPM_Start(char *); void HPM_Stop(char *); typedef struct { int nCores, nThreads; struct { int coreID, threadID;} map[...
omp_false_sharing.c
#include <stdio.h> #include <omp.h> #define NUM_THREADS 4 #define ITER_LOOP 400000000 int cnt_sheep[NUM_THREADS]; int count_sheep(int); int main() { int i; #ifdef _OPENMP omp_set_num_threads(NUM_THREADS); #endif //#pragma omp parallel for for (i = 0; i < NUM_THREADS; i++) { count_sheep(i); } return 0; } int...
GB_unaryop__abs_uint64_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...
symmetry.c
/* Copyright (C) 2008 Atsushi Togo */ /* All rights reserved. */ /* This file is part of spglib. */ /* 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 abov...
pyGrid.h
#pragma once #include "Grid.h" #include "pybind11/pybind11.h" namespace py = pybind11; using namespace pybind11::literals; namespace pfc { template<class TypeGrid> class pyGrid : public TypeGrid { public: pyGrid(const Int3 & _numInternalCells, FP _dt, const FP3 & minCoords, const FP3 & _steps) : Type...
par_map.h
#pragma once #include "Defs.h" #include <functional> template <typename T> void par_fill(T* dest, int w, int h, const T value) { #pragma omp parallel for for (int y = 0; y < h; y++) { for (int x = 0; x < w; x++) { const int idx = y * w + x; dest[idx] = value; } } } template <typename T> void par_map(T* s...
normal.c
/* ============================================================================= * * normal.c * -- Implementation of normal k-means clustering algorithm * * ============================================================================= * * Author: * * Wei-keng Liao * ECE Department, Northwestern University * ...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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 // //===---------------------------...
tree.h
#ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/meta.h> #include <LightGBM/dataset.h> #include <string> #include <vector> #include <memory> namespace LightGBM { #define kMaxTreeOutput (100) /*! * \brief Tree model */ class Tree { public: /*! * \brief Constructor * \param max_leaves The n...
GB_binop__isge_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
lndsr.c
#include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <string.h> #include <unistd.h> #include <math.h> #include <stdbool.h> #include "lndsr.h" #include "keyvalue.h" #include "const.h" #include "param.h" #include "input.h" #include "prwv_input.h" #include "lut.h" #include "output.h" #include "sr.h" #inc...
main.c
/*************** 2D LBM-DEM Code **************************/ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <string.h> #include <unistd.h> #include <time.h> #include <assert.h> #include "visit_writer.h" #ifdef _OPENMP #include <omp.h> #endif // Switch on or off FLUID #define _FLUIDE_ // Maximum ...
PlacementInfo.h
/** * @file PlacementInfo.h * @author Tingyuan LIANG (tliang@connect.ust.hk) * @brief This header file mainly contains the definition of class PlacementInfo, including information related to FPGA * placement (wirelength optimization, cell spreading, legalization, packing) * @version 0.1 * @date 2021-06-03 * * @...
GB_unop__carg_fp64_fc64.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...
DRB069-sectionslock1-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...
strMdataBinary.c
// // strMdataBinary.c // pstock // // Created by takayoshi on 2016/01/26. // Copyright © 2016年 pgostation. All rights reserved. // #include <stdio.h> #include <sys/stat.h> #include <apr-1/apr_file_io.h> #include <libiomp/omp.h> #include "strMdataBinary.h" extern void strMdataBinary_loadData(const char* path, str...
weightCl.c
// % function [wcl,pc]= weightCl(E,no_allcl) // %========================================================================== // % FUNCTION: wcl = weightCl(E) // % DESCRIPTION: This function computes weight for each pair of clusters using // % their shared members (Jaccard Coefficient) // % // % INPUTS: E ...
GB_binop__bclr_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_unop__atanh_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://...
main.c
/************************************************************** The program reads a BMP image file and creates a new image that is the negative or desaturated of the input file. **************************************************************/ // To compile: gcc -c qdbmp.c && gcc -c -fopenmp main.c && gcc -fopenmp ...
2432.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 <...
ml_mg_utils.h
/* * Copyright (c) 2019, 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 law ...
GB_unop__identity_fp64_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
lud_omp.c
#include <stdio.h> #include <omp.h> extern int omp_num_threads; #define BS 16 #define AA(_i,_j) a[offset*size+_i*size+_j+offset] #define BB(_i,_j) a[_i*size+_j] #ifdef OMP_OFFLOAD #pragma offload_attribute(push, target(mic)) #endif void lud_diagonal_omp (float* a, int size, int offset) { int i, j, k; for (...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
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) #...
GB_binop__ge_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-...
em_algorithm.h
#pragma once #include <iostream> #include <vector> #include <Eigen/Core> #include <Eigen/LU> #include <cmath> #ifdef _OPENMP #include <omp.h> #endif namespace em_algorithm { template <class ARRAY_T, class ATLAS_T> bool estimate_mixture_using_atlas(const std::vector<ARRAY_T> &feat_samples, std::vector<Eig...
filter.c
/* -*- mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: sw=4 ts=8 et tw=80 */ /* filter.c * * This file contains a few time-domain processing routines, copied * without much modification from moby. * * These are mostly needed for filtering during mapping, and for * various pathol...
TSDFVoxelGridImpl.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
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 <omp-tools.h> #include "ompt-signal.h" // Used to detect architecture #include "../../src/kmp_platform.h" static co...
VolumetricFractionalMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricFractionalMaxPooling.c" #else static long* THNN_(VolumetricFractionalMaxPooling_generateIntervals)( real sample, long inputSize, long outputSize, int poolSize) { real alpha = (real) (inputSize - poolSize) / (real) (outputSize - 1); long* se...
constant_density_acoustic_time_scalar_2D_6.h
#ifndef __CDA_TIME_SCALAR_2D_6__ #define __CDA_TIME_SCALAR_2D_6__ #include <stdlib.h> template< typename T, int ACCURACY > void cda_time_scalar_2D_6( T* km1_u, int nr_km1_u, int nc_km1_u, // in - padded wavefield shape T* k_Phix, int nr_k_Phix, int nc_k_Phix, // in...
vmpush2.c
/* C Library for Skeleton 2D Electrostatic OpenMP/Vector PIC Code */ /* written by Viktor K. Decyk, UCLA */ #include <stdlib.h> #include <stdio.h> #include <complex.h> #include <math.h> #include "vmpush2.h" /*--------------------------------------------------------------------*/ double ranorm() { /* this program calc...
sm2x2avg_t3_1_1_1.c
#if (LEAF_PHASE_MATRICES_AUTOVECTORIZE) == 1 for(k=0; k != 2; ++k) { #if defined __INTEL_COMPILER __assume_aligned(scat2x2m,64); #pragma vector always #pragma code_align(64) #elif defined __GNUC__ && !defined __INTEL_COMPILER scat2x2m = (std::complex<float>*)__builtin_assume_aligned(scat2...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
PolynomialFunctor3D.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_binop__second_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
target_x86.h
/***************************************************************************** * * target_x86.h * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * * (c) 2018-2021 The University of Edinburgh * * Contributing authors: * Alan Gray (alang@epcc.ed.ac.uk) * ...
omp_bug2.c
/****************************************************************************** * FILE: omp_bug2.c * DESCRIPTION: * Another OpenMP program with a bug. * AUTHOR: Blaise Barney * LAST REVISED: 04/06/05 ******************************************************************************/ #include <omp.h> #include <stdio.h>...
GB_serialize_array.c
//------------------------------------------------------------------------------ // GB_serialize_array: serialize an array, with optional compression //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-...
double_reduction_plus_2.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> int main() { double result = 100; #pragma omp parallel reduction(+:result) { int rank = omp_get_thread_num(); result += rank; } printf("Result: %f\n", result); }
par_mgr.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) **************************************...
relic_pb_etat1.c
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (C) 2007-2013 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute...
grav_op.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/stat.h> #include "data_util_bin.c" #include <omp.h> #define STEP 10 #define DT 1.0f #define G 1.0f #define REP(i, n) for(i=0;i<n;++i) int fileSize = 0; char* fileHeader; char* fileHooter; void printThreads() { int count; #p...
bt_hash_type_128.c
/* * This software is Copyright (c) 2015 Sayantan Datta <std2048 at gmail dot com> * 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. */ #ifdef HAVE_OPENCL #include <stdlib.h> #include <stdi...
oyranos_cmm_oyra_image_scale.c
/** @file oyranos_cmm_oyra_image.c * * Oyranos is an open source Color Management System * * @par Copyright: * 2013-2016 (C) Kai-Uwe Behrmann * * @brief modules for Oyranos * @internal * @author Kai-Uwe Behrmann <ku.b@gmx.de> * @par License: * new BSD <http://www.opensource....
fill_int2c.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...
core_zsyrk.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "core_lapack.h" /*******************************************************************...
a.17.2.c
/* { dg-do compile } */ void a17_2_wrong () { int x; int *i; float *r; i = &x; r = (float *) &x; #pragma omp parallel { #pragma omp atomic *i += 1; #pragma omp atomic *r += 1.0; /* Incorrect because the atomic constructs reference the same location through incompatible types */ } }
builder.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef BUILDER_H_ #define BUILDER_H_ #include <algorithm> #include <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include "command_line.h" #include "ge...
gemm.c
#include "gemm.h" #include <math.h> #include <stdio.h> #if defined(_OPENMP) # include "my_papi.h" # include <omp.h> #endif /* * gemm1 * Algoritmo não optimizado */ #pragma GCC optimize("O0") void gemm1(float* a, float* b, float* c, int n) { int i, j, k; for (j = 0; j < n; ++j) { for (k = ...
VolumetricConvolutionMM.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricConvolutionMM.c" #else #include <ATen/div_rtn.h> #define CONV3D_OMP_THRESHOLD 20 static void inline THNN_(VolumetricConvolutionMM_shapeCheck)( THNNState *state, THTensor *input, ...
move_shallow_water_particle_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // ...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
TempAllocator.h
#ifndef TEMPALLOCATOR_H_BIJOGMF5 #define TEMPALLOCATOR_H_BIJOGMF5 #include "base/Basic.h" namespace snow { template <typename T, size_t SPACE = 1 << 20> class TempAllocator { private: static byte* ms_Data; static size_t ms_Offset; public: void* operator new(size_t sz) throw() { void* ret = NULL; if (!...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
test_utils.h
/* * Copyright (c) 2019, 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 law ...
correlationOMP.c
/** @file @author DINH Viet Huy Hubert <dinh@ifrec.osaka-u.ac.jp> @version 1.0 @section DESCRIPTION Calculate correlation values of vectors against each others in a list of vectors **/ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <assert.h> #include <omp.h> #include "correlation.h" static size_t ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mandel-omp-task-row.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
matmul.c
/* * Square matrix multiplication * A[N][N] * B[N][N] = C[N][N] * */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N 512 //#define N 16 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (do...
statistic.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB015-outofbounds-var-yes.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s /* 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@lln...
pi.c
/* Copyright since 2016 the OMPi Team Dept. of Computer Science & Engineering, University of Ioannina 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 2 of the License, ...
RelativeNeighborhoodGraph.h
#ifndef _SPTAG_COMMON_RNG_H_ #define _SPTAG_COMMON_RNG_H_ #include "NeighborhoodGraph.h" namespace SPTAG { namespace COMMON { class RelativeNeighborhoodGraph: public NeighborhoodGraph { public: void RebuildNeighbors(VectorIndex* index, const int node, int* nodes, const Basi...
GB_unaryop__minv_int16_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...
omp-axpy.c
// // omp-axpy.c // // // Created by Yaying Shi on 10/2/19. // #include "omp-axpy.h" void axpy(int N, float *Y, float *X, float a) { int i,j; //#pragma omp target map(to:X[0:N]) map(tofrom:Y[0:N]) #pragma omp parallel for for (i = 0; i < N; ++i){ Y[i] += a * X[i]; } } int ...
dropout-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 ...
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...
InitialConditions.h
// // Cubism3D // Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland. // Distributed under the terms of the MIT license. // // Created by Guido Novati (novatig@ethz.ch). // #ifndef CubismUP_3D_InitialConditions_h #define CubismUP_3D_InitialConditions_h #include "Operator.h" CubismUP_3D_NAMESPACE_BEGIN class In...
DOMINOSEC_fmt_plug.c
/* * DOMINOSEC_fmt.c (version 3) * * Notes/Domino More Secure Internet Password module for Solar Designer's JtR * by regenrecht at o2.pl, Dec 2005. * Algorithm discovery by regenrecht at o2.pl, bartavelle at bandecon.com. * * Short description. * 1. Make 128bit digest of key. (128/8=16 bytes) * 2. Do bin2hex()...
mandel-omp-task-row.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- 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 // //===---------------------------...
single_value.c
// RUN: ${CATO_ROOT}/src/scripts/cexecute_pass.py %s -o %t // RUN: diff <(mpirun -np 2 %t) %s.reference_output #include <stdio.h> #include <omp.h> int main() { int x = 0; #pragma omp parallel shared(x) { x = 42; } printf("X: %d\n", x); }
GB_unaryop__minv_uint16_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unop__erfc_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__rdiv_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
grid.c
#include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <float.h> #include <fcntl.h> #include <stdint.h> #include <complex.h> #include <fftw3.h> #include "grid.h" // Assume all uvw are zero. This eliminates all coordinate // calculations and grids only into the middle. //#define ASSUME...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
9852.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 <...
convolution_1x1_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 ...
queue.c
#include "queue.h" #include "success_or_die.h" #include "assert.h" static int my_queue = 0; #ifdef _OPENMP #pragma omp threadprivate(my_queue) #endif void notify_and_wait ( gaspi_segment_id_t const segment_id_remote , gaspi_rank_t const rank , gaspi_notification_id_t const notification_id , gaspi_n...
GB_binop__iseq_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
pi_b.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <omp.h> #define TRYS 5000000 static int throw() { double x, y; x = (double)rand() / (double)RAND_MAX; y = (double)rand() / (double)RAND_MAX; if ((x * x + y * y) <= 1.0) return 1; return 0; } int main(int argc, char **argv) { int glo...
parallel_bmm.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <omp.h> #include <time.h> #include "../inc/utils.h" #include "../inc/blocking.h" #include "../inc/bmm.h" #include "../inc/parallel_bmm.h" void blocked_bmm_shared(coo_format *C, blocked_csr *blk_A, csr_format *AA, blocked_csc *blk_B, csc_format *BB){ ...
GB_unop__identity_int8_uint32.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...
hello.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define DEF_N 10 int main(int argc, char **argv) { int def_nthreads, nthreads, tid; if (argc > 1) { def_nthreads = atoi(argv[1]); } else { def_nthreads = DEF_N; } omp_set_num_threads(def_nthreads); #pragma omp parallel p...
ch_ompss.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <assert.h> #include "ch_common.h" #include "../extrae.h" #include "../timing.h" //#ifdef _OMPSS //#warning "Compiling for OMPSS" //#endif //TODO: adjust wait() for timing static int depth; #pragma omp threadp...
ast-dump-openmp-for-simd.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp for simd for (int i = 0; i < x; i++) f...
prefix_sum.c
#include "alphasparse/util/prefix_sum.h" #include <stdio.h> #include <string.h> #include "alphasparse/util/malloc.h" #include "alphasparse/util/thread.h" #ifdef __aarch64__ #include <arm_neon.h> #endif static void vector_add(int* inout, int increment, size_t len) { size_t i = 0; #ifdef __aarch64__ int32x4_t v0, v...
flexProxDualDataL1.h
#ifndef flexProxDualL1_H #define flexProxDualL1_H #include "flexProx.h" //! represents prox for a L1 data term /*! \f$ \alpha\|\cdot-f\|_1 \f$ */ template<typename T> class flexProxDualDataL1 : public flexProx<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> Tdata; #else typedef std::vector<T> Tdata; #endi...
GB_unaryop__ainv_int8_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
VolumetricConvolutionMM.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricConvolutionMM.c" #else #define CONV3D_OMP_THRESHOLD 20 static void inline THNN_(VolumetricConvolutionMM_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, ...
axpy.c
/* * AXPY Y[N] = Y[N] + a*X[N] */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h> #include <pthread.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } /* read tim...
kernels.h
#pragma omp declare target unsigned int LCG_random(unsigned int * seed) { const unsigned int m = 2147483648; const unsigned int a = 26757677; const unsigned int c = 1; *seed = (a * (*seed) + c) % m; return *seed; } void LCG_random_init(unsigned int * seed) { const unsigned int m = 2147483648; const unsig...
nr_direct.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...