source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unop__identity_uint64_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
nestedfn-1.c
/* { dg-do run } */ #include <omp.h> #include <stdlib.h> int main (void) { int a = 1, b = 2, c = 3; void foo (void) { int l = 0; #pragma omp parallel shared (a) private (b) firstprivate (c) \ num_threads (2) reduction (||:l) { if (a != 1 || c != 3) l = 1; #pragma omp barrier if (omp...
gen.h
#pragma once #include "GraphHPC/defs.h" #include <cinttypes> #include <utility> #include <iostream> #define E(x) { std::cerr << #x << " = " << (x) << " "; } #define Eo(x) { std::cerr << #x << " = " << (x) << std::endl; } #define EO(x) Eo(x) typedef int32_t vid_t; typedef int64_t eid_t; typedef double weight_t; ty...
2mm.origin.pluto.c
#include <omp.h> #include <math.h> #define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) #define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /** * This version is stamped on May 10, 2016 * * Contact: * Louis...
teams512-info.c
#include <stdio.h> #include <omp.h> int main() { int N = 131072; int a[N]; int b[N]; int w[N]; int t[N]; int s[N]; for (int i=0; i<N; i++) { a[i]=0; b[i]=i; } #pragma omp target teams distribute parallel for num_teams(N/256) for (int j = 0; j< N; j++) { a[j]=b[j]; #ifdef GPUINFO t[j]...
truedep1-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...
hello_world.c
#include <omp.h> #include <stdio.h> int main() { #pragma omp parallel { int thread_num = omp_get_thread_num(); printf("thread %d\n", thread_num); if (thread_num == 0) { int num_threads = omp_get_num_threads(); printf("%d total threads\n", num_threads); } ...
test_taskwait.c
//===-- test_taskwait.cc - Test the "taskwait" construct ----------*- C -*-===// // // Part of the LOMP project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
GB_unop__lnot_fp32_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...
main.c
#include <stdio.h> #include <math.h> #include <time.h> #include <omp.h> #define mm 15 #define npart 4*mm*mm*mm /* * Function declarations */ void dfill(int,double,double[],int); void domove(int,double[],double[],double[],double); void dscal(int,double,double[],int); void fcc(double[],int,int,double); void fo...
tree-vectorizer.h
/* Vectorizer Copyright (C) 2003-2019 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.com> This file is part of GCC. GCC 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 ve...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Soft...
update_ops_named_Y.c
#include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif //void Y_gate_old_single(UINT target_qubit_index, CTYPE *state, ITYPE dim); //void Y_gate_old_parallel(UINT target_qubit_index, CTYPE *stat...
GB_binop__plus_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-...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
kernel.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
problem.sine.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
a12s.c
#define N 100000000 #define MAX 4 int a[N],b[N],ind[N]; long long s=0; main() { int i; /* inicialitzacio, no en paral.lel */ #pragma omp parallel for for(i=0;i<N;i++) { a[i]=1; b[i]=2; ind[i]=i%MAX; } #pragma omp parallel for schedule (static,1) for (i=0;i<N;i++) b[ind[i]] += a[i]; for (i=0;i<MAX;i++) { prin...
validate.c
/* Copyright (C) 2010-2011 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
lis_matrix_dns.c
/* Copyright (C) 2002-2012 The SSI Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condition...
task3_solution.c
#include <math.h> #include <string.h> #include "timer.h" #define NN 1024 #define NM 1024 float A[NN][NM]; float Anew[NN][NM]; int main(int argc, char** argv) { const int n = NN; const int m = NM; const int iter_max = 1000; const double tol = 1.0e-6; double error = 1.0; memset(A,...
J1OrbitalSoA.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: // // Fi...
main.c
/* !----------------------------------------------------------------------- ! Unauthorized use or distribution of this program is not permitted. ! ! Author: Ruud van der Pas ! ! Copyright 2007 - Sun Microsystems !----------------------------------------------------------------------- */ #include <omp.h>...
cp-tree.h
/* Definitions for -*- C++ -*- parsing and type checking. Copyright (C) 1987-2021 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
alignment.h
//============================================================================== // // Copyright 2018 The InsideLoop Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the Lic...
conv_dw_kernel_x86.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...
HyperbolicGenerator.h
/* * HyperbolicGenerator.h * * Created on: 20.05.2014 * Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu) */ #ifndef HYPERBOLICGENERATOR_H_ #define HYPERBOLICGENERATOR_H_ #include <cmath> #include <vector> #include "../geometric/HyperbolicSpace.h" #include "StaticGraphGenerator.h" #include "../auxili...
flops_FMA3.h
/* flops_FMA3.h - FMA3 Benchmarks * * Author : Alexander J. Yee * Date Created : 12/30/2013 * Last Modified : 12/30/2013 * * * * And of course... The typical copyright stuff... * * Redistribution of this program in both source or binary, regardless of * form, with or without modif...
open_mp.c
#include <stdio.h> #include <mpi.h> #include <math.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <omp.h> #include "../funcs.h" #define ROW_SIZE 320 #define COLUMN_SIZE 320 #define REPEAT_TIMES 20 #define MAX_TIMES 500 #define TERMCHECK_TIMES 10 #define TERMINATION_CHECK int main() {...
9426.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...
a.c
#include <stdio.h> #include <omp.h> int main() { int some_var = 42; #pragma omp parallel { int tid = omp_get_thread_num(); int nth = omp_get_num_threads(); printf("Thread: %2d of %2d, some_var = %d\n", tid, nth, some_var); } return 0; }
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2017. AL...
trilinos_dof_updater.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #if !defined(...
test.c
#include <stdlib.h> #include <check.h> #include <omp.h> #include <stdint.h> static uint64_t fib_seq(int n) { /*{{{*/ if (n < 2) return n; return fib_seq(n - 1) + fib_seq(n - 2); } /*}}}*/ START_TEST(omp_barrier_simple) {/*{{{*/ int num_threads_reqd = 2; int a[2]; a[0] = 42; a[1] = -42;...
layer.h
// == mojo ==================================================================== // // Copyright (c) gnawice@gnawice.com. All rights reserved. // See LICENSE in root folder // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation...
mat_mul_p4a_4000.c
/* * file for mat_mul.c */ #include "./mat_mul.h" #include "./size.h" void mat_mul(int *a, int *b, int *c); void mat_mul(int *a, int *b, int *c) { int i, j, k, t; #pragma omp parallel for private(j, t, k) for(i = 0; i <= 3999; i += 1) for(j = 0; j <= 3999; j += 1) { c[i*4000+j] = 0; for...
gimple.h
/* Gimple IR definitions. Copyright (C) 2007-2013 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> This file is part of GCC. GCC 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 Foundati...
XT_MagElecDen.c
/* ============================================================================ * Copyright (c) 2013 K. Aditya Mohan (Purdue University) * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * ...
latency_ctx.h
/* * Copyright (c) 2018 Intel Corporation. All rights reserved. * This software is available to you under the BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributi...
ApproxWeightPerfectMatching.h
// // ApproxWeightPerfectMatching.h // // // Created by Ariful Azad on 8/22/17. // // #ifndef ApproxWeightPerfectMatching_h #define ApproxWeightPerfectMatching_h #include "CombBLAS/CombBLAS.h" #include "BPMaximalMatching.h" #include "BPMaximumMatching.h" #include <parallel/algorithm> #include <parallel/numeric> #...
operators.h
#include "cell.h" #include "enums.h" #include <vector> #include <random> #include <omp.h> inline int mod(const int x, const int mod) { return ((x >= 0) ? (x % mod) : (x + mod)); } Cell get_worst_cell(const std::vector<Cell> &neighborhood) { Cell worst = Cell(Point(-1, -1)); worst.R = 255; ...
compute_ktopipi_type1.h
#ifndef _COMPUTE_KTOPIPI_TYPE1_H #define _COMPUTE_KTOPIPI_TYPE1_H CPS_START_NAMESPACE //TYPE 1 //Each contraction of this type is made up of different trace combinations of two objects: //1) \sum_{ \vec x } \Gamma_1 \prop^L(x_op,x) S_2 \prop^L(x,x_op) //2) \sum_{ \vec y, \vec x_K } \Gamma_2 \prop^L(x_op,y) S_2 ...
slauum.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/zlauum.c, normal z -> s, Fri Sep 28 17:38:08 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
memBwBase.c
/** $lic$ * Copyright (C) 2016-2017 by The Board of Trustees of Cornell University * Copyright (C) 2013-2016 by The Board of Trustees of Stanford University * * This file is part of iBench. * * iBench is free software; you can redistribute it and/or modify it under the * terms of the Modified BSD-3 License as pu...
cheby.gold.h
#include "common/common.hpp" void cheby_step (double *out_def, double* Ac_def, double* Ap_def, double* RHS_def, double* Dinv_def, double h2inv, double c1, double c2, int N) { double (*Ap)[N][N] = (double (*)[N][N])Ap_def; double (*Ac)[N][N] = (double (*)[N][N])Ac_def; double (*out)[N][N] = (double (*)[N][N])out_def...
nqueens.c
/* This program is a modified version of the N queens program found in the Barcelona OpenMP Tasks Suite. Copyright since 2016 the OMPi Team Dept. of Computer Science & Engineering, University of Ioannina This program is free software; you can redistribute it and/or modify it under the terms of the GNU G...
Range.h
#ifndef __APPROXFLOW_RANGE__ #define __APPROXFLOW_RANGE__ #include <functional> // #include <omp.h> namespace ApproxFlow { template<typename Type> class RangeType { private: Type _begin, _end; public: RangeType(); RangeType(Type begin, Type end); Type begin() const {return _begin; } Typ...
illife.c
#define _POSIX_C_SOURCE 200809L #include <stdlib.h> #include <stddef.h> #include "illife.h" void* allocate(size_t size, size_t align) { void* p = NULL; if (posix_memalign(&p, align, size)) { return NULL; } return p; } void deallocate(void* ptr) { free(ptr); } #define ROUND_UP(a, align) (((a) + ((align)...
utils.c
// Copyright (c) 2015, UChicago Argonne, LLC. All rights reserved. // Copyright 2015. UChicago Argonne, LLC. This software was produced // under U.S. Government contract DE-AC02-06CH11357 for Argonne National // Laboratory (ANL), which is operated by UChicago Argonne, LLC for the // U.S. Department of Energy. The U.S....
SparseDenseProduct.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2015 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, You c...
betweennessCentrality.c
#include "defs.h" double betweennessCentrality(graph* G, DOUBLE_T* BC) { mcsim_skip_instrs_begin(); VERT_T *S; /* stack of vertices in the order of non-decreasing distance from s. Also used to implicitly represent the BFS queue */ plist* P; /* predecessors of a vertex v on shortest p...
GB_unop__identity_int16_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
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) >...
mlp_example_bf16_amx_numa.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
spectralnorm.gcc-4.c
/* The Computer Language Benchmarks Game * http://benchmarksgame.alioth.debian.org/ * * Original C contributed by Sebastien Loisel * Conversion to C++ by Jon Harrop * OpenMP parallelize by The Anh Tran * Add SSE by The Anh Tran * Reconversion into C by Dan Farina */ #define _GNU_SOURCE #include <omp.h> #includ...
GB_unaryop__ainv_uint32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
pr64769.c
/* PR tree-optimization/64769 */ /* { dg-do compile } */ /* { dg-options "-fopenmp-simd" } */ #pragma omp declare simd linear(i) void foo (int i) { }
02_loop_decompose_1.c
#include <stdio.h> #include <omp.h> #define MAX_ITS 10000 int main() { int nproc, i, sum; nproc = omp_get_max_threads(); int its_per_proc[nproc]; for (i = 0; i< nproc; ++i){ its_per_proc[i] = 0; } #pragma omp parallel #pragma omp for for (i = 0; i< MAX_ITS; ++i){ its_per_proc[omp_get_thread_num(...
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...
nlk_array.c
/****************************************************************************** * NLK - Neural Language Kit * * Copyright (c) 2014 Luis Rei <me@luisrei.com> http://luisrei.com @lmrei * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation fi...
app_baseline.c
/* * JGL@SAFARI */ /** * @file app.c * @brief Template for a Host Application Source File. * * The macros DPU_BINARY and NR_TASKLETS are directly * used in the static functions, and are not passed as arguments of these functions. */ #include <assert.h> #include <getopt.h> #include <stdbool.h> #include <stdint....
GB_binop__isge_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
choleskies_cython.c
/* Generated by Cython 0.29.21 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython...
fractal.c
/* Name: fractal.c v0.0.1 * Date: 2021-09-24 * Intro: Render fractals. * Update: Functions fractalJuliaSet and fractalMandelbrotSet no longer generate wrong range (0, clrUsed] but right [0, clrUsed). */ #include "fractal.h" #if _FRACTAL_H != 0x000000 #error fractal.h version not supported #endif void...
generator_spgemm_csc_asparse.c
/****************************************************************************** ** Copyright (c) 2015-2018, Intel Corporation ** ** All rights reserved. ** ** ** ...
GB_unaryop__ainv_bool_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
setthreads.c
// Load the OpenMP functions library #include<omp.h> int main() { // Set variables int tnum=0; // Create a parallel block of four threads (including master thread) /* #pragma omp parallel private(tnum) num_threads(4) */ /* { */ tnum = omp_get_thread_num(); printf("I am thread number: %d\n", tn...
DRB040-truedepsingleelement-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...
HYPRE_IJMatrix.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) **************************************...
benchmark.h
#ifndef BENCHMARK_H #define BENCHMARK_H #include "datasets.h" #include "benchmark_utils.h" #include "algorithms/binary_search.h" #include "algorithms/linear_search.h" #include "algorithms/interpolation_search.h" #include "algorithms/tip.h" #include "algorithms/sip.h" #include "algorithms/bin_eyt.h" #include "omp.h" #i...
GB_unop__minv_int32_int32.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...
StochasticBatchNormalization.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuch...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
declare_reduction_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -emit-llvm %s -triple %itanium_abi_triple -o - -femit-all-decls -disable-llvm-passes | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple -emit-pch -o %t %s -femit-all-decls -disable-llvm-passes // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple ...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__le_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...
spgemm-petsc.c
#include <petscmat.h> #include "omp.h" static char help[] = "help yourself!"; int main (int argc, char **argv) { Mat A, B, C; PetscViewer fd; PetscInt m, n; MatInfo info; double nnz; int niters; PetscInitialize(&argc, &argv, (char*)0, help); int nthds, np; MPI_Comm_size(MPI_COMM_WORLD, &np); #pragma omp p...
residual_based_bdf_custom_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
GB_unop__log1p_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...
3dMath.h
/* Public Domain / CC0 C99 Vector Math Library */ #ifndef CHAD_MATH_H #define CHAD_MATH_H //#define CHAD_MATH_NO_ALIGN #ifndef CHAD_MATH_NO_ALIGN #include <stdalign.h> #define CHAD_ALIGN alignas(16) #else #define CHAD_ALIGN /*a comment*/ #endif #include <math.h> #include <string.h> typedef float f_; typedef unsigned ...
convolutiondepthwise_3x3_int8.h
// SenseNets is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2018 SenseNets Technology Ltd. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of t...
dem_structures_coupling_utilities.h
/* * Author: Miguel Angel Celigueta * * maceli@cimne.upc.edu */ #ifndef KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H #define KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H // /* External includes */ // System includes // Project includes #include "includes/variables.h" /* System includes */ #include <limits> #includ...
scale.h
/* Copyright (c) 2016 Drew Schmidt All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of con...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
determinantOf3cross3Matrix.c
#include <stdio.h> #include <omp.h> int main(){ int mat[3][3], det = 0, i, j; omp_set_dynamic(0); int m = omp_get_num_procs(); omp_set_num_threads(m); printf("\nEnter elements:\n"); for(i = 0; i < 3; i++){ for(j = 0; j < 3; j++){ printf("matrix[%d][%d] = ", i, j); ...
GB_unaryop__abs_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
convolution_3x3_pack1to4_bf16s.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 copy ...
thdat95.c
/* * Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain this list * of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce t...
c3_fmt.c
/* * Generic crypt(3) support, as well as support for glibc's crypt_r(3) and * Solaris' MT-safe crypt(3C) with OpenMP parallelization. * * This file is part of John the Ripper password cracker, * Copyright (c) 2009-2013 by Solar Designer * * Redistribution and use in source and binary forms, with or without * m...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
interaction.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
sort_top_scan.h
int local_range = omp_get_num_threads(); int lid = omp_get_thread_num(); if (lid == 0) s_seed = 0; #pragma omp barrier // Decide if this is the last thread that needs to // propagate the seed value int last_thread = (lid < num_work_groups && (lid+1) == num_work_groups) ? 1 : 0; for (int d = 0; d < 16; d++) { ...
RK2Solver.h
#include "../DifferentialSolver.h" // improved Euler method (Heun`s method) template <typename Scalar> class RK2Solver: public DifferentialSolver<Scalar> { public: using DifferentialSolver<Scalar>::timeStep; using DifferentialSolver<Scalar>::currTime; RK2Solver(): DifferentialSolver<Scalar>() {} void SetS...
GB_unaryop__ainv_int64_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ex2.c
/* * This sequential code calculates pi using the formula to * calculate the atan(z) which is the integral from 0 to z * of 1/(1+x*x) times dx. atan(1) is 45 degrees or pi/4 */ #include <stdio.h> #include <omp.h> static long num_steps = 10000000; /* number of intervals */ double step; /* the size of the interv...
GB_binop__minus_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...
benchmark_tree_learner.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #pragma once #include <LightGBM/dataset.h> #include <LightGBM/tree.h> #include <LightGBM/tree_learner.h> #include <LightGBM/utils/array_args.h> #incl...
GB_binop__isle_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) int main(void) { check_offloading(); double A[N], B[N], C[N], D[N], E[N]; ...
triad.h
#ifndef TRIAD_H #define TRIAD_H namespace TSnap { ///////////////////////////////////////////////// // Triads and clustering coefficient /// Computes the average clustering coefficient as defined in Watts and Strogatz, Collective dynamics of 'small-world' networks. ##TSnap::GetClustCf template <class PGraph...