source
stringlengths
3
92
c
stringlengths
26
2.25M
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...
NlpGPlacer.h
/** * @file NlpGPlacer.h * @brief The global placement solver with non-linear optimization * @author Keren Zhu * @date 03/29/2020 */ #ifndef IDEAPLACE_NLPGPLACER_H_ #define IDEAPLACE_NLPGPLACER_H_ #include <Eigen/Dense> #ifdef IDEAPLACE_TASKFLOR_FOR_GRAD_OBJ_ #include <taskflow/taskflow.hpp> #endif // IDEAPLACE_...
GB_unaryop__abs_uint16_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
simpar-mpi.c
#include <mpi.h> #include <omp.h> #include "array_list.h" #include "structures.h" #define NUM_PARTICLES_BUFFER 10000 #define CONVERT_TO_LOCAL(id, p, n, x) (x - BLOCK_LOW(id, p, n) + 1) enum { TAG_INIT_PARTICLES, TAG_SEND_CENTER_OF_MASS, TAG_SEND_PARTICLES }; node_t* adjacent_processes[8] = {0}; array_list_t* parti...
region_5.tfm.c
void foo(int N, int *A) { int TSize = 4; int T[4]; #pragma spf region name(ignore) for (int I = 0; I < TSize; ++I) T[I] = I; #pragma spf region name(parallel) #pragma omp parallel { #pragma omp for default(shared) for (int I = 0; I < N; ++I) { A[I] = I; for (int J = 0; J < TSize; ++J) ...
VerticalConvolution.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VerticalConvolution.c" #else static int nnconv1d_(VerticalConvolution_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor); int nInputPlane = luaT_getfieldcheckint(L, 1, "nInputPlane"); int nOutputPlane = luaT_getfieldch...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__minus_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...
sparse_msg_restrict.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
GB_unop__bnot_int16_int16.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...
ast-dump-openmp-begin-declare-variant_decl_1.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s // expected-no-diagnostics // FIXME: We have to improve the warnings here as nothing is impacted by the declare varian...
GB_unaryop__identity_int16_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
gen06.c
/* Description: This program implements my Genetic Algorithm method of solving the "N-Queens Problem" Abides by Lab 5 Exercise 4 requirements Author: Georgios Evangelou (1046900) Year: 5 Parallel Programming in Machine Learning Problems Electrical and Computer En...
8.race3.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 200 #define N 200 int main() { double A[M], B[M][N], C[N], sum = 0.0; #pragma omp parallel for // firstprivate(sum) for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { sum += B[i][j] * C[j]; } A[i] = su...
serial_steps.c
#include <stdio.h> #include <errno.h> // for errno #include <math.h> #include <limits.h> // for INT_MAX #include <stdlib.h> // for strtol #include <time.h> #include <omp.h> long max_number_of_char = 10; long number_of_types_char = 10; long number_of_results = 5; long number_of_queues = 2; typedef struct Client { ...
GB_unaryop__ainv_fp32_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
window.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/) * * 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 Lic...
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 // //===---------------------------...
task-barrier.c
/* Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze (joachim.protze@tu-dresden.de), Jonas Hahnfeld (hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir Rakamaric, Dong H. A...
GB_unop__log10_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
GB_unaryop__identity_bool_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
coarse_grain.c
// OpenMP library header #include <omp.h> // Standard IO libraries #include <stdio.h> #include <stdlib.h> // Math library #include <math.h> int main(int argc, char* argv[]) { int const n = pow(2, 10); double x[n], y[n]; double norm, norm_thread, y_norm, y_norm_thread, true_norm; int num_threads, poi...
DOT_Rk_Solver.h
/** * @fileoverview Copyright (c) 2019, Stefano Gualandi, * via Ferrata, 1, I-27100, Pavia, Italy * * @author stefano.gualandi@gmail.com (Stefano Gualandi) * */ #pragma once #include <omp.h> #include <cassert> #include <chrono> #include <cinttypes> #include <fstream> #include <limits> #include <r...
fdtd2d.c
/** * fdtd2d.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....
zlansy.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
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]; printf("this a tset: %f %f\n",X[i],Y[...
mmGPU.c
/* Tempo sequencial: real 0m31,842s user 0m31,713s sys 0m0,083s real 0m30,929s user 0m30,789s sys 0m0,074s real 0m31,569s user 0m31,408s sys 0m0,077s real 0m30,880s user 0m30,749s sys 0m0,067s real 0m31,120s user 0m30,967s sys 0m0,087s Tempo Paralelo - Multicore:...
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-...
kernel.h
#ifndef __KERNEL_H__ #define __KERNEL_H__ #include "../sparse_formats/csr.h" namespace CTF{ #ifdef __CUDACC__ #define NBLK 15 #define NTRD 512 template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*f)(dtype_A, dtype_B), void(*g)(dtype_C, dtype_C&)> __global__ void cuda_gemmf(char ...
post_utilities.h
#ifndef POST_UTILITIES_H #define POST_UTILITIES_H #include "utilities/timer.h" #include "includes/define.h" #include "includes/variables.h" #include "custom_utilities/create_and_destroy.h" #include "custom_utilities/GeometryFunctions.h" #include "custom_elements/Particle_Contact_Element.h" #ifdef _OPENMP #include <om...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
sp.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB SP code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
GB_unop__abs_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...
pmtv-OpenMP.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_num_threads() 1 #define omp_set_num_threads(int) #define omp_in_parallel() 0 #define omp_set_dynamic(int) #endif int main(int argc, char **argv) { ...
GB_unop__cimag_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...
updater_quantile_hist.h
/*! * Copyright 2017-2022 by XGBoost Contributors * \file updater_quantile_hist.h * \brief use quantized feature values to construct a tree * \author Philip Cho, Tianqi Chen, Egor Smirnov */ #ifndef XGBOOST_TREE_UPDATER_QUANTILE_HIST_H_ #define XGBOOST_TREE_UPDATER_QUANTILE_HIST_H_ #include <rabit/rabit.h> #inclu...
sha1-avx2.c
#define _BSD_SOURCE #include <stdint.h> #include <iso646.h> #include <stdbool.h> #include <string.h> #include "proofofwork-private.h" static inline __m256i sha1_f00(__m256i b, __m256i c, __m256i d) { return (b & c) | (~ b & d); } static inline __m256i sha1_f20(__m256i b, __m256i c, __m256i d) { return b ^ c ^ d; } sta...
pfor.c
#include <omp.h> #define N 100000 #define CHUNKSIZE 1000 double a[N], b[N], c[N]; int main () { int i, chunk; /* Some initializations */ for (i=0; i < N; i++) a[i] = b[i] = i * 1.0; chunk = CHUNKSIZE; #pragma omp parallel for schedule(static,CHUNKSIZE) private(i) for (i=0; i < N; i++) { ...
gain.h
/* Project Name : OpenMEEG © INRIA and ENPC (contributors: Geoffray ADDE, Maureen CLERC, Alexandre GRAMFORT, Renaud KERIVEN, Jan KYBIC, Perrine LANDREAU, Théodore PAPADOPOULO, Emmanuel OLIVI Maureen.Clerc.AT.inria.fr, keriven.AT.certis.enpc.fr, kybic.AT.fel.cvut.cz, papadop.AT.inria.fr) The OpenMEEG software is a C+...
Example_affinity.5.c
/* * @@name: affinity.5c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_4.0 */ void work(); int main() { #pragma omp parallel proc_bind(master) num_threads(4) { work(); } return 0; }
relic_multi.h
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (c) 2020 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 it a...
RandomizedStrideRules.h
// Copyright 2016-present, Facebook, Inc. // 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. #ifndef RSRRULES_H #define RSRRULES_H #include "RectangularRegions.h" #include <cstring> class RSRTicks { public: s...
estimate.c
/*! \file \brief The routines associated with model estimation \date Started 3/9/2015 \author George Karypis with contributions by Xia Ning, Athanasios N. Nikolakopoulos, Zeren Shui and Mohit Sharma. \author Copyright 2019, Regents of the University of Minnesota */ #include "slimlib.h" #ifdef USE_MKL #include <mkl....
c_timers.c
#include "wtime.h" #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif /* Prototype */ void wtime( double * ); /*****************************************************************/ /****** E L A P S E D _ T I M E ******/ /************************************************************...
main.c
#include <mpi.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> // DADOS COMPARTILHADOS int m1[SIZE][SIZE], m2[SIZE][SIZE], mres[SIZE][SIZE]; int l1, c1, l2, c2, lres, cres; int inicializa_matriz(int i, int j, int k); int multiplica_matriz(int i, int j, int k, int offset, int step_size); int valida_multiplic...
3291.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
GB_binop__min_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
dd_dtw_openmp.c
/*! @file dtw_openmp.c @brief DTAIDistance.dtw @author Wannes Meert @copyright Copyright © 2020 Wannes Meert. Apache License, Version 2.0, see LICENSE for details. */ #include "dd_dtw_openmp.h" // TODO: Check if the _OPENMP macro is set /** Check the arguments passed to dtw_distances_* and prepare the array of ind...
DRB009-lastprivatemissing-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
problem1.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
avtc.c
#include "avtc.h" // WARNING: // This code is for educational purposes only. // Do not use this in any commercial or production environment. RandomTape *proverTape; int serializeFieldElement(mpz_t n, void *buff) { mpz_export(buff, NULL, 1, 1, 1, 0, n); return mpz_sizeinbase(n, 2) / 8; } void clearSS(SS s) {...
KDTree.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_KDTREE_H_ #define _SPTAG_COMMON_KDTREE_H_ #include <vector> #include <string> #include <shared_mutex> #include "../VectorIndex.h" #include "CommonUtils.h" #include "QueryResultSet.h" #include "WorkS...
convolution_sgemm_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. 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 the License at // //...
GB_apply_op.c
//------------------------------------------------------------------------------ // GB_apply_op: typecast and apply a unary operator to an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://sui...
tensor_convert.h
/* Copyright 2019 The Blueoil Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
basis_func.h
/** * @author : Zhao Chonyyao (cyzhao@zju.edu.cn) * @date : 2021-04-30 * @description: basis function for finite element method. * @version : 1.0 */ #ifndef FEM_BASIS #define FEM_BASIS #include <Eigen/Dense> #include <iostream> namespace PhysIKA { /** * shape function definition for finite element....
eavlCombinedTopologyGatherMapOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_COMBINED_TOPOLOGY_GATHER_MAP_OP_H #define EAVL_COMBINED_TOPOLOGY_GATHER_MAP_OP_H #include "eavlCUDA.h" #include "eavlCellSet.h" #include "eavlCellSetExplicit.h" #include "eavlCellSetAllStructured.h" #include "eavlDataSet.h" #i...
update_ops_matrix_phase_single.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _USE_SIMD #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif #endif //void single_qubit_phase_gate_old_s...
GB_binop__lor_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
omp_zher2k_batch.c
/** * @file omp_zher2k_batch.c * * @brief BBLAS zher2k_batch double _Complex routine. * * BBLAS is a software package provided by Univ. of Manchester, * Univ. of Tennessee. * * @version 1.0.0 * @author Samuel D. Relton * @author Pedro V. Lara * @author Mawussi Zounon * @date 2016-02-20 * **/ #if...
ast-dump-openmp-distribute-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 distribute simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp distribute simd for (int i = 0; i <...
6_for-par1.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> void inicializa(int **v, int size) { (*v) = (int *) malloc(sizeof(int)*size); for (int i = 0; i < size; i++) { (*v)[i] = rand() % 10000; } } float square(int x){ int k = 0; while(k < 5000) k++; return sqrt(x);...
program_181.c
for (i = 2; i <= n + 1; ++i) C[i] = C[i + 1] + D[i]; for (i = 2; i <= n + 1; ++i) #pragma omp parallel for for (j = 2; j <= m + 1; ++j) B[i][j] = B[i - 1][j] + C[i]; #pragma omp parallel for for (i = 2; i <= n + 1; ++i) { A[i][1][1] = C[n + 1]; for (j = 2; j <= m + 1; ++j) ...
gi_maxmin_vertex_labeling.h
/* * * Copyright (C) 2018 Attila Gyulassy <jediati@sci.utah.edu> * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef MAXMIN_VERTEX_LABELING_H #define MAXMIN_VERTEX_LABELING_H #include <omp.h> #include "gi_basic_ty...
multi_thread_main.c
/*************************************************************************/ /* */ /* Language Technologies Institute */ /* Carnegie Mellon University */ /* ...
cofold.c
/* * minimum free energy * RNA secondary structure prediction * * c Ivo Hofacker, Chrisoph Flamm * original implementation by * Walter Fontana * * Vienna RNA package */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #i...
generated-funcs.c
// Check that the CHECK lines are generated for clang-generated functions // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck --check-prefix=OMP %s // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck --check-prefix=NOOMP %s const int size = 1024 * ...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
pr26171.c
/* PR c/26171 */ /* { dg-do run } */ /* { dg-options "-fopenmp" } */ /* { dg-require-effective-target tls_runtime } */ int thrv = 0; #pragma omp threadprivate (thrv) int main () { thrv = 1; return 0; }
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "omp.h" #include "functions.h" int main (int argc, char **argv) { int Nthreads = 20; omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will make your program ru...
ps_local-inl.h
/*! * Copyright (c) 2014 by Contributors * \file ps_local-inl.h * \brief local multi-threading implementation of PS abstraction * * \author Tianqi Chen, Mu Li */ #ifndef MSHADOW_PS_LOCAL_INL_H_ // NOLINT(*) #define MSHADOW_PS_LOCAL_INL_H_ // NOLINT(*) #include <map> #include <utility> #include <string> #includ...
prop_container.h
// -*- mode:c++; c-basic-offset:4 -*- #ifndef PROP_CONTAINER_H_KL3 #define PROP_CONTAINER_H_KL3 #include <util/gjp.h> #include <util/verbose.h> #include <alg/qpropw.h> #include <omp.h> #include <cassert> #include "my_util.h" typedef cps::WilsonMatrixS WM; class PropAP { public: PropAP(const std::vector<WM> &_p,...
strassen.c
/******************************************************************* * * M4RI: Linear Algebra over GF(2) * * Copyright (C) 2008 Martin Albrecht <M.R.Albrecht@rhul.ac.uk> * Copyright (C) 2008 Clement Pernet <pernet@math.washington.edu> * Copyright (C) 2008 Marco Bodrato <bodrato@mail.dm.unipi.it...
exception.h
/** * @file exception.h - framework for exceptions in PALISADE * @author TPOC: contact@palisade-crypto.org * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provide...
tri_prep.c
//------------------------------------------------------------------------------ // tri_prep: remove edges from a graph, making it acyclic //------------------------------------------------------------------------------ // Given a symmetric binary graph A with no self-edges, prune the edges to make // it acyclic. The...
mandel-par-static.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> #include "complex.h" #include "linspace.h" int rows; int columns; int nthreads; void setGlobalVariables() { rows = atoi(getenv("INPUTMAT_ROWS")); columns = atoi(getenv("INPUTMAT_COLS")); nthreads = atoi(getenv("NUM_THREADS")); } ...
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) >...
omp_ex_29.c
#include <stdio.h> #include <omp.h> /* MIT License Copyright (c) 2019 NOUREDDINE DAGHBOUDJ 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 ri...
opencl_pgpdisk_fmt_plug.c
/* * Format for brute-forcing PGP Virtual Disk images. * * This software is Copyright (c) 2017 Dhiru Kholia <dhiru at openwall.net> 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. *...
skein_fmt_plug.c
/* Skein cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary ...
GB_unaryop__abs_int16_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
gather.c
// create a list of 64 numbers, and only sum the even ones #include <stdio.h> #include <stdlib.h> #define N 32000 int main() { srand(time(NULL)); float *numbers = malloc(sizeof(float)*N); int *mask = malloc(sizeof(int)*N); // Init the numbers for (int i = 0; i<N; i++) numbers[i] = rand() % 10...
openmp_vector_multiply.c
#include <stdio.h> #include <omp.h> #include <math.h> //gcc -fopenmp 1-1.c //pgcc vector_multiply.c -acc -Minfo -ta=multicore int main() { int n=100000; /* size of the vector */ double a[n],b[n],result=0.0,exception=0.0;/*definr vector*/ int i, errs=0; for( i = 0; i < n; ++i ) { a[i] = ...
GB_binop__div_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
convolution_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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 ...
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. // //===-------------------------------------------------------...
9.race1.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 100 int main() { int A[N]; #pragma omp for for (int i = 1; i < N; i++) { A[i] = A[i] + A[i - 1]; } return 0; } // CHECK: Data Race detected // END
kmeans.h
// This file is part of OpenMVG, an Open Multiple View Geometry C++ library. // Copyright (c) 2017 Romuald Perrot. // 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 obtain one at http://mozilla.org/MPL/2.0/. ...
purkinje_matrix_assembly.c
// // Created by bergolho on 04/09/19. // #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <time.h> #include "../alg/grid/grid.h" #include "../config/assembly_matrix_config.h" #include "../monodomain/constants.h" #include "../utils/utils.h" #include "../single_file_libraries/stb_ds.h" #include "....
GB_unop__identity_int32_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
simple_omp_share.c
int main() { int x = 0; #pragma omp parallel shared(x) { #pragma omp atomic x=x+1; } }
GB_unop__identity_int32_fc32.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...
info.c
// RUN: %libomptarget-compile-nvptx64-nvidia-cuda \ // RUN: -gline-tables-only -fopenmp-extensions // RUN: env LIBOMPTARGET_INFO=63 %libomptarget-run-nvptx64-nvidia-cuda 2>&1 | \ // RUN: %fcheck-nvptx64-nvidia-cuda -allow-empty -check-prefix=INFO // REQUIRES: nvptx64-nvidia-cuda #include <stdio.h> #include <omp....
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...
tinyexr.h
/* Copyright (c) 2014 - 2018, Syoyo Fujita 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 t...
mg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG This benchmark is an OpenMP C version of the NPB MG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
DRB053-inneronly1-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
visual-effects.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__signum_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
tutorial_region_prof.c
/* * Copyright (c) 2015 - 2022, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of condition...