source
stringlengths
3
92
c
stringlengths
26
2.25M
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
target_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized //...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
softmax-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 ...
rose_himenoBMTxps.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 --------...
special_accumulation_ops.h
// // @author raver119@gmail.com // #ifndef LIBND4J_SPECIAL_ACCUMULATION_OPS_H #define LIBND4J_SPECIAL_ACCUMULATION_OPS_H #include <templatemath.h> #include <helpers/TAD.h> //#include <ops/ops.h> //#include <loops/reduce.h> namespace simdOps { template<typename T> class LogSumExp { public: stati...
matfft.c
#include "matrix.h" /** \brief Computes fast Fourier transform * * \param[in] C Complex data matrix stack * \param[in] dir FFT direction (MAT_FFT2_FORWARD/MAT_FFT2_BACKWARD) * \param[in] result Matrix stack to store the result * \return Transformed matrix stack * */ MATSTACK mat_fft2(MATSTACK c, int dir, MATS...
genScalData.c
#include "defs.h" /* Set this variable to zero to run the data generator on one thread (for debugging purposes) */ #define PARALLEL_SDG 0 double genScalData(graphSDG* SDGdata) { VERT_T *src, *dest; WEIGHT_T *wt; LONG_T n, m; VERT_T *permV; #ifdef _OPENMP omp_lock_t* vLock; #endif do...
ScMain.c
/*@file Implements a similarity checker entry point for given code inputs. Copyright (C) 2020 Marvin Häuser. All rights reserved. SPDX-License-Identifier: BSD-3-Clause */ #include <assert.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #...
17_omp_sharing_semantics.c
// clang-format off // RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | %filecheck %s // RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | %filecheck %s // RUN: %c-to-llvm -fno-d...
matrixmultiply.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #include <stdio.h> #include <assert.h> #ifdef _OPENMP #include <omp.h> #endif #define N 512 #define M 512 #define K 512 #define REAL float int i,j,k; REAL a[N][M],b[M][K],c[N][K], c2[N][K]; int init(); int mmm(); int mmm2(); int verify(); int main(void) { in...
threads.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(4) { #pragma omp atomic x++; } // CHECK: 0: NULL_POINTER=[[NULL:.*$]] // CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_thread_b...
unfold.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/unfold.c" #else /* note: due to write issues, this one cannot be parallelized as well as unfolded_copy */ void THNN_(unfolded_acc)( THTensor *finput, THTensor *input, int kW, int kH, int dW, int dH, ...
nco_lmt.c
/* $Header$ */ /* Purpose: Hyperslab limits */ /* Copyright (C) 1995--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO under the terms of the 3-Clause BSD License with exceptions described in the LICENSE file */ #include "nc...
ActionOP.h
/* * SparseOP.h * * Created on: Jul 20, 2016 * Author: mason */ #ifndef ACTIONOP_H_ #define ACTIONOP_H_ #include "MyLib.h" #include "Alphabet.h" #include "Node.h" #include "Graph.h" #include "SparseParam.h" // for sparse features class ActionParams { public: SparseParam W; PAlphabet elems; i...
GB_unaryop__abs_bool_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
bfsdfs.h
namespace TSnap { ///////////////////////////////////////////////// // BFS and DFS /// Returns a directed Breadth-First-Search tree rooted at StartNId. ##GetBfsTree1 template <class PGraph> PNGraph GetBfsTree(const PGraph& Graph, const int& StartNId, const bool& FollowOut, const bool& FollowIn); /// My BFS Function te...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fixit.c
/****************************************************************************** * FILE: fixit.c * * This very simple program contains errors. Find them and fix. * ******************************************************************************/ #include <omp.h> #include <stdio.h> #include <stdlib.h> #define...
matmul_int.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...
GB_binop__gt_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-...
wino_conv_kernel_mips.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...
LevelElimination.h
/* * LevelElimination.h * * Created on: 10.01.2015 * Author: Michael */ #ifndef LEVELELIMINATION_H_ #define LEVELELIMINATION_H_ #include "Level.h" #include "EliminationStage.h" namespace NetworKit { /** * @ingroup numerics */ template<class Matrix> class LevelElimination : public Level<Matrix> { privat...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <dmlc/serializer.h> #include <xgboost/base.h> #include <xgboost/span.h> #include <xg...
GB_unaryop__lnot_int64_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
truedep1-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...
GB_binop__div_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-...
DRB007-indirectaccess3-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...
4-8t.c
#include <stdio.h> #include <omp.h> int main() { int i; omp_set_num_threads(8); #pragma omp parallel for for (i=0; i<16; i++) { printf("Hello from thread number: %d Iteration: %d \n", omp_get_thread_num(), i); } printf("\n GoodBye – Team Destroyed – Exiting Program \n\n"); }
info.c
#include "math.h" #include <stdio.h> #include <stdlib.h> #define _DISP //#define _LABEL struct number{ int num[4]; int flag; }; double LABEL[15]={360,1440,1260,264,9,480,720,216,8,180,72,6,24,5040,1}; struct number initarray[5040]; inline void num2p(int num,int *p){ int i; for(i=0;i<4;i++) *(p++)=0; i=3; wh...
tensor_cpu-inl.h
/*! * Copyright (c) 2014 by Contributors * \file tensor_cpu-inl.h * \brief implementation of CPU host code * \author Bing Xu, Tianqi Chen */ #ifndef MSHADOW_TENSOR_CPU_INL_H_ #define MSHADOW_TENSOR_CPU_INL_H_ #include <cstring> #include <functional> #include <utility> #include <vector> #include "./base.h" #includ...
GB_binop__bxnor_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unop__identity_bool_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
host_varfn_function.c
#include <stdio.h> #include <omp.h> #include <hostrpc.h> // This user variable function returns a uint so declare function // as hostrpc_varfn_uint_t . hostrpc_varfn_uint_t my3argfn; hostrpc_varfn_double_t mydoublefn; // This is an arbitrary 3 arg function uint my3argfn(void * fnptr, ...) { va_list args; va_star...
convolution_winograd_transform_pack8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
distribution.h
#ifndef DISTRIBUTION_H #define DISTRIBUTION_H #include <cmath> #include <omp.h> const float delta_max = 1.0f; #pragma omp declare simd float dist_func(const float alpha, const float rn); #endif
broadcast_reduce-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 ...
GB_unop__abs_int64_int64.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-barrier.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() { #pragma omp barrier } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-barrier....
implicit_blender.c
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
a7.c
#define N 100000000 int a[N],b[N]; long long s=0; main() { int i; /* inicialitzacio, no en paral.lel */ for(i=0;i<N;i++) { a[i]=1; b[i]=2; } #pragma omp parallel for for (i=0;i<N;i++) b[i] += a[i]; printf("Valor i %d, de b[i] %d \n",i-1,b[i-1]); #pragma omp parallel for for (i=0;i<N;i++) { int a=0; #pragma...
GB_unop__identity_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
ast-dump-openmp-target-teams-distribute.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 target teams distribute for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target teams distribute for...
2d.par.c
/*@ begin PerfTuning ( def build { arg command = 'icc'; arg options = '-fast -openmp -I/usr/local/icc/include -lm'; } def performance_counter { arg method = 'basic timer'; arg repetitions = 2; } def performance_params { param T1[] = [1]; par...
GB_binop__iseq_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
radix_sort.h
#pragma once // #include <glm/glm.hpp> // #include <glm/gtc/type_ptr.hpp> #include <vector> #include <cstdint> #include <omp.h> typedef uint32_t uint; template <typename T, typename TUintVec4> void radixSortPartCountDigitsNth( int start, int num, int nthDigit, int digitOffset, const std::ve...
GB_binop__isgt_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
openmp_hello.c
/* Hello, World program for OpenMP. Jim Teresco, Siena College, Fall 2021 Based on example by Blaise Barney, LLNL at https://hpc.llnl.gov/tuts/openMP/#ProgrammingModel */ #include <omp.h> #include <stdio.h> int main (int argc, char *argv[]) { // These variables will be used to store the number of ...
GB_unaryop__identity_int64_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRB070-simd1-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...
GB_unaryop__minv_int16_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determineFileType ( std::vector<...
GB_unaryop__lnot_uint16_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
BatchNormalization.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/BatchNormalization.c" #else void THNN_(BatchNormalization_updateOutput)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THTensor *bias, THTensor *running_mean, THTensor *running_var, THTensor *save_mean, THTensor *save_std, bool...
drift.c
/* * clockperf * * Copyright (c) 2016-2021, Steven Noonan <steven@uplinklabs.net> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOF...
putty_fmt_plug.c
/* PuTTY private key cracker patch for JtR. Hacked together during Monsoon of * 2012 by Dhiru Kholia <dhiru.kholia at gmail.com> . * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * * p-ppk-crack v0.5 made by michu@neophob.com -- PuTTY private key cracker * * Source code based on...
omp.h
/* * include/omp.h.var */ //===----------------------------------------------------------------------===// // // 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 // //...
visual-effects.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
ew-cfromfort.c
// SW4 LICENSE // # ---------------------------------------------------------------------- // # SW4 - Seismic Waves, 4th order // # ---------------------------------------------------------------------- // # Copyright (c) 2013, Lawrence Livermore National Security, LLC. // # Produced at the Lawrence Livermore Nationa...
DRB025-simdtruedep-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_unaryop__ainv_uint8_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...
task_array.c
#include <omp.h> int main() { int A[1] = {1}; #pragma omp task { A[0]; } return 0; }
GB_binop__minus_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
H2ERI-DFT-J.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include <omp.h> #include "TinyDFT.h" #include "H2ERI.h" void TinyDFT_copy_shells_to_H2ERI(TinyDFT_p TinyDFT, H2ERI_p h2eri) { h2eri->natom = TinyDFT->natom; h2eri->nshell = TinyDFT->nshell; h2e...
DRB052-indirectaccesssharebase-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
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fluxes.c
/*--------------------------------------------------------------------------------- FLUXES.C -Compute fluid fluxes -Apply constrained transport ---------------------------------------------------------------------------------*/ #include "decs.h" void lr_to_flux(struct GridGeom *G, struct FluidState *Sl, stru...
omp_parallel_num_threads.c
<ompts:test> <ompts:testdescription>Test which checks the omp_parallel_num_threads directive by counting the threads in a parallel region which was started with an explicitly stated number of threads.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp parellel num_threads</ompts:direc...
matmul.c
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #include "utils.h" #ifndef N #define N (1 << 10) #endif #pragma omp declare target #define SM 64 static void reorder2(float *restrict a, float *restrict b, int n) { for (int i = 0; i < SM; i++) for (int j = 0; ...
powercap_write_test.c
/** * @author Philip Vaccar */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "papi.h" #define MAX_EVENTS 128 char events[MAX_EVENTS][BUFSIZ]; char filenames[MAX_EVENTS][BUFSIZ]; int ompcpuloadprimes( int limit ) { int num, primes=0; #pragma omp parallel for schedul...
hoImageRegDissimilarityLocalCCR.h
/** \file hoImageRegDissimilarityLocalCCR.h \brief Define the class to compute image Local Cross CorRelation (LocalCCR) in gadgetron registration The analytical derivatives are computed by using the formula proposed at: [1] Gerardo Hermosillo, Christophe Chefd'Hotel, Olivier Faugeras. V...
GB_subassign_17.c
//------------------------------------------------------------------------------ // GB_subassign_17: C(I,J)<!M,repl> = scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identi...
measure_bw.c
/*************************************************************************** Copyright 2016 Hewlett Packard Enterprise Development LP. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version ...
GB_binop__lor_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
main.c
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <omp.h> #include <matrix.h> #define PRINTABLE_TIME(_x) ((long double) (clock() - _x)/CLOCKS_PER_SEC) int main(int argc, char const *argv[]) { size_t I, J, K, k, N, r, n, matrix_size, matrix_tri_size, block_size, NUM_THREADS; size_t desp...
r_df_incore.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <assert.h> #include <complex.h> //#include <omp.h> #include "config.h" #include "cint.h" #include "vhf/fblas.h" #include "vhf/nr_direct.h" #include "np_helper/np_helper.h" #include "ao2mo/r_ao2mo.h" void zhemm_(const char*, const char*, ...
stencil_parallel.c
#include <omp.h> #include <inttypes.h> #include "matrix_utils.h" int main(int argc, const char* argv[]){ if(argc==2){ int numThreads = strtoimax(argv[1], NULL, 0); if(numThreads>0){ double c[5], start_time, end_time, temp; static double g[2][M_SIZE][M_SIZE]; ...
GB_unaryop__identity_fp32_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...
GB_unaryop__abs_int16_int16.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_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. // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in...
mandel-omp-taskloop-row.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
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 ...
convolution_7x7_pack1ton_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 ...
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)...
GB_unop__identity_uint32_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...
target_parallel_for_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for'}} #pragma omp target parallel for // expected-error@+1 {{unexpected OpenMP directive '#pr...
render.h
#ifndef _RENDER_H_ #define _RENDER_H_ #include <iostream> #ifdef _OPENMP #include <omp.h> #endif // _OPENMP #include "radiance.h" #include "ppm.h" #include "random.h" namespace gemspt { int render(const char *filename, const int width, const int height, const int num_sample_per_subpixel, const int num_subpixel, c...
GB_unaryop__minv_int32_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
nbody-align.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #define CACHELINE 64 // size of cache line [bytes] #define SOFTENING 1e-9f typedef struct { float *x, *y, *z, *vx, *vy, *vz; } BodySystem; void randomizeBodies(float *data, int n) { for (int i = 0; i < n; i++) { data[i] = 2.0f * (rand(...
odf_fmt_plug.c
/* ODF cracker patch for JtR. Hacked together during Summer of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and b...
GB_binop__lor_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unop__ainv_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
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 r...
parallel_dsu.h
#ifndef __DSU_H #define __DSU_H #include <atomic> #include <omp.h> #include <stdexcept> #include "defs.h" #include "parallel_array.h" /** * INTERFACE: * * ParallelDSU(uint32_t N, uint32_t NUM_THREADS) - constructs a DSU of size N using NUM_THREADS * uint32_t find_root(uint32_t id) - finds root nod...
pvector.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef PVECTOR_H_ #define PVECTOR_H_ #include <algorithm> #ifdef ZSIM #include "zsimhooks.h" #endif /* GAP Benchmark Suite Class: pvector Author: Scott Beamer Vector class with ability to not init...
main-ummap-cow-demo-mpi.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <time.h> #include <ummap/ummap.h> #include <mpi.h> #define SIZE (2UL*1024UL*1024UL*1024UL) #define SEGSIZE (2UL*1024UL*1024UL) #define ITERATIONS 4 typedef enum { MODE_COPY, MODE_SWITCH, MODE_COW, } cow_mode_t; const char * mode_names[] = { "Umm...
GB_unop__exp_fp64_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...
parallel.c
/* Copyright (C) 2005-2020 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...