source
stringlengths
3
92
c
stringlengths
26
2.25M
push_relabel_segment.h
// // Created by Jan Groschaft on 2/1/19. // /* * Parallel implementation of push-relabel algorithm, divides the network into multiple segments. */ #ifndef MAXFLOW_GOLDBERG_CR_H #define MAXFLOW_GOLDBERG_CR_H #include "../../common_types.h" #include "../../data_structures/linked_list.h" #include "../../data_structu...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
data_env_scalar_map.c
#include <stdio.h> #include <omp.h> int main(int argc, char *argv[], char **envp) { int numdev = omp_get_num_devices(); printf ("Machine has %d GPU device%s\n", numdev, (numdev==1 ? "" : "s") ); int from = 13; int tofrom = 17; printf("ON HOST before: from = %d, tofrom = %d\n", from, tofrom); #pragma...
GB_binop__bxnor_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-...
linear_combine_two_states.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* This file contains a function for linearly combining two states. */ #include <stdlib.h> #include <stdio.h> #include "../game_types.h" int ...
triplet_iw.c
/* Copyright (C) 2016 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...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
eavlGatherOp.h
// Copyright 2010-2013 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_GATHER_OP_H #define EAVL_GATHER_OP_H #include "eavlCUDA.h" #include "eavlDataSet.h" #include "eavlArray.h" #include "eavlOpDispatch.h" #include "eavlOperation.h" #include "eavlException.h" #include <time.h> #ifdef HAVE_OPENMP ...
HSetMaintainer.h
#ifndef HSET_MAINTAINER_H #define HSET_MAINTAINER_H /************************************************************* * Author : Markus Schordan * *************************************************************/ #include <unordered_set> #include <iostream> //#define HSET_MAINTAINER_DEBUG...
scoping.c
int bar() { int x = 10; { int y = 19 + x; int z = 11; for (;;) { z++; { int x = 11; x++; } z = x - 1; } } } int foo() { int a = 10 + bar(); while (1) { a = 10; { int a; a = 15; } a--; break; } } int main() { int x = 10; int y = 5; int q = 11; l1: l2: { int z = 10 ...
stat_ops_expectation_value.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "stat_ops.h" #include "utility.h" #include "constant.h" double expectation_value_X_Pauli_operator(UINT target_qubit_index, const CTYPE* state, ITYPE dim); double expectation_value_Y_Pauli_operator(UINT target_qubit_index, const CTYPE...
mangrove.c
/*********************************************************************************/ /* */ /* Animation of wave equation in a planar domain */ /* ...
VolumetricConvolutionMM.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricConvolutionMM.c" #else #include <ATen/div_rtn.h> #define CONV3D_OMP_THRESHOLD 20 static void inline THNN_(VolumetricConvolutionMM_shapeCheck)( THNNState *state, THTensor *input, ...
randomGenerator.h
#pragma once #include <random> #include <vector> #include <omp.h> #include "datatypes.h" #include "timing.h" #include <limits.h> #if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA #include <cuda.h> #include <curand_kernel.h> extern __device__ curandState* dstates; #endif class RandomGenerator { static std::vect...
omp_utils.h
/** * !file omp_utils.h * \brief OpenMP utilities */ #ifndef OMP_UTILS_H #define OMP_UTILS_H #ifdef USEOPENMP #include <omp.h> #endif // USEOPENMP namespace NBody { #ifdef USEOPENMP int get_available_threads() { int nthreads; #pragma omp parallel #pragma omp single { nthreads = omp_get_num_threads(); } r...
gen05.c
/* Description: This program implements my Genetic Algorithm method of solving the "N-Queens Problem" Author: Georgios Evangelou (1046900) Year: 5 Parallel Programming in Machine Learning Problems Electrical and Computer Engineering Department, University of Pa...
pi_omp_overhead.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * Parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> /* OpenMP */ #if _EXTRAE_ #include "extrae_user_events.h" // Extrae Constants #define PROGRAM 100...
mkl_util.h
/* Copyright 2017 The TensorFlow 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 License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
tm_efficientdet.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...
eigrp_fmt_plug.c
/* * Cracker for EIGRP (Cisco's proprietary routing protocol) MD5 + HMAC-SHA-256 authentication. * http://tools.ietf.org/html/draft-savage-eigrp-00 * * This is dedicated to Darya. You inspire me. * * This software is Copyright (c) 2014, Dhiru Kholia <dhiru [at] openwall.com>, * and it is hereby released to the g...
AlgebraicTriangleCounting.h
/* * AlgebraicTriangleCounting.h * * Created on: Jul 12, 2016 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef NETWORKIT_CPP_ALGEBRAIC_ALGORITHMS_ALGEBRAICTRIANGLECOUNTING_H_ #define NETWORKIT_CPP_ALGEBRAIC_ALGORITHMS_ALGEBRAICTRIANGLECOUNTING_H_ #include "../../base/Algorithm.h" names...
doacross-2.c
/* PR middle-end/87649 */ void foo (void) { int i; #pragma omp for ordered(1) for (i = 0; i < 64; i++) { #pragma omp ordered /* { dg-error "'ordered' region without 'depend' clause may not be closely nested inside a loop region with an 'ordered' clause with a parameter" } */ ; } #pragma o...
li.h
void li() { int i,j,k; int diag,row,col; char a,b; int _max,t; #pragma omp parallel for for(i=0; i<=N-1; i++) S[i][i] = 0; #pragma omp parallel for for(i=0; i<=N-2; i++) S[i][i+1] = 0; for(diag=1; diag<=N-1; diag++){ #pragma omp parallel for private(row, col, _max, ...
gravity_avx2.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <assert.h> #include "avx.h" #include "avx2.h" #include "avx_type.h" #include "gravity.h" #define IPARA 2 #define JPARA 4 #define SEC 2.0 #define THD 3.0 #define JMEMSIZE 262144 #define ALIGN32 __attribute__ ((aligned(32))) #define ALIGN128 __attribute...
GB_binop__first_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
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 ...
heat.c
/*********************************************************************************/ /* */ /* Animation of heat equation in a planar domain */ /* ...
blackscholes.c
#include "BullMoose_4.h" // Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, // Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <strin...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <rabit/rabit.h> #include <cstring> #include <memory> #include <numeric> #include <al...
bbn.c
#include "include.h" //#define DEBUG /*----------------------------------------------------*/ int linearize(double T, double reacparam[][10], double f[], double r[], int loop, int inc, int ip, double dt, double Y0[], double Y[], double dY_dt[], double H, double rhob) /* solves for new abundances using gauss...
common.c
#include "common.h" void printb(const uint64_t v) { uint64_t mask = 0x1ULL << (sizeof(v) * CHAR_BIT - 1); int sum = 0; do{ putchar(mask & v ? '1' : '0'); sum++; if(sum%8==0) putchar(','); } while (mask >>= 1); } void create_adjacency(const int nodes, const int lines, const int degree, ...
GB_binop__bset_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
trust_worthiness.h
/* * Copyright (c) 2020-2021, NVIDIA CORPORATION. * * 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...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
trmv_x_dia_u_hi_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA* A, const ALPHA_Number* x, ...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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 // //===---------------------------...
p_grad_c.h
#ifndef P_GRAD_C_H #define P_GRAD_C_H void p_grad_c(Storage3D& uout, Storage3D& vout, const Storage3D& uin, const Storage3D& vin, const Storage3D& rdxc, const Storage3D& rdyc, const Storage3D& delpc, const Storage3D& gz, const Storage3D& pkc, Storage3D& wk, const ElementType dt2) { for (i...
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...
omp_for_reduction.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include <math.h> #include "omp_testsuite.h" #define DOUBLE_DIGITS 20 /* dt^DOUBLE_DIGITS */ #define MAX_FACTOR 10 #define KNOWN_PRODUCT 3628800 /* 10! */ int test_omp_for_reduction () { double dt; int sum; int diff; int product = 1; d...
rt_dpotrf.c
#include "runtime.h" void RT_CORE_dpotrf(Quark *quark, Quark_Task_Flags *task_flags, PLASMA_enum uplo, int n, int nb, double *A, int lda, PLASMA_sequence *sequence, PLASMA_request *request, int iinfo) { plasma_context_t *plasm...
GB_binop__le_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...
test-openmp.c
/**************************************************** * test-openmp.c - * * $Id$ * * Copyright (c) INRIA 2012 * * AUTHOR: * Gregoire Malandain (gregoire.malandain@inria.fr) * * CREATION DATE: * Mon Nov 19 14:26:30 CET 2012 * * ADDITIONS, CHANGES * * * * * */ #include <stdio.h> #include <stdlib.h> ...
precedence_move_generator.h
/*****************************************************************************/ // Copyright (c) 2020-2021 Yuji KOGUMA // Released under the MIT license // https://opensource.org/licenses/mit-license.php /*****************************************************************************/ #ifndef PRINTEMPS_NEIGHBORHOOD_PRECE...
mssql12_fmt_plug.c
/* Modified in August, 2012 by Dhiru Kholia (dhiru at openwall.com) for MS SQL 2012 * * This software is Copyright (c) 2010 bartavelle, <bartavelle at bandecon.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without modi...
esa.c
#include <stdio.h> #include <math.h> void esa_corr(double * source, double * target, size_t nmem, size_t nsrc, double * corr) { // Mean value of target double target_avg = 0.; for (size_t j = 0; j < nmem; ++j) { target_avg += target[j]; } target_avg /= (double) nmem; // Standard devi...
GB_binop__plus_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-...
MD5_std.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2003,2006,2011 by Solar Designer * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUTELY NO WARRANTY, express or implied. * * This implementation of FreeBSD...
MixedSolverSchurMP.h
/** * This file is part of the Eigen Recursive Matrix Extension (ERME). * * Copyright (c) 2019 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include "../Core.h" #include "MixedSolver.h" namespace Eigen::Recursive { /** * Multi threaded implementati...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
alloc_cgroup.c
//===--- test_target_uses_allocators_cgroup.c -----------------------------===// // // OpenMP API Version 5.0 Nov 2018 // // The tests checks the uses_allocators clause with omp_cgroup_mem_alloc. // The variable allaocated in the target is modified and used to compute result on // device. Result is copied back to the...
openmp.c
#include <stdio.h> #include <omp.h> #define SIZE 200000 int main() { int a[SIZE]; int b[SIZE]; int c[SIZE]; int chunk = 1000; for (int i = 0; i < SIZE; i++) { a[i] = i; b[i] = 2 * i; } #pragma omp parallel shared(a, b, c, chunk) { #pragma omp...
template_cross_correlation_cpu.h
/* Copyright 2015 The math21 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 License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
openmp_wrapper.h
#ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_ #ifdef _OPENMP #include <omp.h> #include <exception> #include <stdexcept> #include <mutex> #include <vector> #include <memory> #include "log.h" class ThreadExceptionHelper { public: ThreadExceptionHelper() { ex_ptr_ = nullptr; } ~Threa...
stream_int_omp.c
/*-----------------------------------------------------------------------*/ /* Program: Stream */ /* Revision: $Id: stream_omp.c,v 5.4 2009/02/19 13:57:12 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Progr...
struct_overlap_innerprod.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...
omp_task_private.c
<ompts:test> <ompts:testdescription>Test which checks the private clause of the task directive. We create a set of tasks in a single region. We defines a variable named sum which gets declared private for each task. Now each task calcualtes a sum using this private variable. Before each calcualation step we introduce a...
pack_kernel.h
/* Copyright (c) 2019 PaddlePaddle 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 License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
GB_binop__isgt_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-...
parser.c
/* C++ Parser. Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Written by Mark Mitchell <mark@codesourcery.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 Licen...
GB_binop__bget_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-...
VectorOperations.h
#pragma once #include <TNL/Devices/Host.h> #include <TNL/Devices/Cuda.h> #include <TNL/Algorithms/ParallelFor.h> namespace TNL { namespace Benchmarks { template< typename Device > struct VectorOperations; template<> struct VectorOperations< Devices::Host > { static constexpr int OpenMPVectorOperationsThreshold =...
GB_unop__identity_uint32_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...
GB_unop__identity_uint32_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...
9e6bc14_so8.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include <stdio.h> #include "omp.h" #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; in...
convolutiondepthwise_3x3_pack4.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 ...
RandomGenerator.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: Ken Esler...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
convolution_3x3_pack1to8.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 ...
convolution_1x1_pack1to4.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 ...
GB_binop__cmplx_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-...
gVbHmm_Common.c
/* * gVbHmm_Common.c * Common VB-HMM engine for global analysis. * Reference: * Christopher M. Bishop, "Pattern Recognition and Machine Learning", Springer, 2006 * * Created by OKAMOTO Kenji, SAKO Yasushi and RIKEN * Copyright 2011-2015 * Cellular Informatics Laboratory, Advance Science Institute, RIK...
GB_binop__atan2_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unop__ceil_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...
sort_bottom_scan.h
int group_range = omp_get_num_teams(); int group = omp_get_team_num(); int local_range = omp_get_num_threads(); int lid = omp_get_thread_num(); // Use local memory to cache the scanned seeds // Keep a shared histogram of all instances seen by the current block // Keep a private histogram as well int histogram[16]; ...
SE1P_direct.c
#include "mex.h" #include "SE_direct.h" #define IDX prhs[0] #define X prhs[1] // Source locations #define Q prhs[2] // Source strengths #define OPT prhs[3] // Parameters #define PHI plhs[0] // Output #ifndef VERBOSE #define VERBOSE 0 #endif /* common option-unpacking */ void unpack_opt(ewald_opts* opt, const m...
multisort-omp-task-rama-cutoff&depend.c
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "omp.h" #include <sys/time.h> double getusec_() { struct timeval time; gettimeofday(&time, NULL); return ((double)time.tv_sec * (double)1e6 + (double)time.tv_usec); } #define START_COUNT...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
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 ...
convolution_3x3_pack8to1_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 copy ...
tensor_cpu-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 ...
ArgExtremumLayer.h
// Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. // 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,...
sample-1.c
#include<stdio.h> #include<malloc.h> #include<math.h> #include <time.h> #include <stdlib.h> #include <omp.h> #define max(a,b) a>b?a:b void logArr(int *arr,int n); int main() { srand(time(NULL)); // Initialization, should only be called once. int n=16; int *arr=(int*) malloc(n*sizeof(int)); int d=0; int threadCoun...
tree.h
#ifndef MGBDT_TREE_H #define MGBDT_TREE_H #include "mathFunc.h" #include "dataStruct.h" #include <vector> #include <map> #include <iomanip> #include <omp.h> struct SplitInfo { double gain = -1e8; int column = -1; int bin = -1; double threshold = 0.0f; inline void reset() { gain = -1e8, column = -...
residualbased_newton_raphson_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
GB_unop__identity_fp64_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pdlansy.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/pzlansy.c, normal z -> d, Fri Sep 28 17:38:13 2018 * **/ #include "plasma_async.h" #include "plasma_contex...
statistic.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
laplace2d.c
/* * Copyright 2012 NVIDIA Corporation * * 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 ...
mvt.c
/** * mvt.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic....
par_ilu_solve.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) **************************************...
ejemplo_01.c
/* EJERCICIO 1 * Ejemplo 1 * Usando la API(OpenMP) hacer un programa que realice lo siguiente: * - Crear la Matriz A de 50 columnas x 50 filas (50x50), inicializada con valores aleatorios. [✔] */ // Librerias #include <omp.h> #include <stdio.h> #include <stdlib....
DataGen.h
// Copyright (C) 2019-2020 Zilliz. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
GB_binop__minus_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
trmm_x_sky_n_lo_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ...
centr.h
#include <stdio.h> #include <iostream> #include <vector> #include <chrono> #include <random> #include <set> #include <algorithm> #include <assert.h> namespace TSnap { ///////////////////////////////////////////////// // Node centrality measures (See: http://en.wikipedia.org/wiki/Centrality) ...
GB_binop__ge_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
z_solve-brisbane.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB BT code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
paf_rdp_omp.c
/* Copy: scp fw_rdp.cpp zafahmad@stampede2.tacc.utexas.edu:/home1/05072/zafahmad/SC_2019_submission/ Compile: module load papi/5.5.1 icc -DDEBUG -O3 -fopenmp -xhost -AVX512 fw_rdp_omp.cpp -o fw_rdp -I$TACC_PAPI_INC -Wl,-rpath,$TACC_PAPI_LIB -L$TACC_PAPI_LIB -lpapi icc -O3 -fopenmp -xhost -AVX512 fw_rd...
streamingbc_internal_fine.c
#include <omp.h> #include <stdint.h> #include <stdlib.h> #include <stdio.h> #include "streamingbc_aux.h" #define PARENT_ANCHORED 3 #define SIBLING_ANCHORED 4 void addEdgeWithoutMovementBrandesFG(bcForest * forest, struct stinger * sStinger, int64_t currRoot, int64_t startVertex, ...