source
stringlengths
3
92
c
stringlengths
26
2.25M
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
mat_mul.c
#include "mat_mul.h" #include <mpi.h> #include "util.h" #include <omp.h> static float* myA; static float* myB; static float* myC; static int mpi_rank, mpi_size; void mat_mul_init(int M, int N, int K) { MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); alloc_mat(&myA, M, K); a...
ext.c
#include <openssl/sha.h> #include <openssl/md5.h> #include "ruby.h" #include <stdint.h> #include <assert.h> #include <stdlib.h> #include <mm_malloc.h> struct search_condition { unsigned char (*hash)(const unsigned char *d, size_t n, unsigned char *md); size_t md_len; unsigned char * restrict mask; unsigned cha...
mypdec.c
/** * @ingroup PMGC * @author Tucker Beck [fortran ->c translation], Michael Holst [original] * @brief * @version $Id: * * @attention * @verbatim * * APBS -- Adaptive Poisson-Boltzmann Solver * * Nathan A. Baker (nathan.baker@pnl.gov) * Pacific Northwest National Laboratory * * Additional contribut...
sections1-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...
Homography.h
#pragma once #include "saiga/vision/VisionTypes.h" #include "saiga/vision/util/Ransac.h" // This code here is inspired (and partially copied) from Colmap. // https://github.com/colmap/colmap namespace Saiga { /** * Calculates a 3x3 homography matrix H so that * targetPoints[i] = H * sourcePoints[i] * This mapping i...
sageInterface_modified.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determineFileType ( std::vector<...
GB_unop__identity_fp64_int64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
pruned_landmark_labeling.h
#ifndef PRUNED_LANDMARK_LABELING_H_ #define PRUNED_LANDMARK_LABELING_H_ #include <string.h> #include <malloc.h> #include <stdint.h> #include <xmmintrin.h> #include <sys/time.h> #include <climits> #include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <set...
pr32362-2.c
/* PR middle-end/32362 */ /* { dg-do run } */ /* { dg-options "-O2" } */ #include <omp.h> #include <stdlib.h> int a = 2, b = 4; int main () { int n[4] = { -1, -1, -1, -1 }; omp_set_num_threads (4); omp_set_dynamic (0); omp_set_nested (1); #pragma omp parallel private(b) { b = omp_get_thread_num (); #pr...
ParticleSimulationCpu.h
#pragma once #include "ParticleSimulationBase.h" class ParticleSimulationCpu: public ParticleSimulationBase { public: static constexpr float G = 6.67E-5; static constexpr float e0 = 8.97E3; static constexpr float k0 = 1.0 / (4.0 * M_PI * e0 ); static constexpr float fric = 0.999; static constex...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
GB_unop__identity_uint8_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...
GB_unaryop__ainv_uint32_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...
declare_variant_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - | FileCheck %s // expected-no-diagnostics int foo(void); #pragma omp declare variant(foo) match(xxx={}, yyy={ccc}) #pragma omp declare variant(foo) match(xxx=...
GB_subassign_17.c
//------------------------------------------------------------------------------ // GB_subassign_17: C(I,J)<!M,repl> = scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identi...
critical.c
#include <stdio.h> #include <omp.h> int main(int argc, char *argv[]){ int x; x = 0; #pragma omp parallel shared(x) { #pragma omp critical x = x + 1; }; printf("x = %d\n", x); return 0; };
buildReference.c
#include "cactus.h" #include "sonLib.h" #include "stCheckEdges.h" #include "stPerfectMatching.h" #include "stCheckEdges.h" #include "stMatchingAlgorithms.h" #include "stReferenceProblem2.h" #include <math.h> // OpenMP #if defined(_OPENMP) #include <omp.h> #endif const char *REFERENCE_BUILDING_EXCEPTION = "REFERENCE_B...
GB_unop__abs_fp32_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...
pt.c
/* Handle parameterized types (templates) for GNU -*- C++ -*-. Copyright (C) 1992-2015 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing. Rewritten by Jason Merrill (jason@cygnus.com). This file is part of GCC. GCC is free software; you can redistribute ...
pcptdesctrcaomp.c
/******************************************************************************* * Copyright 2002-2018 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") co...
ejercicio_02.c
/* EJERCICIO 2 * 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. [✔] * - Realizar la Transpuesta de la Matriz A. ...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
GB_reduce_to_scalar_template.c
//------------------------------------------------------------------------------ // GB_reduce_to_scalar_template: s=reduce(A), reduce a matrix to a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // ...
euler.h
#ifndef __euler__ #define __euler__ #include <omp.h> #include <tbb/parallel_scan.h> #include <tbb/blocked_range.h> #include "morton.h" void eulerTour(midlvl_t const* const mids, const size_t l, size_t *const inIdxs, size_t *const outIdxs); template<typename T> class PrefixSum { T sum; T* const y; const T*...
kernel_2mm.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)) void kernel_2mm(int ni, int nj, int nk, int nl, double alpha, double beta, double t...
SparseLinear.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SparseLinear.c" #else #ifdef _OPENMP #include <omp.h> #endif #define ROW_PTR2(t, r) (THTensor_(data)(t) + (r) * (t)->stride(0)) #define COL_PTR2(t, c) (THTensor_(data)(t) + (c) * (t)->stride(1)) static bool THNN_(checkLegacyInput)(THTensor* t) { return !t->i...
GB_binop__minus_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-...
vecsort.c
#include <stdlib.h> #include <unistd.h> #include <getopt.h> #include <stdio.h> #include <ctype.h> #include <omp.h> #include <string.h> #include <sys/time.h> int TASK_THREADS = 6; int DATA_THREADS = 2; /* Ordering of the vector */ typedef enum Ordering { ASCENDING, DESCENDING, RANDOM } Order; /** * Prints the g...
match_traildb.c
#define _XOPEN_SOURCE 700 #include <stdio.h> #include <json-c/json.h> #include <stdbool.h> #include <string.h> #include <Judy.h> #include "judy_str_map.h" #include <sys/stat.h> #include <unistd.h> #include <sys/mman.h> #include <fcntl.h> #include <getopt.h> #include <time.h> #include <sys/time.h> #ifdef _OPENMP #inclu...
GB_binop__ne_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-...
zherk.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "zherk.fatbin.c" static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; } static inline CUresult cuMemcpyHtoD2DAsync(CUdevic...
GB_unop__identity_int32_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...
kernel_cpu.c
#ifdef __cplusplus extern "C" { #endif #ifdef GEM5_WORK #include <stdint.h> void m5_dumpreset_stats(uint64_t ns_delay, uint64_t ns_period); void m5_work_begin(uint64_t workid, uint64_t threadid); void m5_work_end(uint64_t workid, uint64_t threadid); #endif //===========================================================...
convolution_sgemm_pack4to1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 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 ...
house.h
// This code is modified from AutoMine and GraphZero // Daniel Mawhirter and Bo Wu. SOSP 2019. // AutoMine: Harmonizing High-Level Abstraction and High Performance for Graph Mining #pragma omp parallel for schedule(dynamic,1) reduction(+:counter) for(vidType v0 = 0; v0 < g.V(); v0++) { auto y0 = g.N(v0); for (auto ...
familytree_par.c
#include "familytree.h" void traverse_tree(tree *node) { if(node != NULL) { node->IQ = compute_IQ(node->data); genius[node->id] = node->IQ; #pragma omp task { traverse_tree(node->right); } #pragma omp task { traverse_tree(node->left); } } } void traverse(tree *node, int numThreads) { // ...
Vec.h
#ifndef VEC_H #define VEC_H /* Szymon Rusinkiewicz Princeton University Vec.h Class for a constant-length vector Supports the following operations: vec v1; // Initialized to (0,0,0) vec v2(1,2,3); // Initialized to (1,2,3) vec v3(v2); // Copy constructor float farray[3]; vec v4 = vec(farray); // Explicit: "v...
streaming_rrr_generator.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
GB_unaryop__minv_int16_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
primitives.h
#pragma once #include <vector> #include <cstdint> #include <omp.h> #ifndef CACHE_LINE_ENTRY #define CACHE_LINE_ENTRY (16) #endif using namespace std; /* * Both Primitives Are Inclusive * histogram is for cache-aware thread-local histogram purpose * output should be different from the variables captured in functi...
utils.c
/* This work is part of the Core Imaging Library developed by Visual Analytics and Imaging System Group of the Science Technology Facilities Council, STFC Copyright 2017 Daniil Kazanteev Copyright 2017 Srikanth Nagella, Edoardo Pasca Licensed under the Apache License, Version 2.0 (the "License"); you may not use this...
target-9.c
/* { dg-do run } */ /* { dg-options "-O1 -ftree-parallelize-loops=0" } */ /* { dg-additional-options "-flto" { target lto } } */ #include <stdlib.h> #define N 123456 #pragma omp declare target int X, Y; #pragma omp end declare target void foo () { #pragma omp target map(alloc: X) X = N; } int main () { int...
vvadd_I4_I4_I4.c
#include "vvadd_I4_I4_I4.h" static void __operation( int32_t a, int32_t b, int32_t *ptr_c ) { int32_t c; c = a + b; *ptr_c = c; } int vvadd_I4_I4_I4( const int32_t * restrict in1, const int32_t * restrict in2, uint64_t nR, int32_...
bare_concurrent_set.h
#pragma once #include <functional> #include "bare_concurrent_container.h" #include "bare_set.h" namespace hpmr { template <class K, class H = std::hash<K>> class BareConcurrentSet : public BareConcurrentContainer<K, void, BareSet<K, H>, H> { public: void set(const K& key, const size_t hash_value); void async_se...
SynchronizerMPI.h
/* * SynchronizerMPI.h * Cubism * * Created by Diego Rossinelli on 10/17/11. * Copyright 2011 ETH Zurich. All rights reserved. * */ #pragma once #include <map> #include <vector> #include <cmath> #include <algorithm> #include <mpi.h> #include <omp.h> #include "BlockInfo.h" #include "StencilInfo.h" #include...
mlp_example_f32_numa.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
GB_unaryop__lnot_uint8_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
target_enter_data.c
#pragma omp target enter data [clauses]
api2.c
// RUN: %libomp-compile-and-run // RUN: %libomp-run | %python %S/check.py -c 'CHECK' %s // REQUIRES: !abt #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #define XSTR(x) #x #define STR(x) XSTR(x) #define streqls(s1, s2) (!strcmp(s1, s2)) #define check(condition) ...
GB_binop__band_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
timestep.c
#include <stdio.h> #include <string.h> #include <stdint.h> #include <omp.h> #include <math.h> #include <ktime.h> #include <geometry.h> #ifdef __USE_HW_COUNTER #include <perf.h> #include <kperf.h> #endif #include <phy.h> /* Calculate a time step for each cell Note that this routine assumes conservative variables ...
kpoint.c
/* Copyright (C) 2008 Atsushi Togo */ /* All rights reserved. */ /* This file is part of spglib. */ /* 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 abov...
function-call-1.c
#define size 8 #pragma omp declare target int identity (int x) { return x; } int expx (int x, int n) { for (int i = 0; i < n - 1; i++) x *= x; return x; } float init (int x, int y) { int x1 = identity (identity (identity (identity (x)))); int y1 = identity (identity (identity (identity (y)))); int ...
radmin_fmt_plug.c
/* RAdmin v2.x cracker patch for JtR. Hacked together during * May of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source ...
computeG_mex.c
#include "mex.h" #include "math.h" #include "omp.h" void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Inputs double *P, *AM, *sep, *nElemInCls; long long M, N; long long nClust, maxElem; double memoryLimitGB; //long long maxElemInCls; // Outputs double *GSi, *GSj, *GSv; // I...
_csom.c
/* Generated by Cython 0.22.1 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 0 #else #include "pyconfig.h" #ifdef PYLONG_BITS_IN_DIGIT #define CYTHON_USE_PYLONG_INTERNALS 1 #else #define CYTHON_USE_PYLONG_INTERNALS 0 #endif #endif #endif ...
visual-effects.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__times_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...
DRB034-truedeplinear-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...
reqramp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *reqramp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *reqramp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyArray...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // The LLVM37 Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-----------------------------------------------------...
diagsv_x_coo_n.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Number *x, ALPHA_Number *y) { ALPHA_Number diag[A->rows]; memset(diag...
cho_omp.c
#include "matrix.h" #include <omp.h> double ** cholOMP(double ** L, int n) { // Warning: acts directly on given matrix! int i, j, k; omp_lock_t writelock; omp_init_lock(&writelock); for (j = 0; j < n; j++) { for...
collapse.c
#include <stdio.h> #include <omp.h> enum { M = 2, N = 5 }; float m[M * N]; void fun1() { // 1D by horizontal strips #pragma omp parallel { #pragma omp for for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { m[i * N + j] = i * j; } ...
VolumetricAdaptiveAveragePooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/VolumetricAdaptiveAveragePooling.c" #else #define START_IND(a,b,c) (int)floor((float)(a * c) / b) #define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b) // #define START_IND(a,b,c) a * c / b // #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b ...
GB_unaryop__lnot_fp32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
stream2.c
/*-----------------------------------------------------------------------*/ /* Program: STREAM */ /* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Programm...
FTMTree_MT.h
/// \ingroup base /// \class ttk::FTMTree_MT /// \author Charles Gueunet <charles.gueunet@lip6.fr> /// \date June 2016. /// ///\brief TTK processing package that efficiently computes the /// sublevel set tree of scalar data and more /// (data segmentation /// persistence diagrams, persistence curves, etc.). /// ///\par...
update_ops_matrix_diagonal_single.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _USE_SIMD #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif #endif //void single_qubit_diagonal_matrix_...
middle5r.c
/* * Date: 11 December 2015 * Contact: Thomas Peyrin - thomas.peyrin@gmail.com */ /* * Simmulation of boomerang analysis for Skinny * Date: March 21, 2020 * Author: Hosein Hadipour * Contact: hsn.hadipour@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #i...
silly_sort.c
#include <stdio.h> #include <stdlib.h> /* SPEED UP: 1,958829102 SEQUENTIAL PERF STATS: Performance counter stats for './silly_sort.exe': 2161,394750 task-clock (msec) # 0,993 CPUs utilized 134 context-switches # 0,062 K/sec ...
GB_unaryop__ainv_int32_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...
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...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "functions.h" #include "omp.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p;...
declare_mapper_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp-simd -emit-pch...
gemm.c
#include "gemm.h" #include "utils.h" #include "im2col.h" #include "dark_cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <float.h> #include <string.h> #include <stdint.h> #ifdef _WIN32 #include <intrin.h> #endif #if defined(_OPENMP) #include <omp.h> #endif #define TILE_M 4 // 4 ops #define TIL...
csr_spmv.h
/* * Copyright 2008-2013 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...
sumaOMP.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int suma(int a,int b); int main(int argc, char *argv[]){ int numeroDeHilos=strtol(argv[1],NULL,10); int resultado=0; int a=10, b=20; #pragma omp parallel num_threads(numeroDeHilos) { int mi_resultado=0; mi_resultado=suma(a,b); #pragma omp critical ...
broadcast_reduce-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
StochasticLutN.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuch...
laplace_mp.twoTargetsBasic.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> // grid size #define GRIDY 2048 #define GRIDX 2048 #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) // smallest permitted change in temperature #define MAX_TEMP_ERROR 0.02 double T_new[GRIDX+2][GRIDY+2]; // temperature grid double T[GRIDX+...
GB_unop__identity_int8_uint8.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...
GB_unop__floor_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...
GB_binop__isle_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__bshift_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...
rnn_helpers.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include <algorithm> #include <functional> #include <future> #include <string> #include <vector> #include "gsl/span" #include "gsl/gsl_algorithm" #include "core/common/common.h" #include "core/common/task_th...
GB.h
//------------------------------------------------------------------------------ // GB.h: definitions visible only inside GraphBLAS //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved. // http://suitesparse.com ...
digest.c
/* * Copyright 2010 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * This library 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 2.1 of the License, or (at your ...
templatemath.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * Copyright (c) 2019 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apa...
Example_tasking.5.c
/* * @@name: tasking.5c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_3.0 */ #define LARGE_NUMBER 10000000 double item[LARGE_NUMBER]; extern void process(double); int main() { #pragma omp parallel { #pragma omp single { int i; for (i=0; i<LARGE_NUMBER; i++)...
UpSampling.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018-2019 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuchikami@n...
5310.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...
encontra-maior.c
/* Universidade de Sao Paulo - ICMC SSC0903 - Computacao de Alto Desempenho Atividade 1 Grupo: Joao Pedro A. S. Secundino (10692054); Joao Pedro Uchoa Cavalcante (10801169); Luis Eduardo Rozante de Freitas Pereira (10734794); Sergio Ricardo G. B. Filho (10408386); */ #include <stdlib.h> #include <stdio...
kwallet_fmt_plug.c
/* KDE KWallet cracker patch for JtR. Written by Narendra Kangralkar * <narendrakangralkar at gmail.com> and Dhiru Kholia <dhiru at openwall.com>. * * Also see https://github.com/gaganpreet/kwallet-dump ;) * * This software is Copyright (c) 2013 by above authors and it is hereby * released to the general public u...
omp_master.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" int test_omp_master() { int nthreads; int executing_thread; nthreads = 0; executing_thread = -1; #pragma omp parallel { #pragma omp master { #pragma omp critical { nthreads++; } executin...
example-omp.c
// PWR013: Avoid copying unused variables to the GPU // https://www.appentra.com/knowledge/checks/pwr013 void example(double *A, double *B, double *C) { #pragma omp target teams distribute parallel for schedule(auto) \ shared(A, B) map(to: A[0:100], B[0:100]) map(tofrom: C[0:100]) for (int i = 0; i < 100; i+...
main.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <sys/time.h> #include <sys/resource.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <signal.h> #include <hdf5.h> #if defined(_OPENMP) #include <omp.h> #endif #include "allvars.h" #includ...
entrega-malloc-batch.c
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <omp.h> #include "ctimer.h" void add (int A[], int B[], int C[], int N) { int i, carry, sum; carry = 0; for (i=0; i<N; i++) { sum = A[i] + B[i] + carry; if (sum >= 10) { carry = 1; sum -= 10; } else carry = 0; C[i] = sum; } ...