source
stringlengths
3
92
c
stringlengths
26
2.25M
flush2.c
//Transpose without locks or critical #include<stdio.h> #include<time.h> #include<omp.h> void main() { int a[5][5],b[5][5],c[5][5],d[5][5],ch,flag=1; //printf("Menu\n1.Express Mode\n2.Custom Mode\n"); //printf("Enter your choice:"); //scanf("%d",&ch); //comment this ch = 1; if(ch == 1) { int l = 1; for(...
GB_unaryop__abs_int16_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...
Stencil_par1.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "malloc2D.h" #include "timer.h" int main(int argc, char *argv[]) { struct timespec tstart_cpu, tstop_cpu; double cpu_time; int imax=2002, jmax = 2002; int niter=1000, nburst=100; double** restrict x = malloc2D(jmax, imax); dou...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "dark_cuda.h" #include "box.h" #include "http_stream.h" #include <stdio.h> #include <stdlib.h> #include <string.h> extern int check_mistakes; #define NUMCHARS 37 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { ...
hcds.h
// // Created by Bangtian Liu on 6/30/19. // #ifndef PROJECT_HCDS_H #define PROJECT_HCDS_H #include "HTree.h" #include "compression.h" //#include "../../../../opt/intel/compilers_and_libraries_2019.4.233/mac/mkl/include/mkl.h" struct hcds{ double *CacheNear; uint64_t *nearoffset; double *CacheFar; uint64_t *far...
adaptive_maxpool_2d.h
// Copyright 2018 Joan Puigcerver #ifndef NNUTILS_CPU_ADAPTIVE_MAXPOOL_2D_H_ #define NNUTILS_CPU_ADAPTIVE_MAXPOOL_2D_H_ #include <nnutils/adaptive_pool.h> #include <nnutils/utils.h> #include <cassert> #ifdef __cplusplus namespace nnutils { namespace cpu { using nnutils::internal::pixv; using nnutils::internal::star...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
__clang_hip_math.h
/*===---- __clang_hip_math.h - Device-side HIP math support ----------------=== * * 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 * *===----------------------------...
parallel_word_counter.c
#include <stdio.h> #include <errno.h> #include <string.h> #include <stdlib.h> #include <omp.h> int n_threads; char *text; char keywords[][10] = { "a", "as", "at", "be", "do", "is", "in", "it", "of", "he", "on", "to", "but", "for", "you", "not", "and", "the", "was", "God", "wit...
kij_optimize.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int A_row; int A_col; int B_row; int B_col; int **constructMatrix(int row, int col){ int **matrix = (int **)malloc(sizeof(int *) * row); for (int i = 0; i < row;i++){ matrix[i] = (int *)malloc(sizeof(int) * col); } return matrix; } void ...
sgd.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "completion.h" #include "../csf.h" #include "../reorder.h" #include "../util.h" #include "../thd_info.h" #include "../io.h" #include <m...
convolution_1x1_pack8to4.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 ...
findSubGraphs.c
#include "defs.h" double findSubGraphs(graph* G, edge* maxIntWtList, int maxIntWtListSize) { VERT_T* S; LONG_T *start; char* visited; LONG_T *pSCount; #ifdef _OPENMP omp_lock_t* vLock; #endif LONG_T phase_num, numPhases; LONG_T count; double elapsed_time = get_seconds();...
d3q15.h
//***************************************************************************** // Title : src/particle/d3q15.h // Author : Tanabe Yuta // Date : 2020/10/29 // Copyright : (C)2020 TanabeYuta //***************************************************************************** #pragma once #in...
HashmapCPU.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
GB_binop__copysign_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_unop__one_uint16_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
cudanetworkexecutor.h
#pragma once #include "networkexecutor.h" #include "cudanetworkbatch.h" namespace NEAT { //--- //--- CLASS CudaNetworkExecutor //--- template<typename Evaluator> class CudaNetworkExecutor : public NetworkExecutor<Evaluator> { std::vector<class CudaNetworkBatch<Evaluator> *> ba...
nn_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
GB_binop__rdiv_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-...
GB_unop__asin_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...
commondraw.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...
convolutiondepthwise_3x3.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 ...
data_partition.h
#ifndef LIGHTGBM_DATA_PARTITION_H_ #define LIGHTGBM_DATA_PARTITION_H_ #include <LightGBM/meta.h> #include <LightGBM/dataset.h> #include <LightGBM/utils/openmp_wrapper.h> #include <cstring> #include <vector> namespace LightGBM { /*! * \brief DataPartition is used to store the the partition of data on tree. */ class...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
templatemath.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * Copyright (c) 2019 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apa...
collective_scatterGather.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
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 ...
version3_1.c
// Compile with: // // // To specify the number of bodies in the world, the program optionally accepts // an integer as its first command line argument. #include <time.h> #include <sys/times.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <X11/Xlib.h> #include...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
LG_CC_FastSV5_64.c
//------------------------------------------------------------------------------ // LG_CC_FastSV5_64: connected components (64-bit version) //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Identifier:...
ParallelHashMap.h
/** * @file ParallelHashMap.h * @brief A thread-safe hash map supporting insertion and lookup operations * @details The parallel hash map is built on top of a fixed-sized hash map * object and features OpenMP concurrency structures. The underlying * fixed-sized hash map handles collisions with chaining. * @...
operations.h
/* * This file is part of Quantum++. * * MIT License * * Copyright (c) 2013 - 2019 Vlad Gheorghiu (vgheorgh@gmail.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restr...
GB_unaryop__lnot_fp64_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...
GB_unaryop__minv_fp64_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...
BIDMat_CBLAS.c
#include <jni.h> #include <omp.h> #ifdef __INTEL_COMPILER #include <mkl.h> #include <mkl_trans.h> #else #include <cblas.h> #endif JNIEXPORT jdouble JNICALL Java_edu_berkeley_bid_CBLAS_ddot (JNIEnv * env, jobject calling_obj, jint N, jdoubleArray jX, jint incX, jdoubleArray jY, jint incY){ jdouble * X = (*env)->GetPr...
testingPolicies.h
#pragma once #include <iostream> #include "timeHandler.h" #include "datatypes.h" #include "cxxopts.hpp" #include "operators.h" #include "locationTypesFormat.h" #include "smallTools.h" template<typename SimulationType> class NoTesting { public: // add program parameters if we need any, this function got called alre...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
pomelo_fmt_plug.c
/* * POMELO cracker patch for JtR. Hacked together during the Hash Runner 2015 * contest by Dhiru Kholia. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_pomelo; #elif FMT_REGISTERS_H john_register_one(&fmt_pomelo); #else #include <string.h> #include <assert.h> #include <errno.h> #include "arch.h" #include "misc.h...
CalcFolderSize.c
#include <sys/stat.h> #include <sys/types.h> #include <dirent.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <unistd.h> int isFile(char *path); int isDir(char *path); long long fileSize(char *path); void concatPath(char *dest, char *p, char *fn); long long newDir(char *path); ...
GB_binop__pair_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
bitset.h
/** Copyright 2020 Alibaba Group Holding Limited. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
convolution_3x3_pack4_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 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 ...
DRB063-outeronly1-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...
fields_values.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #define XSTR(x) #x #define STR(x) XSTR(x) #define streqls(s1, s2) (!strcmp(s1, s2)) #define check(condition) \ if (!(condition)) { ...
IntegratorHPMCMonoImplicit.h
// Copyright (c) 2009-2016 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. #ifndef __HPMC_MONO_IMPLICIT__H__ #define __HPMC_MONO_IMPLICIT__H__ #include "IntegratorHPMCMono.h" #include "hoomd/Autotuner.h" #include <random> #ifdef _OPE...
mkldnn_requantize-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 ...
count_shared_kmer.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <time.h> #include <sys/time.h> #include <omp.h> int K = 24; // kmer's k. K <= 32 //#define FASTQ #define BUFSIZE 400000 int s_chunk=8192; char mat[128]; unsigned long long to_code[128]; void chomp(char * s){ int len = strlen(s)...
affinity_display.1.c
// RUN: %libomp-compile // RUN: env OMP_DISPLAY_AFFINITY=TRUE OMP_NUM_THREADS=4 OMP_PLACES='{0,1},{2,3},{4,5},{6,7}' %libomp-run | %python %S/check.py -c 'CHECK' %s // Affinity Display examples #include <stdio.h> #include <stdlib.h> // also null is in <stddef.h> #include <stddef.h> #include <omp.h> #include <string.h>...
mur_abc.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "mur_abc.kernel_inc.h" int openmp_yee_setfix_xyz_init (openmp_pscmc_env * pe ,openmp_yee_setfix_xyz_struct * kerstr ){ return 0 ;} void openmp_yee_setfix_xyz_get_struct_len (size_t * len ){ ((...
align_stats.c
#include <getopt.h> #ifdef HAVE_OPENMP #include <omp.h> #endif #include <pthread.h> #include "gem_tools.h" #include "align_stats.h" // Every entry will be set to zero be default static const char base_tab[256]= { ['A']=2, ['C']=3, ['G']=4, ['T']=5, ['N']=1, ['a']=2, ['c']=3, ['g']=4, ['t']=5, ['n']=1}; static con...
test.c
#include <stdio.h> #define N (8*1024) #define C 4 #define P 2 #define M (N/C) #define TEST_PAR_NOWAIT 1 #define TEST_PAR_MAP_ALL 1 #pragma omp requires unified_shared_memory int a[N], b[N]; int main() { int i; int error, totError = 0; #if TEST_PAR_NOWAIT for (i=0; i<N; i++) a[i] = b[i] = i; #prag...
mandel_mpi.c
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <time.h> #include <sys/time.h> #include <mpi.h> #include <omp.h> #include "pngwriter.h" #include "consts.h" #define index(x, y, lda) (y*lda + x) unsigned long get_time () { struct timeval tp; gettimeofday (&tp, NULL); return tp.tv_sec ...
hermv_c_csc_n_lo.c
#include "alphasparse/kernel.h" #ifdef _OPENMP #include <omp.h> #endif #include "alphasparse/util.h" #include <memory.h> static alphasparse_status_t hermv_csc_n_lo_unroll(const ALPHA_Number alpha, const ALPHA_SPMAT_CSC *A, const ALPHA_Number *x, const ALPHA_Number beta,...
boxloop_cuda.h
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
cpu_ctc.h
#pragma once #include <tuple> #include <cmath> #include <limits> #include <algorithm> #include <numeric> #include <dmlc/omp.h> #include "ctc_helper.h" namespace mxnet_warpctc { template<typename ProbT> class CpuCTC { public: // Noncopyable CpuCTC(int alphabet_size, int minibatch, void* workspace, ...
pr67500.c
/* PR c/67500 */ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ #pragma omp declare simd simdlen(d) /* { dg-error "clause expression must be positive constant integer expression" } */ void f1 (int); /* { dg-error "undeclared here" "" { target *-*-* } .-1 } */ #pragma omp declare simd simdlen(0.5) /* { dg-e...
axpy_practice.c
/* * AXPY Y[N] = Y[N] + a*X[N] * */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h> #include <omp.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } /* read tim...
GB_unop__acos_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...
feature.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ConvolutionRules.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 CONVOLUTIONRULES_H #define CONVOLUTIONRULES_H #include "RectangularRegions.h" template <Int dimension> void C...
GB_binop__iseq_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-...
GB_binop__lt_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
elemwise_binary_scalar_op.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
GB_binop__rdiv_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-...
acoustics.c
/* * Student: Trascau Mihai * Grupa: 344C4 * * Lucrare: Ecuatia undelor pentru acustica 2D * Fisier: acoustics.c * Descriere: Fisier sursa in care este implementat tot programul folosind functiile descrise in celelalte fisiere sursa. */ #include "acoustics.h" int main(int argc, char *argv[]) { int i,j; in...
velocity_energy_cumulative.c
/* ============================================================================= Copyright (c) 2013, Institute for Microelectronics, TU Wien http://www.iue.tuwien.ac.at ----------------- ViennaWD - The Vienna Wigner Decoherence Algorithms Ensemb...
omp_task_if.c
<ompts:test> <ompts:testdescription>Test which checks the if clause of the omp task directive. The idear of the tests is to generate a tasks in a single region and pause it immediately. The parent thread now shall set a counter variable which the paused task shall evaluate when woke up.</ompts:testdescription> <ompts:o...
atomic-3.c
/* { dg-do run } */ /* { dg-options "-O0" } */ #include <omp.h> #include <stdlib.h> short e[64]; int g; _Complex double d, f; int num_threads; __attribute__((noinline)) void foo (int x, long long y) { #pragma omp parallel num_threads (4) { int i; #pragma omp barrier for (i = 0; i < 2400; i++) { ...
array.h
/** @file array.h @brief A brief, one sentence description. A more detailed multiline description... @author Peter Drysdale, Felix Fung, */ #ifndef NFTSIM_SRC_ARRAY_H #define NFTSIM_SRC_ARRAY_H // C++ standard library headers #include <vector> // std::vector; template<class T> class Array { Array(const Arr...
TemporalRowConvolution.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/TemporalRowConvolution.c" #else static inline void THNN_(TemporalRowConvolution_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kW, int dW, int padW) { THArgCheck(kW > 0, 5, "kerne...
GB_binop__isgt_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unaryop__lnot_uint8_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...
Jacobi2D-NaiveParallelSpaceTiled-OMP.test.c
/****************************************************************************** * Jacobi2D benchmark * Basic parallelisation with OpenMP * * Usage: * make omp * export OMP_NUM_THREADS=8 * bin/Jacobi2D-NaiveParallel-OMP \ * `cat src/Jacobi2D-NaiveParallel-OMP.perfexecopts` * For a run on 8 threads ********...
GB_binop__lt_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-...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file...
stresslet_real_rc.c
#include "stresslet_real_rc.h" #ifdef BEENAKKER #include "beenakker_op_fd.h" #else #error "Must provide -D<method> to compiler" #endif #define SWAP(x,y) { tmp=x;x=y;y=tmp; } static void quicksort(int* restrict list, int* restrict slave, int m, int n); static void build_cell_list( // Input const double* ...
GB_unaryop__lnot_fp32_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...
graph-gen.c
/* * "Restless reachability in temporal graphs: algebraic methods and applications" * * This experimental source code is supplied to accompany the * aforementioned paper. * * The source code is configured for a gcc build to a native * microarchitecture that must support the AVX2 and PCLMULQDQ * instructi...
simd8.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -O3 -fdump-tree-vect-details" } */ /* { dg-final { scan-tree-dump-times "vectorized 0 loops in function" 4 "vect" } } */ int a[1024]; void foo (void) { #pragma omp simd if (0) for (int i = 0; i < 1024; ++i) a[i] = a[i] + 1; } void bar (void) { #pragma omp s...
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) >...
pr60823-2.c
/* PR tree-optimization/60823 */ /* { dg-do run } */ /* { dg-require-effective-target vect_simd_clones } */ /* { dg-options "-O2 -fopenmp-simd" } */ #pragma omp declare simd simdlen(4) notinbranch __attribute__((noinline)) int foo (double c1, double c2) { double z1 = c1, z2 = c2; int res = 100, i; for (i = 0; i...
doacross-3.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (void) { int i, j; #pragma omp for ordered (1) for (i = 0; i < 64; i++) { #pragma omp ordered depend (sink: i + 1) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */ #pragma omp ordered...
test_example.valid_rose_output.c
#pragma omp greg extern int omp_get_num_threads(); extern int omp_get_thread_num(); extern void genericForHeader(); extern void foo(); extern void bar(); int a; int b; int c; int main(int argc,char **argv) { int d[10]; int e; int f; #pragma omp parallel private(a, d) firstprivate(b, c) default(shared) { f...
GB_unaryop__ainv_uint32_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...
FiniteDifferenceLibrary.c
#define dll_EXPORTS = 1 #include "FiniteDifferenceLibrary.h" DLL_EXPORT int openMPtest(int nThreads) { omp_set_num_threads(nThreads); int nThreads_running; #pragma omp parallel { if (omp_get_thread_num() == 0) { nThreads_running = omp_get_num_threads(); } } return nThreads_running; } int fdiff_direct_...
ctradd.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/compute/ztradd.c, normal z -> c, Fri Sep 28 17:38:03 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
ft.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - FT This benchmark is an OpenMP C version of the NPB FT code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
LAGraph_bfs_pushpull.c
//------------------------------------------------------------------------------ // LAGraph_bfs_pushpull: push-pull breadth-first search //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors...
omp_zsyr2k_batch.c
/** * @file omp_zsyr2k_batch.c * * @brief BBLAS omp_zsyr2k_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 * **...
GB_binop__lt_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_binop__bshift_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-...
mlp_example_bf16_amx_numa.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
main.c
#include <stdio.h> #include <time.h> struct Result { long operationsRun; double millisecondsSpent; double microsecondsPerOperation; }; /* Here lies the actual code */ void executeSummation(int range) { int output[range][range]; #pragma acc kernels { #pragma omp parallel for for (int a = 0; a < range; a...
axpy.c
/* * AXPY Y[N] = Y[N] + a*X[N] */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h> #include <pthread.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } /* read tim...
GB_unaryop__minv_fp64_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...
inputBug342.c
/* -rose:C_only does not work! */ int main(void) { int i,j; #pragma omp for for (i=0;i<10;i++) j=0; return 0; }