source
stringlengths
3
92
c
stringlengths
26
2.25M
RobustPoseOptimization.h
/** * Copyright (c) 2017 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include "saiga/core/util/Range.h" #include "saiga/core/util/Thread/omp.h" #include "saiga/vision/VisionTypes.h" #include "saiga/vision/kernels/BAPose.h" #include "saiga/vision/kernel...
pngquant.c
/* pngquant.c - quantize the colors in an alphamap down to a specified number ** ** Copyright (C) 1989, 1991 by Jef Poskanzer. ** ** Permission to use, copy, modify, and distribute this software and its ** documentation for any purpose and without fee is hereby granted, provided ** that the above copyright notice appea...
count_neighbor_functor.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
GB_cast_array.c
//------------------------------------------------------------------------------ // GB_cast_array: typecast an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See GraphBLAS...
c_print_results.c
/*****************************************************************/ /****** C _ P R I N T _ R E S U L T S ******/ /*****************************************************************/ #include <stdlib.h> #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void c_print_results( char *name, ...
rose_v1_shared.c
/* * dependence graph: */ #include <omp.h> void foo() { int i; int x; int a[100]; #pragma omp parallel for private (i) for (i = 0; i <= 99; i += 1) { a[i] = a[i] + 1; } } /* non loop carried anti dependence for array accesses : level =1 > 0 dep SgExprStatement:a[i] =((a[i]) + 1); SgExprStatemen...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
10.norace2.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 100 int main() { int A[N], B[N]; #pragma omp parallel shared(A) num_threads(2) { #pragma omp sections // nowait { for (int i = 0; i < N; i++) { A[i] = i; } #pragma omp section for (int i = 0; i < N;...
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...
preGraphConstruction.c
/* Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk) This file is part of Velvet. Velvet 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, or (at your opt...
csr_matvec.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) **************************************...
BenchUtils.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <chrono> #include <functional> #include <vector> #include <immintrin.h> #ifdef US...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
decode_file.c
#include <ristretto_elgamal.h> #include <stdio.h> #include <stdlib.h> #include <time.h> /* * output must have sufficient space for the maxfilesize. */ void ristretto_elgamal_decode(uint8_t *output, const point_t *input, const size_t point_num, size_t *filesize_ret, const size_t maxfilesize) { size_t num_of_5...
gemm_symm_int8.h
// chgemm is pleased to support the open source community by supporting ncnn available. // // author:tpoisonooo (https://github.com/tpoisonooo/chgemm) implement symmetric int8 GEMM on aarch64. // // Copyright (C) 2019 tpoisonooo. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you ma...
frontier.c
#include <omp.h> #include <stdatomic.h> #include <stdbool.h> #include <stdlib.h> #include "frontier.h" #include "types.h" void prefix_sum(u32 *a, u32 len) { for (u32 i = 1; i < len; i += 1) { a[i] = a[i] + a[i - 1]; } } void prefix_sum_omp(u32 *a, u32 len) { u32 *local; #pragma omp parallel { u32 id ...
c-omp.c
/* This file contains routines to construct OpenACC and OpenMP constructs, called from parsing in the C and C++ front ends. Copyright (C) 2005-2015 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>, Diego Novillo <dnovillo@redhat.com>. This file is part of GCC. GCC is free...
GB_unaryop__ainv_int8_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
spinless_fermion_basis_core.h
#ifndef _SPINLESS_FERMION_BASIS_OP_H #define _SPINLESS_FERMION_BASIS_OP_H #include <complex> #include "hcb_basis_core.h" #include "numpy/ndarraytypes.h" #include "openmp.h" namespace basis_general { template<class I> void mergeSort(I nums[],I work[],const I left,const I mid,const I right, bool &f_count){ I left...
GB_unop__identity_int64_fc64.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...
displacement_lagrangemultiplier_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
omp_atomic.h
/* //@HEADER // ***************************************************************************** // // omp_atomic.h // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC // (NTESS). Under the terms of Cont...
GB_unop__identity_int32_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...
master.c
/* $ gcc -fopenmp -O2 src/master.c -o bin/master master lo ejecuta solo la hebra 0 diferencias entre single y master: - single se parece a master, pero en single es la primera que llegue y la master la ejecuta la hebra 0 - master no tiene barrera, single si $ export OMP_NUM_THREADS=3 $ ./bin/master 6 thread ...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
kdtree_minkowski.h
/* kdtree_minkowski.h * * Author: Fabian Meyer * Created On: 08 Nov 2018 * License: MIT * * Implementation is based on cKDtree of the scipy project and the splitting * midpoint rule described in "Analysis of Approximate Nearest Neighbor * Searching with Clustered Point Sets" by Songrit Maneewongvatana an...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 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 can ob...
StringPool.h
// // Created by Timm Felden on 04.11.15. // #ifndef SKILL_CPP_COMMON_STRINGPOOL_H #define SKILL_CPP_COMMON_STRINGPOOL_H #include <set> #include <vector> #include <unordered_set> #include "../api/StringAccess.h" #include "../streams/FileInputStream.h" namespace skill { using namespace api; namespace interna...
ellipticBuildContinuous.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 limitatio...
MergeCombinedOtherStartIndexWorklet.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
DOT_Solver.h
/** * @fileoverview Copyright (c) 2019-2021, Stefano Gualandi, * via Ferrata, 1, I-27100, Pavia, Italy * * @author stefano.gualandi@gmail.com (Stefano Gualandi) * */ #pragma once #include <omp.h> #include "DOT_Histogram2D.h" #include "DOT_NetSimplex.h" #include "DOT_NetSimplexUnit.h" struct cop...
raytracer.h
#pragma once #include "resource.h" #include <iostream> #include <linalg.h> #include <memory> #include <omp.h> #include <random> using namespace linalg::aliases; namespace cg::renderer { struct ray { ray(float3 position, float3 direction) : position(position) { this->direction = normalize(direction); } ...
NETSPLITLM_fmt_plug.c
/* * NETHALFLM_fmt.c * Written by DSK (Based on NetLM/NetNTLM patch by JoMo-Kun) * Performs brute-force cracking of the HalfLM challenge/response pairs. * * Modified for performance and OMP support by magnum 2011 * * Storage Format: * domain\username:::lm response:nt response:challenge * * NOTE, in loader.c,...
GB_unop__identity_uint8_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...
dynmat.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
GB_binop__bset_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
parallel-psum.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #define N 8 int main() { int sum[2][N], a[N]; int log_of_N = (int)ceil(log(N)/log(2)); int i, j; int in = 1, out = 0; sum[0][0] = sum[1][0] = 0; for(i = 0; i < N; i++) { a[i] = i+1; sum[0][i+1] = a[i]; sum[1][i+1] = 0; } ...
pr26943-2.c
/* PR c++/26943 */ /* { dg-do run } */ extern int omp_set_dynamic (int); extern void abort (void); int a = 8, b = 12, c = 16, d = 20, j = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; int main (void) { int i; omp_set_dynamic (0); #pragma omp parallel for shared (a, e) firstprivate (b, f) \ last...
matmul_float_avx2.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...
ast-dump-openmp-target-update.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(int x) { #pragma omp target update to(x) } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dum...
knncpp.h
/* knncpp.h * * Author: Fabian Meyer * Created On: 22 Aug 2021 * License: MIT */ #ifndef KNNCPP_H_ #define KNNCPP_H_ #include <Eigen/Geometry> #include <vector> #include <map> #include <set> #ifdef KNNCPP_FLANN #include <flann/flann.hpp> #endif namespace knncpp { /*********************************...
bml_add_dense_typed.c
/* Needs to be included before #include <complex.h>. */ #ifdef BML_USE_MAGMA #include "magma_v2.h" #endif #include "../../macros.h" #include "../../typed.h" #include "../blas.h" #include "../bml_add.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_parallel.h" #include "../bml_scale.h" #inclu...
loopA1.c
/************************************************************************* DESCRIPTION: Parallelizing an inner loop with dependences Backward dependency for (iter=0; iter<numiter; iter++) { for (i=0; i<size-1; i++) { V[i] = V[i]+V[i+1]; } } Method: Eliminate dependences by duplicating data ...
mhpTest4.c
int bar(); char * foo() { int y; bar(); #pragma omp barrier } char bar() { int z; #pragma omp barrier foo(); } int main() { #pragma omp parallel { int x; foo(); x = 10; } }
depthwise_convolution_3x3.c
/* * Copyright (C) 2016-2022 T-Head Semiconductor Co., Ltd. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * 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 * * www.apache....
diagsm_x_sky_n_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, cons...
trsm_c_sky_u_hi_row_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT num_thread = alpha_get_thread_num(); #ifdef _OPEN...
GB_AxB_saxpy5_iso_or_pattern.c
//------------------------------------------------------------------------------ // GB_AxB_saxpy5_iso_or_pattern.c: C+=A*B; C full, A bitmap/full and iso/pattern //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserv...
queue.h
// -*- C++ -*- // Copyright (C) 2007-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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...
cvtriad.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <math.h> /* Schönauer vector triad benchmark See https://blogs.fau.de/hager/archives/tag/benchmarking */ void vtriad(int N, int nrepeat) { /* Allocate memory on heap*/ double *a=malloc(N*sizeof(double)); double *b=malloc(N*sizeof(double))...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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) #...
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...
linear_tree_learner.h
/*! * Copyright (c) 2020 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREELEARNER_LINEAR_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_LINEAR_TREE_LEARNER_H_ #include <string> #include <cmath> #include ...
test.c
/* * Copyright (c) 2009, 2010, 2011, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #include <assert.h>...
radix_sort.h
#ifndef _PCL_RADIX_SORT_ #define _PCL_RADIX_SORT_ #include <utility> #include <limits> #include "utils.h" #ifndef BKT_BITS #define BKT_BITS 12 #endif template<typename T> using Key_Value_Pair = std::pair<T, T>; template<typename T> Key_Value_Pair<T>* radix_sort_parallel(Key_Value_Pair<T>* inp_buf, Key_Value_Pair<T...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
YAKL_parallel_for_fortran.h
#pragma once namespace fortran { template <class T> constexpr T fastmod(T a , T b) { return a < b ? a : a-b*(a/b); } /////////////////////////////////////////////////////////// // LBnd: Loop Bound -- Describes the bounds of one loop /////////////////////////////////////////////////////////// cla...
GB_unop__sqrt_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://...
target_data_messages.c
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s void foo() { } int main(int argc, char **argv) { int a; #pragma omp target data // expected-error {{expected at least ...
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) #...
matrix_vector_functions_intel_mkl_ext.c
#include <stdio.h> #include "matrix_vector_functions_intel_mkl.h" #include "matrix_vector_functions_intel_mkl_ext.h" #include <math.h> #include "mkl.h" /* C = beta*C + alpha*A(1:Anrows, 1:Ancols)[T]*B(1:Bnrows, 1:Bncols)[T] */ void submatrix_submatrix_mult_with_ab(mat *A, mat *B, mat *C, int Anrows, int Ancol...
tensor_cpu-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 ...
FFTMD.h
/* Copyright (c) 2021, Moscow Center for Diagnostics & Telemedicine All rights reserved. This file is licensed under BSD-3-Clause license. See LICENSE file for details. */ #ifndef FFTMD_h__ #define FFTMD_h__ /*! * \file FFTMD.h * \date 2017/05/26 16:07 * * \author kulberg * * \brief * * TODO: long description * * ...
dataset.h
/* Copyright (c) 2016, TU Dresden All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the...
main.c
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <assert.h> #ifdef __APPLE__ #include <OpenCL/opencl.h> #else #include <CL/cl.h> #endif #define MAX_GPU (0x8) #define MAX_SOURCE_SIZE (0x100000) #define DEVICENUM (0x2) #define MAX_INPUT (20000) int main(void) { // Create the two input vecto...
SwathFileConsumer.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
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 // //===---------------------------...
fgm_interface.omp.c
#include "fgm.h" #include "omp.h" //int fgmInit(uint32_t * list, uint32_t listLen, int rdLen) //return value is a success/fail indicator //{ //} typedef struct cgmResult { int read[3]; // 16 bases in each int uint32_t* matches; // pointer to list of match locations int length; /...
convolutiondepthwise_5x5_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 ...
Fig_4.9_piparCpadSum.c
#include <stdio.h> #include <omp.h> #define NTHREADS 4 #define CBLK 8 static long num_steps = 100000000; double step; int main () { int i, j, actual_nthreads; double pi, start_time, run_time; double sum[NTHREADS][CBLK]={0.0}; step = 1.0 / (double) num_steps; omp_set_num_threads(NTHREADS); sta...
cpu_adagrad.h
#pragma once #define NOMINMAX // Windows idiosyncrasy // https://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c #include <cuda_fp16.h> #include <cuda_runtime_api.h> #include <stdio.h> #include <cassert> #include "cuda.h" #include "custom_cuda_layers.h" #include "sim...
roi_align.c
#include <TH/TH.h> #include <math.h> #include <omp.h> void ROIAlignForwardCpu(const float* bottom_data, const float spatial_scale, const int num_rois, const int height, const int width, const int channels, const int aligned_height, const int aligned_width, const float * botto...
MathTools.h
/** * \file * \author Thomas Fischer * \date 2010-01-13 * \brief Definition of math helper functions. * * \copyright * Copyright (c) 2013, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * ...
5386.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...
compatibility.h
// -*- C++ -*- // Copyright (C) 2007-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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...
GB_binop__rminus_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
CSC.h
#ifndef _CSC_H_ #define _CSC_H_ #include "Deleter.h" #include "HeapEntry.h" #include <algorithm> #include <cassert> #include <cstdlib> #include <iostream> #include <tuple> #include <vector> #include <random> #include "BitMap.h" #include "utility.h" #include <numeric> #include "Triple.h" extern "C" { #include "GTgrap...
StopEventGraphBuilder.h
/********************************************************************************** Copyright (c) 2020 Tobias Zündorf MIT License 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 rest...
linear_algebra.c
#include "../include/linear_algebra.h" #include <omp.h> void modular_multiplication(mpz_t a, mpz_t b, mpz_t c, mpz_t n) { mpz_mul (a, b, c); mpz_mod (a, a, n); } unsigned get_k_i(word ** M, unsigned long k, unsigned long i) { unsigned long I = i / N_BITS; unsigned long n_shift = N_BITS - ((i % N_BITS...
rotth.c
/* * rotth.c * * does rotation of complex array tvar through real angle thetb * Input array does NOT have guard cells, so it uses CELTNDX2 * and CELTNDX3 index macros. * */ #ifdef _OPENMP #include <omp.h> #endif #include <stdio.h> #include "light.h" #include "pf3dbench.h" #include "util.h" #include "runparm....
GB_unop__identity_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
elemwise_binary_op.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 ...
conv_2d.h
// Copyright 2018 Xiaomi, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
mkl_util.h
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
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) ...
DOMINOSEC8_fmt_plug.c
/* Cracks Notes/Domino 8+ H-hashes. Thanks to philsmd and atom, for publishing * the algorithm. * * This file is based on DOMINOSEC_fmt_plug.c (version 3). * * The following description of the algorithm was published by philsmd, on * hashcat forums. * * H-hashes depends on (both of) the older "dominosec" hash t...
Efficient_RANSAC.h
// Copyright (c) 2015 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // You can redistribute it and/or modify it under the terms of the GNU // General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your op...
DRACC_OMP_029_MxV_out_of_bounds_Copyin_Enter_Data_other.c
/* Matrix Vector multiplication with copying out of bounds memory on the Accelerator with target enter data. Vector a allocates more space than need, doesn't affect the result of the computation. */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #define C 512 int *a; int *b; int *c; int init(){ fo...
comm.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 ...
openmp-ex02.c
#include <stdio.h> #include <omp.h> int main(void) { int max_threads = 5; printf ("You're all individuals!\n"); omp_set_num_threads(max_threads); /* now we have two competing values for the number of threads in this * region: who wins? */ #pragma omp parallel num_threads(7) { printf("Yes, we're all ...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
4530.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...
ThreadDeadLock_tests.c
/* * ThreadDeadLock_tests.c * * Created on: Oct 24, 2012 * Author: fgirmay */ /** * This code tests for potential deadlocks. The code is not yet mature. testDeadLock */ /** #include <stdio.h> #include <stdlib.h> #include <unistd.h> double testDeadLock(int iterations) { double pi; int add = 0; p...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ctrmm.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "ctrmm.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...
teams-distr-on-host.c
// The test supposes no offload, pure host execution. // It checks that the bug in implementation of distribute construct is fixed. // RUN: %libomp-compile-and-run // UNSUPPORTED: icc #include <stdio.h> #include <omp.h> int main() { const int size = 4; int wrong_counts = 0; omp_set_num_threads(2); #pragma om...