source
stringlengths
3
92
c
stringlengths
26
2.25M
eltwise.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
GB_unop__identity_int32_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...
syr2k.dstblock3.c
/** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /* syr2k.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #includ...
time_dpotrf.c
/** * * @generated d Tue Jan 7 11:45:24 2014 * **/ #define _TYPE double #define _PREC double #define _LAMCH LAPACKE_dlamch_work #define _NAME "PLASMA_dpotrf" /* See Lawn 41 page 120 */ #define _FMULS FMULS_POTRF( N ) #define _FADDS FADDS_POTRF( N ) #include "./timing.c" static int RunTest(int *iparam, double...
dcrtpoly.h
/** * @file dcrtpoly.h Represents integer lattice elements with double-CRT * @author TPOC: contact@palisade-crypto.org * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are perm...
ProcessHelpers.h
// // Cubism3D // Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland. // Distributed under the terms of the MIT license. // // Created by Guido Novati (novatig@ethz.ch) and Christian Conti. // #ifndef CubismUP_3D_ProcessOperators_h #define CubismUP_3D_ProcessOperators_h #include "../SimulationData.h" #include "....
omp_in_parallel.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" /* * Checks that false is returned when called from serial region * and true is returned when called within parallel region. */ int test_omp_in_parallel() { int serial; int isparallel; serial = 1; isparallel = 0; serial = omp_i...
4symbol_new.h
//// //// Created by nikita on 26.09.2020. //// // //#ifndef CPU_4SYMBOL_NEW_H //#define CPU_4SYMBOL_NEW_H // //#include <vector> //#include <cmath> // //#define UNROLL_LARGE_CONSTANT 128 // //template<class Input> //inline void process_cubes_antidiag(int lower_bound, int upper_bound, int left_edge, int top_edge, // ...
pi2.c
/* * This 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 <omp.h> static long num_steps = 100000; /* number of intervals */ double step; /* the size of the interval - dx */ #def...
traverse.h
#ifndef traverse_lazy_h #define traverse_lazy_h #include "exafmm.h" #if USE_XITAO #include "hilbert.h" #include "xitao.h" #endif namespace exafmm { #ifdef USE_XITAO //#define RANDOM_STA double hilbert_sta(real_t X[2]) { const int locs = 8; constexpr float dx = 2 * M_PI / (1 << locs); int x = floor((X[0...
GB_unop__identity_uint32_fp32.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...
par_nongalerkin.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322. * This file is part of AMG. See files READ...
residualbased_simple_steady_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Michael Andre, https://github....
pocketfft_hdronly.h
/* This file is part of pocketfft. Copyright (C) 2010-2019 Max-Planck-Society Author: Martin Reinecke All rights reserved. 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 a...
for_simple.c
/* PMSIS includes */ #include "pmsis.h" #include "omp.h" #define NB_CORES (8) static int32_t core_iterations[NB_CORES] = { 0 }; static uint32_t errors = 0; /* Cluster main entry, executed by core 0. */ void cluster_delegate(void *arg) { printf("Cluster master core entry\n"); #pragma omp parallel num_threads...
axpy_ompacc3.c
// Experimental test input for Accelerator directives // simplest scalar*vector operations // Testing extensions for multiple devices // Liao 2/2/2015 #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <omp.h> #if 0 double time_stamp() { struct timeval t; double time; gettimeofd...
GB_bitmap_assign_M_row_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_M_row_template: traverse M for GB_ROW_ASSIGN //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lic...
GB_unop__identity_uint8_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...
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...
LAGraph_Sort1.c
//------------------------------------------------------------------------------ // LAGraph_Sort1: sort a list of integers //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Identifier: BSD-2-Clause // ...
GB_unop__atan_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
otbSampleAugmentation.h
/* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
backprop.c
/* libdeep - a library for deep learning Copyright (C) 2013-2017 Bob Mottram <bob@freedombone.net> 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 ...
semi_interp.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...
comparisonlib.h
#include "omp.h" #include <cstdio> #include <iostream> #include <numeric> #include <random> #include <CL/sycl.hpp> using namespace sycl; #include <chrono> #ifdef NOGPU static queue Q(cpu_selector{}); #else static queue Q(gpu_selector{}); #endif void flux( const double * __restrict__ Q, // Q[5+0], int ...
1.race8.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp parallel for schedule(static, 4) for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i - 1][j - 1]; } // CHECK: Data Race detected // END
ahuja_orlin_segment.h
// // Created by Jan Groschaft on 31.3.19. // /* * Parallel implementation of Ahuja-Orlin's algorithm, divides the network into multiple segments. */ #ifndef MAXFLOW_AHUJA_ORLIN_SEGMENT_H #define MAXFLOW_AHUJA_ORLIN_SEGMENT_H #include "../../common_types.h" #include "../../data_structures/linked_list.h" #include ...
7.norace1.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 20 #define N 20 #define O 20 int main() { double A[M][N], B[M][O], C[O][N]; #pragma omp parallel for for (int i = 0; i < N; i++) for (int j = 0; j < M; j++) { A[i][j] = 0.0; for (int k = 0; k < O; ++k) A[...
LAGraph_bfs_pushpull.c
//------------------------------------------------------------------------------ // LAGraph_bfs_pushpull: push-pull breadth-first search //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. ...
kdtree_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 * * Redistrib...
GB_AxB_dot3.c
//------------------------------------------------------------------------------ // GB_AxB_dot3: compute C<M> = A'*B in parallel //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com S...
mm_p_parallel_for.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> int main(int argc, char* argv[]) { printf("entered main function!"); int size = 1024; int (*matrix_A)[size] = malloc(sizeof(int[size][size])); int (*matrix_B)[size] = malloc(sizeof(int[size][size])); int (*result)[size] = ma...
symgs.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
a2a_sources.h
#ifndef _A2A_SOURCES_H #define _A2A_SOURCES_H CPS_START_NAMESPACE //Spatial source structure in *momentum-space*. Should assign the same value to both flavors if G-parity //3D complex field. Defined for a *single flavor* if GPBC template<typename mf_Complex,typename DimensionPolicy = SpatialPolicy, typename FieldAll...
GB_binop__iseq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB018-plusplus-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_binop__first_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
Ligo_abc_gsl.c
// mimetic_bayes program // Alessandro Casalino, University of Trento // For licence informations, see the Github repository license // // Compile with: gcc-8 -O2 -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF Ligo_abc_gsl.c -o Ligo_abc_gsl.o -lgsl -lgslcblas -fopenmp // Run with: ./Ligo_abc_gsl.o // Test running time: time ./Lig...
read_matrix.h
//------------------------------------------------------------------------------ // GraphBLAS/Demo/Include/demos.h: include file for all demo programs //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved. // http...
GB_binop__lor_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__land_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
DRB046-doall2-orig-no.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...
oskar_auto_correlate_scalar_omp.c
/* * Copyright (c) 2015-2018, The University of Oxford * 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 ...
GB_unop__log10_fp64_fp64.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...
cancel_worksharing.c
// RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s // REQUIRES: ompt // Current GOMP interface implementation does not support cancellation; icc 16 does not distinguish between sections and loops // XFAIL: icc-16 #include "callback.h" #include <unistd.h> int main() { int...
pngquant.c
/* pngquant.c - quantize the colors in an alphamap down to a specified number ** ** © 2009-2019 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997-2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ char *PNGQUANT_USAGE = "\ usage: pngquant [options] [ncol...
GB_binop__land_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-...
kCDensestSamplingMaxFlow.c
/* Info: This program corresponds to the competitor "MaxFlow-Sampling" in the PVLDB 2020 paper. Feel free to use these lines as you wish. This program randomly selects a small fraction of k-cliques to store in main memory, and uses a series of max-flow computations to find the densest subgraph in the sampl...
sph.h
#ifndef SPH_H #define SPH_H #include <omp.h> #include <vector> #include <cstdlib> #include <cmath> #include <ctime> #include <glm/vec3.hpp> #include <glm/mat3x3.hpp> #include <glm/geometric.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/scalar_multiplication.hpp> #include "sphparticle.h" #include "sphm...
bloom.c
/******************************************************************************* *** *** Author: Tyler Barrus *** email: barrust@gmail.com *** *** Version: 1.9.0 *** *** License: MIT 2015 *** *******************************************************************************/ #include <stdlib.h> #include ...
uniform_grid_environment.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
GB_unaryop__identity_int32_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
DRB115-forsimd-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...
6_for-par1.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> void inicializa(int **v, int size) { (*v) = (int *) malloc(sizeof(int)*size); for (int i = 0; i < size; i++) { (*v)[i] = rand() % 10000; } } float square(int x){ int k = 0; while(k < 5000) k++; return sqrt(x);...
GB_ijproperties.c
//------------------------------------------------------------------------------ // GB_ijproperties: check I and determine its properties //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Iden...
linear_math.c
#include "linear_math.h" #include <stdio.h> /* for fprintf */ #include <string.h> /* for memset and memcpy */ #include <math.h> #ifdef NDEBUG #define HANDLE_ERROR #else #define HANDLE_ERROR /* if it's debugging, abort the program */ #endif #ifdef LB_USE_ROW_MAJOR_MATRIX #define MATRIX_INDEX(mat, i, j) i * mat.nCol +...
GB_binop__eq_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-...
solver.h
#include "mesh.h" #include "arap.h" #include "elastic.h" #include <LBFGS.h> using namespace LBFGSpp; using json = nlohmann::json; using namespace Eigen; using namespace std; class Rosenbrock { private: int n; Mesh* mesh; Arap* arap; Elastic* elas; double alpha_arap = 1; double alpha_neo = 1; ...
lca_comms.h
/* //@HEADER // ***************************************************************************** // // XtraPuLP: Xtreme-Scale Graph Partitioning using Label Propagation // Copyright (2016) Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government r...
lockarray.c
/* test fine grained locks instead of critical section by Chunhua Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #define LOCKNUM 100 #endif #define SIZE 5000 int main(void) { int a[SIZE]; int i,j,sum,lock_index; #ifdef _OPENMP omp_lock_t lck[LOCKNUM]; for (i=0;i<LOCKNUM;i++) omp_init_lock(&(l...
ompfor7.c
/* * test #define * Liao 12/1/2010 */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #define P 4 void foo(int iend, int ist) { int i=0; i= i+P; #pragma omp parallel { #pragma omp single printf ("Using %d threads.\n",omp_get_num_threads()); #pragma omp for nowait schedule(static,P) for (i=i...
depthwise_conv2d.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
scalability.c
/** * \file * \brief libbomp test. */ /* * Copyright (c) 2007, 2008, 2009, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich...
7.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #define N 1000000 #define MAX_ITER 25 /* Ускорить выполнение цикла for в программе, вычисляющей покоординатную функцию от элементов массива a: a[i]=F(a[i]); */ float func(float element){ return element * element * element - element * 0.15; ...
support_func.h
#include <random> #include <iostream> #include <fstream> #include <cstdio> #include <cstdlib> #include <cstring> #include <unordered_map> #include <unordered_set> #include <map> #include <cmath> #include <ctime> #include <queue> #include <vector> #include <omp.h> #include <cassert> #include <limits> #include <sys/time...
primordial.c
/** @file primordial.c Documented primordial module. * * Julien Lesgourgues, 24.08.2010 * * This module computes the primordial spectra. It can be used in different modes: * simple parametric form, evolving inflaton perturbations, etc. So far only * the mode corresponding to a simple analytic form in terms of amp...
matrixmultiply-ompacc.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #define N 1024 #define M 1024 #define K 1024 #define REAL float int i,j,k; REAL a[N][M],b[M][K],c[N][K], c2[N][K]; int init(); int mmm(); int mmm2(); int verify(); int main(void) { init(); mmm(); ...
pvector.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef PVECTOR_H_ #define PVECTOR_H_ #include <algorithm> /* GAP Benchmark Suite Class: pvector Author: Scott Beamer Vector class with ability to not initialize or do initialize in parallel - std:...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
MatrixProductOpenMP.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <omp.h> #include <time.h> const int MAX = 10; void run(int m, int size, char *name) { // Define my value int B[m][m], C[m * m]; int **A = (int**) malloc(sizeof(int*) * m); int *A_data = (int*) malloc(sizeof(int) * m * m); // Ensure matrix is con...
round_ref.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...
omp_parallel_reduction.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel reduction directive with all its options.</ompts:testdescription> <ompts:ompversion>3.0</ompts:ompversion> <ompts:directive>omp parallel reduction</ompts:directive> <ompts:testcode> #include <stdio.h> #include <math.h> #include "omp_testsuite.h" i...
pregpu.h
#ifndef pregpu_h #define pregpu_h #include <omp.h> static size_t keysDevcSize = 0; // Size of offsets for rangeHost static size_t rangeDevcSize = 0; // Size of offsets for sourceHost static size_t sourceDevcSize = 0; // Size o...
mttkrp_omp.c
/* This file is part of ParTI!. ParTI! 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 Software Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
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 ...
fast_statistics.h
#pragma once #ifndef FASTSTATISTIC_H #define FASTSTATISTIC_H #include <stdint.h> #include <random> #include <chrono> #define MERGE(x, y) ((x & 0xFFFFFFF0) | (y)) /* This code was adapted by Zur Shmaria in order to use parameterized seed (Needed for multithreading) */ namespace SplitMix64 { /* Modified by D. Lemire...
slow_flow_calculator_cython.c
/* Generated by Cython 0.25.2 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-fopenmp" ], "extra_link_args": [ "-fopenmp" ] }, "module_name": "triplet_flow_loss.slow_flow_calculator_cython" } END: Cyth...
blurtwo.c
#include <stdlib.h> #include "blurtwo.h" void blurtwo(float* v,int M,int N,float*output){ float* tmp2 = (float*) calloc(1,((N + 1 + 1 + 0)) * (M) * sizeof (float)); for (int H7 = 0; H7 < (N + 1 + 1 + 0); H7++) { for (int H8 = 0; H8 < M; H8++) { if (0 <= H7 - (1) && H7 - (1) < N) { float tmp3 = 0; float ...
truedepscalar-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...
parallel_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Denis Demidov...
omp_for_schedule_static.c
<ompts:test> <ompts:testdescription>Test which checks the static option of the omp for schedule directive.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp for schedule(static)</ompts:directive> <ompts:dependences>omp for nowait,omp flush,omp critical,omp single</ompts:dependences> ...
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 <xgboost/base.h> #include <xgboost/span.h> #include <xgboos...
munit.c
/* Copyright (c) 2013-2018 Evan Nemerson <evan@nemerson.com> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy...
test_utils.h
#pragma once #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <string> #include <sstream> #include <iostream> #include <iomanip> #include <algorithm> #include <limits> #include <utility> #include <cstdint> extern "C" { #include "mmio.h" } #include <cuda.h> #include <cuda_runtime.h> #include <cuda_...
blurpart.c
#include <stdlib.h> #include "blurpart.h" void blurpart(float* v,int m,int n,float*output){ #pragma omp parallel for for (int H32 = 0; H32 < 1; H32++) { for (int H33 = 0; H33 < m; H33++) { float tmp2 = 0; float tmp3 = 0; if (0 <= H32 - (1)) { float tmp4 = 0; float tmp5 = 0; if (0 <= H33 - (1)) ...
par_cheby.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) **************************************...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
exp3_omp_v0.c
#include <stdio.h> #include <omp.h> int main() { int ii; #pragma omp parallel { for(ii=0;ii<10;ii++) { printf("Iteration: %d\n",ii); } } printf("\n"); return 0; }
JointWMF.h
/***************************************************************/ /* * Distribution code Version 1.1 -- 09/21/2014 by Qi Zhang Copyright 2014, The Chinese University of Hong Kong. * * The Code is created based on the method described in the following paper * [1] "100+ Times Faster Weighted Median Filter", Qi Zh...
mp_omp.c
#include <stdio.h> #include <omp.h> #include "mpi.h" int main(int argc, char *argv[]) { int numprocs, rank, namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; int iam = 0, np = 1; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor...
app.c
/** * Christina Giannoula * cgiannoula: christina.giann@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <dpu.h> #include <dpu_log.h> #include <unistd.h> #include <getopt.h> #include <assert.h> #include <math.h> #include <omp.h> #include "../support/common.h" #i...
merge_tasks_unnested.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> /* OpenMP Parallel Mergesort - STasking * * @author: ANDREW VAILLANCOURT * 2019 */ void merge(int a[], int size, int temp[]); void insertion_sort(int a[], int size); void mergesort_serial(int a[], int size, int temp[], int thresh); ...
convolution_3x3_pack8_int8.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 ...
fc_kernel_arm.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...
DRB026-targetparallelfor-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...
test.c
#include <omp.h> #include <stdio.h> int main() { int Success = 0; #pragma omp target map(from:Success) { Success = 1; } if (Success) printf("### Success ### \n"); else printf("### Error ###\n"); return 0; }
GB_unaryop__abs_fp64_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...
copy.c
#include "copy.h" void copy_ref(size_t n, const double * RESTRICT a, double * RESTRICT b) { OMP_PARALLEL_FOR for (size_t i=0; i<n; i++) { b[i] = a[i]; } } void copy_mov(size_t n, const double * RESTRICT a, double * RESTRICT b) { OMP_PARALLEL_FOR for (size_t i=0; i<n; i++) { double t; ...