source
stringlengths
3
92
c
stringlengths
26
2.25M
outer_mult.h
#include "CSC.h" #include "CSR.h" #include "Triple.h" #include "radix_sort/radix_sort.hpp" #include "utility.h" #include <map> #include <algorithm> #include <iostream> #include <omp.h> #include <unistd.h> #include <cstring> //#include <numa.h> #include <thread> #include <cstdlib> #include <chrono> #include<set> using ...
column_matrix.h
/*! * Copyright 2017 by Contributors * \file column_matrix.h * \brief Utility for fast column-wise access * \author Philip Cho */ #ifndef TSOOBGX_COMMON_COLUMN_MATRIX_H_ #define TSOOBGX_COMMON_COLUMN_MATRIX_H_ #include <limits> #include <vector> #include "hist_util.h" namespace tsoobgx { namespace common { /...
Searching.202007270051.subsearch.profile.h
// // Created by Zhen Peng on 7/27/2020. // #ifndef BATCH_SEARCHING_SEARCHING_H #define BATCH_SEARCHING_SEARCHING_H #include <vector> #include <boost/dynamic_bitset.hpp> //#include <boost/sort/sort.hpp> #include <iostream> #include <fstream> #include <unordered_map> #include <immintrin.h> #include <cstring> #include ...
ztrmm.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "ztrmm.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...
mat_mul_p4a_4000.c
/* * file for mat_mul.c */ #include "./mat_mul.h" #include "./size.h" void mat_mul(int *a, int *b, int *c); void mat_mul(int *a, int *b, int *c) { int i, j, k, t; #pragma omp parallel for private(j, t, k) for(i = 0; i <= 3999; i += 1) for(j = 0; j <= 3999; j += 1) { c[i*4000+j] = 0; for...
GB_binop__isne_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
test_for_reduction.c
//===-- test_for_reduction.c - Test reductions at for construct ---*- C -*-===// // // Part of the LOMP 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 // //===---------------------------...
detector.c
#include "darknet.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; /** * \brief: 图像检测网络训练函数 * * \pra...
mg.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB MG code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
energy.h
#pragma once #include "bonds.h" #include "externalpotential.h" // Energybase implemented here #include "sasa.h" #include "space.h" #include "aux/iteratorsupport.h" #include "aux/pairmatrix.h" #include <range/v3/range/conversion.hpp> #include <range/v3/view/iota.hpp> #include <range/v3/view/subrange.hpp> #include <Eige...
dependences.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #include "callback.h" #include <omp.h> #include <math.h> #include <unistd.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { #pragma omp master { print_ids(0); ...
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 { // ...
GB_unaryop__minv_int8_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...
feature.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__div_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-...
falcon.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <mkl.h> #include <string.h> #include <hbwmalloc.h> #include <assert.h> #include <falcon.h> const long MAX_TILES = (MAX_IROWS-2)*(MAX_IROWS-2)*0.25; // STRIDE is the max image*C*batch for image const long STRIDE = (MAX_BATCH)*(MAX_IMAGE_CHANNELS+18)*(MAX...
geo_particle_iter.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "geo_particle_iter.kernel_inc.h" int openmp_geo_rel_1st_bwd_init (openmp_pscmc_env * pe ,openmp_geo_rel_1st_bwd_struct * kerstr ){ return 0 ;} void openmp_geo_rel_1st_bwd_get_struct_len (size_t...
nvector_openmpdev.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Shelby Lockhart @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen, A...
libperf_int.h
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2016. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #ifndef LIBPERF_INT_H_ #define LIBPERF_INT_H_ #include <tools/p...
mandel-omp-for-point.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
testMatrixMultiply_OpenMp.c
#include "mex.h" #include <omp.h> #include <stdio.h> #include <stdlib.h> #define A_IN prhs[0] /* (M * P) */ #define B_IN prhs[1] /* (P * N) */ #define C_OUT plhs[0] /* (M * N) */ void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { double *pA, *pB, *pC; int i, j, k; mwSiz...
maxwell_zeroBC.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...
task_tied_thread_threadid.c
// RUN: %libomp-compile-and-run // REQUIRES: abt #include "omp_testsuite.h" #include <string.h> #include <stdio.h> int test_task_tied_thread_threadid(int num_threads) { int vals[num_threads]; memset(vals, 0, sizeof(int) * num_threads); omp_set_max_active_levels(2); #pragma omp parallel num_threads(num_threads...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__bclr_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
jacobi-ompacc.c
#include <stdio.h> #include <math.h> #include <assert.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif // Add timing support #include <sys/time.h> double time_stamp() { struct timeval t; double time; gettimeofday(&t,(struct timezone*)NULL); time = t.tv_sec + 1.0e-6*t.tv_usec; return time; } dou...
GB_unaryop__minv_bool_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
smul.c
/* This file is part of ParTI!. ParTI! 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 License, or (at your option) any later version. ParTI! is distributed...
SPHCalcDensityFunctor.h
/** * @file SPHCalcDensityFunctor.h * @author seckler * @date 19.01.18 */ #pragma once #include "autopas/pairwiseFunctors/Functor.h" #include "autopas/particles/OwnershipState.h" #include "autopas/sph/SPHKernels.h" namespace autopas::sph { /** * Class that defines the density functor. * It is used to calculate...
XSHA_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2008,2011 by Solar Designer * * Intrinsics support added by magnum 2011. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_XSHA; #elif FMT_REGISTERS_H john_register_one(&fmt_XSHA); #else #include <string.h> #include "arch.h" #ifdef SIMD_...
SymbolicDerivatives.h
#ifndef _SymbolicDerivatives_H_ #define _SymbolicDerivatives_H_ // If true, this directive require CERES installed, then it allows a comparison with CERES/Jet (for a potential publication) .. #define MMVII_WITH_CERES false #ifdef _OPENMP #include <omp.h> #endif // #define SYMBDER_WITH_MMVII true #define SYMBDER_WI...
overlapping.h
#include "CSC.h" #include "align.h" #include "common.h" #include "../kmercode/hash_funcs.h" #include "../kmercode/Kmer.hpp" #include "../kmercode/Buffer.h" #include "../kmercode/common.h" #include "../kmercode/fq_reader.h" #include "../kmercode/ParallelFASTQ.h" #include <seqan/sequence.h> #include <seqan/align.h> #incl...
GB_binop__pair_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
7.norace4.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 20 #define N 20 int main() { double data[M][N], mean[N]; #pragma omp parallel for for (int i = 0; i < N; i++) for (int j = 0; j < M; j++) { data[i][j] -= mean[j]; } } // CHECK: Region is Data Race Free. // END
GB_binop__isgt_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-...
pi-v3.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 #include "extrae_user_events.h" #define PROG...
opi.c
#include <stdlib.h> #include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_max_threads() 1 #endif int main(int argc, char **argv) { register double width,x; double sum=0; register int intervals, i; double t; if(argc < 2) { fprintf(stderr,"\nFalta nº intervalos\n"); ...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
concurrent_unordered_map.cuh.h
/* * Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 ...
GB_unop__exp2_fc32_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...
ReLU.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018-2019 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuchikami@nift...
GB_unaryop__minv_fp32_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
vmul.c
// // vmul.c : Demo of multi-target mulit-source OpenMP offload // #include <stdio.h> void vmul(int*a, int*b, int*c, int N){ #pragma omp target teams map(to: a[0:N],b[0:N]) map(from:c[0:N]) #pragma omp distribute parallel for for(int i=0;i<N;i++) { c[i]=a[i]*b[i]; } }
utils.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 ...
phonopy.c
/* Copyright (C) 2021 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...
displacement_lagrangemultiplier_frictional_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
convolution_2x2.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 ...
blake2sp.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 is dist...
GB_unaryop__abs_int32_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
convolution_5x5.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 ...
SpatialFullConvolutionMap.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialFullConvolutionMap.c" #else static int nn_(SpatialFullConvolutionMap_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor); int kW = luaT_getfieldcheckint(L, 1, "kW"); int kH = luaT_getfieldcheckint(L, 1, "kH"); int d...
phylokernelmixrate.h
/* * phylokernelmixrate.h * * Created on: Jan 7, 2015 * Author: minh */ #ifndef PHYLOKERNELMIXRATE_H_ #define PHYLOKERNELMIXRATE_H_ #include "model/modelmixture.h" /************************************************************************************************ * * Highly optimized vectorized versio...
charge_deposition.h
#ifndef XFIELDS_CHARGE_DEPOSITION_H #define XFIELDS_CHARGE_DEPOSITION_H //include_file atomicadd.clh for_context opencl //include_file atomicadd.h for_context cpu_serial cpu_openmp /*gpukern*/ void p2m_rectmesh3d( // INPUTS: // length of x, y, z arrays const int nparticles, // part...
DRB081-func-arg-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...
Booster.h
#ifndef _SQB_TREE_BOSTER_H #define _SQB_TREE_BOSTER_H #define myQDebug(...) printf (__VA_ARGS__) #define myQFatal(...) do{ printf (__VA_ARGS__); exit(1); } while(0) // This file is part of SQBlib, a gradient boosting/boosted trees implementation. // // Copyright (C) 2012 Carlos Becker, http://sites.google.com/site/ca...
core_ctrmm.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_ztrmm.c, normal z -> c, Fri Sep 28 17:38:23 2018 * **/ #include <plasma_core_blas.h> #include "plas...
superlu_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Janosch Stascheit // #if !defined(KRATOS_SUPERL...
rar_common.c
/* * This software is Copyright (c) 2011, Dhiru Kholia <dhiru.kholia at gmail.com> * and Copyright (c) 2012, magnum * 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. */ #include "misc.h"...
QuadtreePolarEuclid.h
/* * Quadtree.h * * Created on: 21.05.2014 * Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu) */ #ifndef QUADTREEPOLAREUCLID_H_ #define QUADTREEPOLAREUCLID_H_ #include <vector> #include <memory> #include <cmath> #include <omp.h> #include <functional> #include "QuadNodePolarEuclid.h" namespace Networ...
GB_unop__identity_int16_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...
matrix.c
#include "matrix.h" #include <omp.h> struct matrix* create_matrix(int rows, int cols) { struct matrix* m = malloc(sizeof(struct matrix)); m->rows_ = rows; m->cols_ = cols; m->rows_align_ = (rows % 4 == 0 ? 0 : 4 - (rows % 4)); //calculate an alignment m->cols_align_ = (cols % 4 == 0 ? 0 : 4 - (cols...
himenoBMTxpa.c
/******************************************************************** This benchmark test program is measuring a cpu performance of floating point operation by a Poisson equation solver. If you have any question, please ask me via email. written by Ryutaro HIMENO, November 26, 2001. Version 3.0 --------...
GB_binop__isgt_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-...
convolution_3x3_pack1to4_fp16s.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 ...
primo_grande_solution.c
#include <stdio.h> #include <math.h> #include <limits.h> #include <omp.h> typedef unsigned long long Entero_grande; #define ENTERO_MAS_GRANDE ULLONG_MAX int primo(Entero_grande n) { int p; Entero_grande i, s; p = (n % 2 != 0 || n == 2); if (p) { s = sqrt(n); int numberOfThreads; #pragma omp par...
stencil_opt5.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "malloc2D.h" #include "timer.h" #define SWAP_PTR(xnew,xold,xtmp) (xtmp=xnew, xnew=xold, xold=xtmp) int main(int argc, char *argv[]) { #pragma omp parallel if (omp_get_thread_num() == 0) printf("Running with %d thread(s)\n",omp_get_num_threads(...
GB_unaryop__identity_int8_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
HierarchicalModel.h
/* Copyright (c) 2017, Fabian Prada 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 following discl...
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....
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) >...
GB_binop__lor_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-...
PoW.c
/* Copyright 2016-2018 The Ulord Core Foundation */ #include "PoW.h" #include <stdio.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include <assert.h> // #include <omp.h> #include "my_time.h" #include "common.h" #include "my_rand48_r.h" #include "oneWayFunction.h" /* * Step 1: I...
mandel-omp.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
correlation.c
/** * correlation.c This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * Web address: http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael....
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 // //===---------------------------...
exercise3.c
/* * BSD 2-Clause License * * Copyright (c) 2020, Alessandro Capotondi * 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 copyri...
pi_omp_profesor.c
//gcc pi_omp_profesor.c -o x -fopenmp -lm && ./x #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <sys/time.h> #define ITERATIONS 2e09 #define THREADS 8 #define PAD 8 int calculatePi(double *piTotal, int ID) { int start, end; start = (ITERATIONS/omp_get_num_threads()) * ID; end = (ITERAT...
enforce_detgammabar_constraint.h
void enforce_detgammabar_constraint(const int Nxx_plus_2NGHOSTS[3],REAL *xx[3], REAL *in_gfs) { #pragma omp parallel for for(int i2=0; i2<Nxx_plus_2NGHOSTS[2]; i2++) { const REAL xx2 = xx[2][i2]; for(int i1=0; i1<Nxx_plus_2NGHOSTS[1]; i1++) { const REAL xx1 = xx[1][i1]; for(int i0=0; i0<Nxx_plu...
decorate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GrB_Matrix_nvals.c
//------------------------------------------------------------------------------ // GrB_Matrix_nvals: number of entries in a sparse matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Ide...
omp-task-fp.c
#include <stdio.h> int main() { int x = 10, i = 0; #pragma omp parallel { #pragma omp single { #pragma omp task { x = x + 1; printf("x = %d\n", x); } #pragma omp taskwait int j = 0; for(i = 0; i < 4; i++) { #p...
softmax_hcl_arm.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...
vlad.c
/** @file vlad.c ** @brief VLAD - Declaration ** @author David Novotny ** @author Andrea Vedaldi **/ /* Copyright (C) 2013 David Novotny and Andera Vedaldi. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). */ /** <!-- ~~...
omp_SH_to_spat.gen.c
/* * Copyright (c) 2010-2015 Centre National de la Recherche Scientifique. * written by Nathanael Schaeffer (CNRS, ISTerre, Grenoble, France). * * nathanael.schaeffer@ujf-grenoble.fr * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software...
reduction_minus_2.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { int result = 100; #pragma omp parallel reduction(-:result) { result -= omp_get_thread_num(); } printf("Result: %d\n", result); }
GB_binop__ne_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-...
sor.c
#include "sor.h" #include <math.h> #include "boundary_val.h" #include "helper.h" #include <omp.h> #define SOR_ITER_MAX 3 int sor( double omg, double dx, double dy, double dz, int imax, int jmax, int kmax, double ***P, double ***RS, double *res, int ***Flag, struct p_pointer *PP1, i...
GB_reduce_panel.c
//------------------------------------------------------------------------------ // GB_reduce_panel: s=reduce(A), reduce a matrix to a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-...
DRB091-threadprivate2-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...
cpu_rnnt.h
#pragma once #include <tuple> #include <cmath> #include <cstring> #include <limits> #include <algorithm> #include <numeric> #include <chrono> #if !defined(RNNT_DISABLE_OMP) && !defined(APPLE) #include <omp.h> #endif #include "rnnt_helper.h" template<typename ProbT> class CpuRNNT { public: // Noncopyable Cp...
epir_reply_mock.c
#include "epir.h" #define divide_up(a, b) (((a) / (b)) + (((a) % (b)) == 0 ? 0 : 1 )) size_t epir_reply_size(const uint8_t dimension, const uint8_t packing, const size_t elem_size) { size_t target_size = elem_size; for(uint8_t d=0; d<dimension; d++) { target_size = EPIR_CIPHER_SIZE * divide_up(target_size, packi...
mattran.c
#include "matrix.h" /** \brief Computes the transpose of a matrix * * \param[in] A Input matrix * \param[in] result Matrix to store the result * \return \f$ \mathbf{A}^T \f$ * */ MATRIX mat_tran(MATRIX A, MATRIX result) { int i, j, m, n; m = MatCol(A); n = MatRow(A); if(result==NULL) if((resul...
cloudkeychain_fmt_plug.c
/* 1Password Cloud Keychain cracker patch for JtR. Hacked together during * April of 2013 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru.kholia at gmail.com>, * Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> and Copyright (c) 2012 * magnum, and it is...
gpu_reduce_demo.c
//------------------------------------------------------------------------------ // GraphBLAS/Demo/Program/reduce_demo: reduce a matrix to a scalar //------------------------------------------------------------------------------ // TODO for GPU: add this to CMakelists.txt, or merge with reduce_demo.c #include "GraphB...
GB_binop__times_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
ft.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - FT This benchmark is an OpenMP C version of the NPB FT code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
sink-3.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ /* Test that we can handle multiple undeclared sink variables gracefully. */ void bar (int *); void foo () { int i,j; #pragma omp parallel for ordered(1) for (i=0; i < 100; ++i) { #pragma omp ordered depend(sink:poo-1,paa+1) /* { dg-error "poo.*decl...
fc_kernel_int8_arm.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...
jacobi.c
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define U(i,j) (u[i][j]) #define Uold(i,j) (uold[i][j]) #define F(i,j) (f[i][j]) void jacobi (int n, double dx, double omega, double **u, double **f, double tol, int maxit); double** dalloc_matrix(int n, int m)...
3d25pt.c
/* * Order-2, 3D 25 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)...