source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_emult_phase0.c
//------------------------------------------------------------------------------ // GB_emult_phase0: find vectors of C to compute for C=A.*B or C<M>=A.*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // h...
Shatter.h
#pragma once #ifndef SHATTER_H #define SHATTER_H #define NO_DEFINES #include "d3d9.h" #include "Objects\SuperSectors.h" #include "Collision.h" struct RenderableVertex : Vertex { Vertex n; BYTE color[4]; float uv[2]; RenderableVertex(float _x, float _y, float _z) : Vertex(_x, _y, _z) { } }; ...
ef_layout.h
#pragma once #include <folly/experimental/EliasFanoCoding.h> #include <iostream> #include "csr.h" #include "ef_param.h" #include "util.h" #define GET_CHUNK_SIZE(V, S, ...) get_num_chunks_vec<V, S>(__VA_ARGS__) template <size_t kSkipQuantum, size_t kForwardQuantum> class EFGraph; template <size_t kSkipQuantum, size...
dataset.h
#ifndef LIGHTGBM_DATASET_H_ #define LIGHTGBM_DATASET_H_ #include <LightGBM/utils/random.h> //#include <LightGBM/utils/text_reader.h> #include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/meta.h> #include <LightGBM/config.h> #include <LightGBM/feature_group.h> #include <vector> #include <utility> #include <fu...
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...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
GB_binop__isne_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-...
mobilenet_128.c
/* Pretrained MobileNet Convolutional Neural Network in C language and OpenMP API GitHUB Page: https://github.com/jcanore/vgg16 Author: ZFTurbo/jocare Compilation: gcc -O3 MobileNet_CPU_cifar.c -lm -fopenmp -o MobileNet_CPU_cifar Usage: MobileNet_CPU_cifar <weights_path> <file_with_list_of_...
energy.h
#pragma once #include "core.h" #include "geometry.h" #include "space.h" #include "potentials.h" #include "multipole.h" #include "penalty.h" #include "mpi.h" #include <Eigen/Dense> #include <set> #ifdef ENABLE_POWERSASA #include <power_sasa.h> #endif namespace Faunus { namespace Energy { class Energybase...
SpatialConvolutionLocal.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialConvolutionLocal.c" #else static inline void THNN_(SpatialConvolutionLocal_shapeCheck)( THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kH, int kW, int dH, int dW, int padH, int padW, int64_t inputHeight, i...
_kdtree_core.c
/* pykdtree, Fast kd-tree implementation with OpenMP-enabled queries Copyright (C) 2013 - present Esben S. Nielsen This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the Lic...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
rar5_fmt_plug.c
/* RAR 5.0 cracker patch for JtR. Hacked together during May of 2013 by Dhiru * Kholia. * * http://www.rarlab.com/technote.htm * * 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 i...
mpy_common.h
#ifndef _MPY_EXTERNAL_COMMON_H #define _MPY_EXTERNAL_COMMON_H #include <omp.h> #include <offload.h> #include <numpy/npy_os.h> /* Some usefull macros */ #ifdef NPY_OS_WIN32 #define MPY_TARGET_MIC __declspec(target(mic)) #else #define MPY_TARGET_MIC __attribute__((target(mic))) #endif /* Memset on target */ static N...
LearnerEvaluator.h
/** * evaluation: LearnerEvaluator.h * Copyright (c) Torr Vision Group, University of Oxford, 2015. All rights reserved. */ #ifndef H_EVALUATION_LEARNEREVALUATOR #define H_EVALUATION_LEARNEREVALUATOR #include "../splitgenerators/SplitGenerator.h" namespace evaluation { /** * \brief An instance of a class derivi...
data.c
#include "../mesh.h" #include "../params.h" #include "../shared.h" #include "../umesh.h" #include <math.h> #include <stdlib.h> // Allocates a double precision array size_t allocate_data(double** buf, size_t len) { #ifdef INTEL *buf = (double*)_mm_malloc(sizeof(double) * len, VEC_ALIGN); #else *buf = (double*)mallo...
QuadNodePolarEuclid.h
/* * QuadNodePolarEuclid.h * * Created on: 21.05.2014 * Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu) * * Note: This is similar enough to QuadNode.h that one could merge these two classes. */ #ifndef QUADNODEPOLAREUCLID_H_ #define QUADNODEPOLAREUCLID_H_ #include <vector> #include <algorithm> #i...
Renderer.h
#pragma once #include <Utils.h> #include <Player.h> #include <Raycaster.h> class Renderer { public: Renderer(Player* player, Field* field, Raycaster* raycaster, bool useMP, bool skipPixels) : player(player), field(field), raycaster(raycaster), useMP(useMP), skipPixels(skipPixels) {} void FillPixel(glm::vec4& po...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__minus_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_unop__log10_fc64_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...
random.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <stdbool.h> #include <string.h> #include <omp.h> #ifndef TOTAL_SEATS #define TOTAL_SEATS 20 #endif #ifndef TOTAL_THREADS #define TOTAL_THREADS 4 #endif int randomAssignment() { return rand() % TOTAL_SEATS; } int main(int argc, char **argv) { ...
pi.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main( int argc, char **argv ) { long i, num_steps = 1000000000; double step, x, sum, pi, taken; double start, stop; int num_threads = omp_get_max_threads(); if (argc > 1) { num_steps = atol(argv[1]); } printf("Calculating PI...
SpatialFullConvolutionMap.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialFullConvolutionMap.c" #else void THNN_(SpatialFullConvolutionMap_updateOutput)( THNNState *state, THTensor *input, THTensor *output_, THTensor *weight, THTensor *bias, THTensor *connTable, int nInputPlane, int nOutputPlane, int dW, int dH) { THArg...
GB_binop__land_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...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
flush-1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-gimple" } */ void f1(void) { #pragma omp flush } int x, y, z; void f2(_Bool p) { if (p) { #pragma omp flush (x) } else { #pragma omp flush (x, y, z) } } /* { dg-final { scan-tree-dump-times "__sync_synchronize" 3 "gimple...
LUT.h
/* * LUT.h * This file is part of RawTherapee. * * Copyright (c) 2011 Jan Rinze Peterzon (janrinze@gmail.com) * * RawTherapee 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 th...
convolution_winograd_transform_pack4_bf16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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 ...
rowwise_pick.h
/*! * Copyright (c) 2020 by Contributors * \file array/cpu/rowwise_pick.h * \brief Template implementation for rowwise pick operators. */ #ifndef DGL_ARRAY_CPU_ROWWISE_PICK_H_ #define DGL_ARRAY_CPU_ROWWISE_PICK_H_ #include <dgl/array.h> #include <functional> namespace dgl { namespace aten { namespace impl { // ...
pmtv.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif #include <string.h> // #define TESTING #define FINAL int main(int argc, char const *argv[]) { if (argc < 2) { fprintf(stderr, "Falta el tamanio de la matriz\n"); exit(-1); } int N = atoi(argv[1]); int *...
GB_binop__bshift_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
common.c
/**************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 3.1 * * * * ...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable 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) >...
mk_comp_key_val.c
#include "q_incs.h" #include "mk_comp_key_val.h" /* As an example, if we have 3 raw attributes with the * first one having 2 derived attributes, * second one having 4 derived attributes, * third one having 3 derived attributes, * Then, * nC = 3 * nD = 2 + 3 + 4 * nR = (2+1) * (3+1) * (4+1) * Recall +1...
7z_fmt_plug.c
/* * 7-Zip cracker patch for JtR. Hacked together during June of 2013 by Dhiru * Kholia <dhiru at openwall.com>. Unicode support and other fixes by magnum. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> * and Copyright (c) 2013-2017 magnum, and it is hereby released to the general * ...
GB_unop__cosh_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
lapl_ss.c
#include <xmmintrin.h> #include "defs.h" /* * Convert to super-site packed format */ void to_supersite(supersite *ssarr, float *arr) { for(int y=0; y<Ly; y++) for(int x=0; x<Lx/4; x++) { int vv = x + (Lx/4)*y; int v = x + (Lx)*y; ssarr[vv].site4[0] = arr[v+0*Lx/4]; ssarr[vv].site4[1] = ...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You c...
GB_AxB_dot4_template.c
//------------------------------------------------------------------------------ // GB_AxB_dot4: C+=A'*B via dot products, where C is dense //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesp...
distance_calcuation_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Aditya Ghantasala #if !defined(CHIMERA_DISTANCE_...
semantics.c
/* Perform the semantic phase of parsing, i.e., the process of building tree structure, checking semantic consistency, and building RTL. These routines are used both during actual parsing and during the instantiation of template functions. Copyright (C) 1998-2020 Free Software Foundation, Inc. Written ...
gesummv.c
/** * gesummv.c: This file was adapted from PolyBench/GPU 1.0 test * suite to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
edge_data_c2c.h
/* ============================================================================== KratosPFEMApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cim...
convolution_3x3_pack1to8.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 ...
yeefdtd.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "yeefdtd.kernel_inc.h" int openmp_kgm_eqn_core_init (openmp_pscmc_env * pe ,openmp_kgm_eqn_core_struct * kerstr ){ return 0 ;} void openmp_kgm_eqn_core_get_struct_len (size_t * len ){ ((len)[0...
test83.c
struct { int a;} b; int foo(int a, int b) { return a; } int bar(int a, int b) { return b; } void pr(char * str) {} int main() { int y = 10; int i[4]; int a = 10; int (*fptr[4])(int, int); int p[4]; p[3] = 0; fptr[3] = &foo; pr("Below"); i[3] = fptr[3](a * 10, bar(2, p[3])); #pragma omp parallel { } }
Wparentheses-3.c
/* PR c/70436 */ /* { dg-additional-options "-Wparentheses -fno-openmp" } */ int a, b, c; void bar (void); void baz (void); void f1 (void) { int i, j; if (a) /* { dg-warning "ambiguous" } */ #pragma omp for for (i = 0; i < 10; i++) if (b) bar (); else baz (); if (a) /* { dg-warning "ambi...
omp_for_nowait.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" #include "omp_my_sleep.h" int test_omp_for_nowait() { int result; int count; int j; int myarray[LOOPCOUNT]; result = 0; count = 0; #pragma omp parallel { int rank; int i; rank = omp_get_thread_num(); #pra...
pi4.c
/* * This code calculates pi using the formula to calculate * the atan(z) which is the integral from 0 to z of 1/(1+x*x) * times dx. atan(1) is 45 degrees or pi/4 */ #include <omp.h> static long num_steps = 100000; /* number of intervals */ double step; /* the size of the interva...
GB_unaryop__ainv_uint64_uint32.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_unaryop__lnot_uint32_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_unop__identity_fc64_uint16.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...
markstm.c
//** 2 functions called from i2.c **// /* Move markers by using simple Runge-Kutta method */ void movemarkomp() { /* Vx, Vy buffer */ double dvxdx,dvxdy,dvydx,dvydy,celdx,celdy,vx0,vx1,vx2,vx3,vx4,vy0,vy1,vy2,vy3,vy4,ee0,ee1,ee2,ee3,ee4,sp0,sp1,sp2,sp3,sp4,pr0,pr1,pr2,pr3,pr4; /* Water */ double vxwate...
trmv_x_dia_u_hi_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA* A, const ALPHA_Number* x, ...
DRB020-privatemissing-var-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...
tools.h
#ifndef TOOLS_H #define TOOLS_H using namespace std; const char sym[3] = {'*', '@', 'L'}; void init_mat_const(int *mat, int n, int c){ #pragma omp parallel for for(int i=0; i<n; ++i){ for(int j=0; j<n; ++j){ long index = (long)i*n + (long)j; mat[index] = c; } } } voi...
drt_dft_solver.h
#ifndef _DRT_DFT_SOLVER_ #define _DRT_DFT_SOLVER_ #include <complex> #include "toefl/toefl.h" #include "blueprint.h" #include "equations.h" namespace toefl { /*! @brief Solver for dirichlet type x-boundary conditions of the toefl equations. * @ingroup solvers */ template< size_t n> class DRT_DFT_Solver { public...
schedbench.c
/**************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 3.1 * * * * ...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2019, Shiqi...
GB_binop__pow_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...
GB_unop__one_bool_bool.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...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
pi-v8.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #endif int main(int argc, char *argv[]) { do...
laplace_par.h
#ifndef _LAPLACE_PAR_ #define _LAPLACE_PAR_ #include<omp.h> template<int SIZE> inline void initialize(double a[SIZE + 2][SIZE + 2], double b[SIZE + 2][SIZE + 2]) { #pragma omp parallel for for (int i = 0; i < SIZE + 2; i++) for (int j = 0; j < SIZE + 2; j++) { a[i][j] = 0.0; b...
blake2bp.c
/* BLAKE2 reference source code package - optimized C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software ...
static.c
static int bork; void bar(void); void foobar (void) { #pragma omp parallel { #pragma omp for lastprivate(bork) for (bork = 0; bork < 100; bork++) { bar(); } } }
Graph.h
/* * Graph.h * * Created on: 01.06.2014 * Author: Christian Staudt (christian.staudt@kit.edu), Klara Reichard (klara.reichard@gmail.com), Marvin Ritter (marvin.ritter@gmail.com) */ #ifndef GRAPH_H_ #define GRAPH_H_ #include <algorithm> #include <vector> #include <stack> #include <queue> #include <utility> ...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
7791.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...
timer.c
/* * Copyright (c) 2011-2012, Los Alamos National Security, LLC. * All rights Reserved. * * Copyright 2011-2012. Los Alamos National Security, LLC. This software was produced * under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National * Laboratory (LANL), which is operated by Los Alamos Nati...
pi_loop.c
/* This program will numerically compute the integral of 4/(1+x*x) from 0 to 1. The value of this integral is pi -- which is great since it gives us an easy way to check the answer. The program was parallelized using OpenMP by adding just four lines (1) A line to include omp...
convolution_sgemm_pack8to4_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
par_vector.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) **************************************...
gather_ref.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...
opencl_electrum_modern_fmt_plug.c
/* * This software is Copyright (c) 2017 Dhiru Kholia 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. * * Based on opencl_pbkdf2_hmac_sha512_fmt_plug.c file. */ #include "arch.h" #...
GB_unaryop__lnot_int8_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__sqrt_fp64_fp64.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...
error-correct.c
/** * Coral: short reads error correction with multiple alignments * Copyright (C) 2011 Leena Salmela <leena.salmela@cs.helsinki.fi> * * 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, ...
workng-parallel.c
#include <stdio.h> #include <stdlib.h> #include <mpi.h> #include <omp.h> #define BODIES 5000 #define TIMESTEPS 100 #define GRAVCONST 0.0000001 // global vars float mass[BODIES]; float vx[BODIES], vy[BODIES]; float x[BODIES], y[BODIES]; float dx, dy, d, F, ax, ay; void testInit(); void testInit2(); void randomInit()...
batch_shuffle_message_manager.h
/** Copyright 2020 Alibaba Group Holding Limited. 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 agreed to in w...
dnnl_common.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 ...
munit.c
/* Copyright (c) 2013-2017 Evan Nemerson <evan@nemerson.com> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy...
convolutiondepthwise_3x3_int8.h
// SenseNets is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2018 SenseNets Technology Ltd. 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 of t...
GB_binop__pair_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...
grid.c
#include <mpi.h> int *cn_c; int *ce_c; int *ec_c; int *cn_crem; int *ce_crem; int *ec_crem; int *neighbor_map; int *cedge_map; int *ecell_map; int *neighbor_maprem; int *cedge_maprem; int *ecell_maprem; GVAL **neighbor_2Dbuf; GVAL **neighbor_3Dbuf; GVAL **cedge_2Dbuf; GVAL **cedge_3Dbuf; GVAL **ecell_2Dbuf; GVAL **ece...
CPhotoconsistencyOdometryBiObjective.h
/* * Photoconsistency-Visual-Odometry * Multiscale Photoconsistency Visual Odometry from RGBD Images * Copyright (c) 2012, Miguel Algaba Borrego * * http://code.google.com/p/photoconsistency-visual-odometry/ * * All rights reserved. * * Redistribution and use in source and binary forms, with or without ...
a.35.4.c
/* { dg-do compile } */ void work (int, int); void wrong4 (int n) { #pragma omp parallel default(shared) { int i; #pragma omp for for (i = 0; i < n; i++) { work (i, 0); /* incorrect nesting of barrier region in a loop region */ #pragma omp barrier /* { dg-error "may not be closely nested" } */ work...
main.c
#include <stdio.h> #include <omp.h> #define CHUNKSIZE 2 #define N 10 int main () { int i, chunk; int numberOfThreads, threadID; int a[N], b[N], c[N]; // intial values for (i = 0; i < N; i++) a[i] = b[i] = i * 1.0; chunk = CHUNKSIZE; printf("Static scheduling\n"...
GB_binop__eq_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-...
MergeShuffle.h
#pragma once #include "DefaultRandomGenerator.h" #include "shuffle/Shuffle.h" #include <algorithm> #include <thread> #include <vector> template <class ContainerType = std::vector<uint64_t>, class RandomGenerator = DefaultRandomGenerator> class MergeShuffle : public Shuffle<ContainerType, RandomGenerator> { private: ...
GB_unop__ainv_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://...
column_matrix.h
/*! * Copyright 2017 by Contributors * \file column_matrix.h * \brief Utility for fast column-wise access * \author Philip Cho */ #ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_ #define XGBOOST_COMMON_COLUMN_MATRIX_H_ #include <limits> #include <vector> #include <memory> #include "hist_util.h" namespace xgboost { names...
bisection.c
#include "header.h" /** Finds a zero, using bisection, in the interval [a, b] of the function pointed to by fun_ptr. If no zero is found, the function returns -1.0. **/ double find_zero_bisection(double (*fun_ptr)(double), double a, double b) { const int max_iter = 100; // maximum number of iterations cons...
real_to_complex_3d.h
#ifndef SCITBX_FFTPACK_REAL_TO_COMPLEX_3D_H #define SCITBX_FFTPACK_REAL_TO_COMPLEX_3D_H #include <scitbx/fftpack/complex_to_complex.h> #include <scitbx/fftpack/real_to_complex.h> #include <omptbx/omp_or_stubs.h> #define SCITBX_FFTPACK_REAL_TO_COMPLEX_3D_NO_PRAGMA_OMP namespace scitbx { namespace fftpack { /*! \br...
ompArrayCopy.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #define ARRAY_LENGTH 1024 int main(int argc, char const *argv[]) { puts("Welcome!"); puts("Filling array..."); unsigned long int arr[ARRAY_LENGTH] = {0}; for(unsigned long int i = 0; i < ARRAY_LENGTH; ++i) arr[i] = i; puts("Array filled!"); puts("Coping ...
GB_binop__isne_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...