source
stringlengths
3
92
c
stringlengths
26
2.25M
sgemm.c
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <math.h> #include <sys/time.h> #include <omp.h> /* * C = [n, q] = A[n, m] * B[m, q] */ enum { N = 10000, M = 10000, Q = 10000, NREPS = 3, }; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (...
Example_reduction.6.c
/* * @@name: reduction.6c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: rt-error */ #include <stdio.h> int main (void) { int a, i; #pragma omp parallel shared(a) private(i) { #pragma omp master a = 0; // To avoid race conditions, add a barrier here. #pragma omp for reduction(+:...
convolutiondepthwise_3x3_pack8_fp16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
linear_master_slave_constraint.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Aditya Ghantasala // #if !defined(LINEAR_MASTER_...
GB_binop__first_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...
GB_subassign_11.c
//------------------------------------------------------------------------------ // GB_subassign_11: C(I,J)<M,repl> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse....
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
bspline_create.c
///////////////////////////////////////////////////////////////////////////// // einspline: a library for creating and evaluating B-splines // // Copyright (C) 2007 Kenneth P. Esler, Jr. // // // // This...
GB_unop__identity_int64_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...
bugged6.c
/****************************************************************************** * ЗАДАНИЕ: bugged6.c * ОПИСАНИЕ: * Множественные ошибки компиляции ******************************************************************************/ #include <omp.h> #include <stdio.h> #include <stdlib.h> #define VECLEN 100 float a[VECLE...
tile.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "tile.h" #include "sort.h" #include "timer.h" #include "io.h" #include "util.h" #include "ccp/ccp.h" /**********************************...
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...
ompaffinity.h
#ifndef OMPAFFINITY_H #define OMPAFFINITY_H #define WITH_MPI #define MPI_DEBUG // redirect to do nothing header if we aren't using MPI #ifndef WITH_MPI #include <mpi/mpicomm_null.h> #else #include <mpi/mpicomm.h> #endif #include <omp.h> //#include <set.h> //#include <vector.h> namespace mpi { // Identifies process...
regularisation.h
/* Incremental diffusion regularisation of parametrised transformation using (globally optimal) belief-propagation on minimum spanning tree. Fast distance transform uses squared differences. Similarity cost for each node and label has to be given as input. */ void messageDT(int ind,float* data,short* indout,int len1...
array_sum.c
#include <stdio.h> #include <omp.h> int main() { int cursum, total,n; int a[10]={1,2,3,4,5,1,2,3,4,5}; n = sizeof(a)/sizeof(int); #pragma omp parallel private(cursum) shared(total) { cursum = 0; total = 0; #pragma omp for for(int i = 0; i <= n; i++) ...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
main.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { int i; #pragma omp parallel for private(i) num_threads(5) schedule(static) for(i = 0; i <= 16; i++) { sleep(i); printf("Il thread %d ha completato iterazione %d.\n", omp_get_thread_num() , i); } printf("Tut...
ERSP.c
// MIT License // Copyright (c) [2017] [Vinay Yuvashankar] // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, c...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
task-taskgroup-nested.c
/* Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze (joachim.protze@tu-dresden.de), Jonas Hahnfeld (hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir Rakamaric, Dong H. A...
Optimizer.h
/* * Optimizer.h * * Created by Guido Novati on 30.10.18. * Copyright 2018 ETH Zurich. All rights reserved. * */ #pragma once #include <fstream> #include "Network.h" struct Adam { const Real eta, fac, beta1, beta2, lambda; static constexpr Real EPS = 1e-8; Adam(const Real _eta, const int batchSize, co...
i3lock-fancier-rapid.c
#include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <unistd.h> #include <sys/wait.h> #include <X11/Xlib.h> #include <X11/Xutil.h> #include <omp.h> #include "lodepng/lodepng.h" void box_blur_h(unsigned char *dest, unsigned char *src, int height, int width, int radius) { double coeff ...
omp_alloc_def_fb.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> int main() { omp_alloctrait_t at[2]; omp_allocator_handle_t a; void *p[2]; at[0].key = OMP_ATK_POOL_SIZE; at[0].value = 2 * 1024 * 1024; at[1].key = OMP_ATK_FALLBACK; at[1].value = OMP_ATV_DEFAULT_MEM_FB; a = omp_init_allocator(omp_la...
GB_unop__identity_uint32_fp32.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...
GB_binop__fmod_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ZMQComm.h
/*! @brief Flag for checking if this header has already been included. */ #ifndef YGGZMQCOMM_H_ #define YGGZMQCOMM_H_ #include <CommBase.h> #include "../datatypes/datatypes.h" #ifdef ZMQINSTALLED #include <czmq.h> #endif #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ extern "C" { #endif #ifdef ZM...
common.c
#include "common.h" #include "linsys.h" /* contains routines common to direct and indirect sparse solvers */ #define MIN_SCALE (1e-4) #define MAX_SCALE (1e4) #define NUM_SCALE_PASSES 10 /* additional passes don't help much */ scs_int SCS(copy_a_matrix)(ScsMatrix **dstp, const ScsMatrix *src) { scs_int Anz = src->p[...
complex-align-2.c
#pragma omp declare target _Complex int *g; #pragma omp end declare target _Complex float f(void); int main () { _Complex int y; #pragma omp target map(from:y) { _Complex int x; g = &x; __imag__ x = 1; __real__ x = 2; y = x; } if ((__imag__ y != 1) || (__real__ y != 2)) __...
IJVector_parcsr.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
GB_unaryop__identity_uint32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
com1.c
#include <mpi.h> extern int local_cell_blocks; extern int local_edge_blocks; #include "grid.h" #include "memory.h" #include "component.h" #include "io.h" #include <stdint.h> void com1_init(GRID * g); void com1_compute(GRID * g); void com1_io(GRID * g); double com1_flops(GRID * g); double com1_memory(GRID * g); uint64_...
mixed_tentusscher_myo_epi_2004_S3_18.c
// Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S3_18.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_o...
GB_binop__bclr_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
raster1.h
#pragma once #include <glm/glm.hpp> #include <QImage> // Rays have origin and direction. // The direction vector should always be normalized. //struct Ray { // glm::vec3 o, d; // inline Ray(glm::vec3 o0 = glm::vec3(0), glm::vec3 d0 = glm::vec3(0)) { o = o0, d = glm::normalize(d0); } //}; #include <stdio.h> #in...
truedepseconddimension-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...
ztrsm.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
dynwave.c
//----------------------------------------------------------------------------- // dynwave.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/20/14 (5.1.001) // 03/28/14 (5.1.002) // 09/15/14 (5.1.007) // 03/19/15 (5.1.008) // 08/01/16 (5.1.011...
prob_tree.h
#ifndef PROB_TREE_H_ #define PROB_TREE_H_ #include <sstream> #include <fstream> #include "definitions.h" #include "Bag.h" #include "ProbabilisticGraph.h" namespace CPU_ALGOS{ class TreeDecomposition{ std::vector<Bag*>* bags; Bag* root_bag; ProbabilisticGraph* graph; int number_bags, height, width, treewidth; ...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB043-adi-parallel-no.c
/** * adi.c: This file is part of the PolyBench/C 3.2 test suite. * * Alternating Direction Implicit solver: * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #include <unistd.h> #include <string.h> #in...
example_03-StructOfArrays-Naive-Omp-SIMD.c
/* * SPDX-License-Identifier: BSD-3-Clause * * example_03-StructOfArrays-Naive-Omp-SIMD.c : * Example of SPH Density Calculation using a * naive implementation of the main density loop, * no neighbours earch, and Struct of Arrays (SoA) * data layout, OpenMP parallelization and SIMD * ...
tensor.h
#ifndef TENSOR_H #define TENSOR_H #include "common.h" #include "dim.h" namespace tpm { class Tensor { public: enum DataType { Float32, Int32, }; enum TensorType { Input, Weight, Invalid, NotCounted, }; // TODO: is more compute state needed? ...
GB_unaryop__ainv_int64_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...
GB_unop__log1p_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...
basic_kernels.h
#ifndef BASIC_KERNELS_H #define BASIC_KERNELS_H #define GEMM_ROW_BLOCK_SIZE_A 16 #define GEMM_COLUMN_BLOCK_SIZE_B 128 #define GENERIC_VECTOR_SIZE 16 extern "C" { /*! * Set the entire matrix to the given value in parallel using OpenMP. * * @param m the number of rows of matrix B. * @param n the number of...
scheduled-clause.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n=200,chunk,a[n],suma=0; int dyn_var_value, nthreads_var_value, thread_limit_var; omp_sched_t kind; int modifier = 0; int primera = 1; if(argc <...
QuadNode.h
/* * QuadNode.h * * Created on: 21.05.2014 * Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu) */ #ifndef QUADNODE_H_ #define QUADNODE_H_ #include <vector> #include <algorithm> #include <functional> #include <assert.h> #include "../../auxiliary/Log.h" #include "../../auxiliary/Parallel.h" #include ".....
dmg_fmt_plug.c
/* * DMG cracker patch for JtR. Hacked together during August of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com> * * This software is * Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * Copyright (c) 2015, magnum * and is based on "dmg.c" from * * hashkill - a hash cracking tool * Copyright (C...
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 ...
core_chegst.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_zhegst.c, normal z -> c, Fri Sep 28 17:38:23 2018 * **/ #include <plasma_core_blas.h> #include "pla...
GB_unop__sqrt_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...
vect-simd-clone-8.c
/* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #include "tree-vect.h" #ifndef N #define N 1024 #endif int a[N], b[N]; long int c[N]; unsigned char d[N]; #pragma omp declare simd simdlen(8) notinbra...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
omp_parallel_for_reduction.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel for reduction directive with all its options.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp parallel for reduction</ompts:directive> <ompts:testcode> #include <stdio.h> #include <math.h> #include "omp_testsuit...
diagmm_x_coo_n_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "memory.h" #include "alphasparse/opt.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ...
threading-funneled-solution.c
#include "mpi.h" #include <stdio.h> void compute_row(int row_index, float input[6][8], float output[6][8]) { for (int j = 0; j < 8; j = j + 1) { /* Here is the 5-point stencil */ const int right_column_index = (j + 1) % 8; const int left_column_index = (j + 8 - 1) % 8; const int...
GB_binop__ge_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-...
jinv_ddd_in_h.h
//**************************************************************************************** // // Copyright (c) 2015-2020, Yoshifumi Nakamura <nakamura@riken.jp> // Copyright (c) 2015-2020, Yuta Mukai <mukai.yuta@fujitsu.com> // Copyright (c) 2018-2020, Ken-Ichi Ishikawa <ishikawa@theo.phys.sci.hirosima-u.ac...
fft_omp.c
#include "fft.h" /* precomputes coefficients, saves about a factor of N */ void precalc(complex_t **T, int_t len) { real_t angle0 = (real_t) -M_PI, angle, scale; int_t M_2; for(int_t M = 2, j = 0; M <= len; M <<= 1, ++j) { complex_t V = {(real_t) 1.f, (real_t) 0.f}; scale = 1 / (M - 1)...
Example_worksharing_critical.1.c
/* * @@name: worksharing_critical.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ void critical_work() { int i = 1; #pragma omp parallel sections { #pragma omp section { #pragma omp critical (name) { #pragma omp parallel { #pragma omp single...
ompbound.c
// note not doing O0 below as to ensure we get tbaa // RUN: if [ %llvmver -ge 9 ]; then %clang -fopenmp -std=c11 -O1 -fno-vectorize -fno-unroll-loops -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out; fi // RUN: if [ %llvmver -ge 9 ]; then %clang ...
sb.c
/* by FRT */ /* 09/05/09: tolgo loop di lunghezza 3 */ /* 11/05/09: metto 4 repliche */ /* 06/08/09: correzione a sumBit0 */ /* 24/08/09: correzione nel passo di swap */ /* 15/10/12: tolgo la tabella per gli offset */ // 26/07/16: parto da SG_Bethe_field_PT.c e tolgo il PT // 28/07/16: tolgo il campo // 05/11/16: tolgo...
5600.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
GB_binop__rminus_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...
iw_core.c
/* // Copyright 2016-2017 Intel Corporation All Rights Reserved. // // The source code, information and material ("Material") contained herein is // owned by Intel Corporation or its suppliers or licensors, and title // to such Material remains with Intel Corporation or its suppliers or // licensors. The Materi...
0d738935_so12.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size;...
GB_unaryop__one_int64_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...
mmult_par.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #define NROW 1024 #define NCOL NROW #define TEST_RESULTS struct timeval startTime; struct timeval finishTime; double timeIntervalLength; //Input Array A int inputArrayA [NROW][NCOL]; //Input Array B int inputArrayB [N...
matrix_utils.h
//------------------------------------------------------------------------------ // // MATRIX UTILS // Utils to work with Eigen::MatrixXd // //------------------------------------------------------------------------------ #ifndef MATRIX_UTILS_H #define MATRIX_UTILS_H //Eigen libs #include"Eigen/Dense" #include"Ei...
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...
collisionBrutal.h
#ifndef __COLLISION_BRUTAL__H__ #define __COLLISION_BRUTAL__H__ #include <CGAL/Surface_mesh.h> #include <boost/iterator.hpp> #include <boost/iterator/filter_iterator.hpp> #include <boost/range/sub_range.hpp> #include <Eigen/Core> #include <functional> #include <tiny_obj_loader.h> #include <vector> #include <fstream> #i...
semi_setup_rap.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...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
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-...
kmp_stats.h
#ifndef KMP_STATS_H #define KMP_STATS_H /** @file kmp_stats.h * Functions for collecting statistics. */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license...
homomorphic_functions.c
static long long int sk[NUM_PRIME][4096]; static long long int pk0[NUM_PRIME][4096], pk1[NUM_PRIME][4096]; static long long int rlk00[NUM_PRIME][4096], rlk01[NUM_PRIME][4096], rlk10[NUM_PRIME][4096], rlk11[NUM_PRIME][4096]; //static long long int rlk20[NUM_PRIME][4096], rlk21[NUM_PRIME][4096], rlk30[NUM_PRIME][4096], r...
BEMSolver.h
/** * * @file BEMSolver.h * * @copyright 2018 King Abdullah University of Science and Technology (KAUST). * All rights reserved. * * @author Mustafa Abduljabbar [mustafa.abduljabbar@kaust.edu.sa] and Mohammed Al Farhan [mohammed.farhan@kaust.edu.sa]. * **/ #ifndef BEMSOLVER #de...
GB_binop__le_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:...
matmul_double.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_subassign_03.c
//------------------------------------------------------------------------------ // GB_subassign_03: C(I,J) += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com Se...
test.c
#include <stdio.h> #include <float.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (957*3) #define ZERO(X) ZERO_ARRAY(N, X) #define INIT() { \ INIT_LOOP(N, { \ Ac[i] = i % 100 == 0 ? 1 : 0; \ Bc[i] = i ...
sveTest1.c
int main() { #pragma omp parallel { int best; int j3[10]; j3[0] = 1; best = j3[0]; if (best) { // Do something. } } }
DistanceTableData.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeremy Mc...
4284.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
gemm.c
#include "gemm.h" #include "utils.h" #include "im2col.h" #include "dark_cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <float.h> #include <string.h> #include <stdint.h> #if defined(_OPENMP) #include <omp.h> #endif #if defined(_MSC_VER) #if defined(_M_ARM) || defined(_M_ARM64) static inline u...
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 ...
satisfiability.c
/** * @file satisfiability.c * @author Austin Gill (atgill@protonmail.com) * @brief Implementation of satisfiability functions. Yay. */ #include "satisfiability.h" bool circuit_one( const int32_t tid, const uint16_t z ) { bool bits[16] = {0}; extract_bits( bits, z ); if( ( bits[0] || bits[1] ) && ( !b...
graph.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef GRAPH_H_ #define GRAPH_H_ #include <algorithm> #include <cinttypes> #include <cstddef> #include <iostream> #include <type_traits> #include "pvector.h" #include "util.h" /* GAP Benchmark Suite ...
9.c
#include <stdio.h> #include <omp.h> int main() { int i, j; i = 1; j = 2; omp_set_num_threads(16); #pragma omp parallel private(i) firstprivate(j) { i = 3; j = j + 2; #pragma omp master printf("%d %d\n", i, j); } printf("%d %d\n", i, j); return 0; }
mat_mul_p4a_6000.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 <= 5999; i += 1) for(j = 0; j <= 5999; j += 1) { c[i*6000+j] = 0; for...
bml_copy_dense_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_copy.h" #include "../bml_types.h" #include "bml_allocate_dense.h" #include "bml_copy_dense.h" #include "bml_types_dense.h" #ifdef BML_USE_MAGMA #include "magma_v2.h" #endif #include <complex.h> #include <stdlib.h> #includ...
GB_unop__identity_int8_int8.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...
memory.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
cmat_mul.c
#include "cmat_mul.h" #define CALL(func, prompt) for (int t = 0; t < times - 1; t++) MatDelete(func(mat1, mat2)); \ ans = func(mat1, mat2); \ printf("Calling "prompt" %d times: (%lu*%lu)x(%lu*%lu) >>> ", \ ...
trmv_c_bsr_n_hi_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include <string.h> static alphasparse_status_t trmv_bsr_n_hi_conj_omp(const ALPHA_Number alpha, con...
simulation.c
#include "rsbench.h" //////////////////////////////////////////////////////////////////////////////////// // BASELINE FUNCTIONS //////////////////////////////////////////////////////////////////////////////////// // All "baseline" code is at the top of this file. The baseline code is a simple // implementation of the ...
NETLM_fmt_plug.c
/* * NETLM_fmt.c -- LM Challenge/Response * * Written by JoMo-Kun <jmk at foofus.net> in 2007 * and placed in the public domain. * * Performance and OMP fixes by magnum 2011 * * This algorithm is designed for performing brute-force cracking of the LM * challenge/response pairs exchanged during network-based au...