source
stringlengths
3
92
c
stringlengths
26
2.25M
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
irbuilder_for_unsigned_runtime.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics #if...
queue.h
// -*- C++ -*- // Copyright (C) 2007-2018 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3...
asaxpy.c
/** * @file asaxpy.c * @brief Function definition for performing the \c saxpy operation on accelerator. * * This source file contains function definition for the \c saxpy operation, * which is defined as: * * y := a * x + y * * where: * * - a is a scalar. * - x and y are single-precision vectors each with n...
modifier_view.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2015, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
resample.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__tanh_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__bclr_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-...
mput_ispc.c
#include "hmap_struct_isp.h" // #include "hmap_aux.h" // #include "hmap_get.h" // #include "fasthash.h" static inline void * set_key( void **keys, uint32 i, void *alt_keys, uint32 key_len ) { void *key_i; if ( keys != NULL ) { key_i = keys[i]; } else { key_i = (void *)((int8 *)...
rose_pointers.c
// x1 and x2 may alias to each other. If no-aliasing assumed, the loop can be parallelized. #include <omp.h> void foo(double *x,int jp,int begin,int end,double rh1) { double *x1; double *x2; x1 = x; x2 = x1 + jp; #pragma omp parallel for firstprivate (end,rh1) for (int i = begin; i <= end - 1; i += 1) { ...
FEMTree.h
/* Copyright (c) 2006, Michael Kazhdan and Matthew Bolitho 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 above copyright notice, this list of conditions ...
GB_unop__identity_uint32_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://...
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...
GB_unop__identity_fc64_int8.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...
3d7pt.c
/* * Order-1, 3D 7 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) ...
DRB038-truedepseconddimension-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...
target-1.c
extern #ifdef __cplusplus "C" #endif void abort (void); void fn1 (double *x, double *y, int z) { int i; for (i = 0; i < z; i++) { x[i] = i & 31; y[i] = (i & 63) - 30; } } #pragma omp declare target int tgtv = 6; int tgt (void) { #pragma omp atomic update tgtv++; return 0; } #pragma omp...
@mropes.nim.c
/* Generated by Nim Compiler v1.0.10 */ /* (c) 2019 Andreas Rumpf */ /* The generated code is subject to the original license. */ #define NIM_INTBITS 32 #include "nimbase.h" #include <string.h> #include <stdio.h> #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef li...
GB_unaryop__ainv_bool_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...
box3d1r.c
#define BENCH_DIM 3 #define BENCH_FPP 53 #define BENCH_RAD 1 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize][dimsize] = (SB_TYPE (*)[dimsize][...
sageInterface.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 #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
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...
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...
StVenantKirchhoffMaterial.c
/* This file is part of redbKIT. * Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL) * Author: Federico Negri <federico.negri@epfl.ch> */ #include "StVenantKirchhoffMaterial.h" /*************************************************************************/ void StVenantKirchhoffMaterial_forces(...
divsufsort.c
/* * divsufsort.c for libdivsufsort * Copyright (c) 2003-2008 Yuta Mori 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 ...
ssh_fmt_plug.c
/* "SSH private key cracker" patch for JtR. Hacked together during * April of 2011 by Dhiru Kholia <dhiru.kholia at gmail.com> for GSoC. * * This software is Copyright (c) 2011, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution a...
GB_unop__identity_bool_int8.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...
eb24237de8e5a03acb8c2e2c9f0ddd4a6bca7bdb.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double section0; } ; int padfunc(struct dataobj *restri...
convolution_1x1_bf16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
vector_template_func_ext.h
CPS_START_NAMESPACE template < typename AFloat, typename BFloat > inline void compDotProduct (IFloat * c_r, IFloat * c_i, const AFloat * a, const BFloat * b, int len) { *c_r = *c_i = 0.0; Float re=0.,im=0.; #pragma omp parallel for reduction(+:re,im) for(int i = 0; i < len; i += 2) ...
bitmap.h
/*! * Copyright 2014 by Contributors * \file bitmap.h * \brief a simple implement of bitmap * NOTE: bitmap is only threadsafe per word access, remember this when using bitmap * \author Tianqi Chen */ #ifndef XGBOOST_UTILS_BITMAP_H_ #define XGBOOST_UTILS_BITMAP_H_ #include <vector> #include "./utils.h" #include ...
GB_unop__identity_fc32_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...
actionAngleStaeckel.c
/* C code for Binney (2012)'s Staeckel approximation code */ #ifdef _WIN32 #include <Python.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <gsl/gsl_math.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_roots.h> #include <gsl/gsl_min.h> #include <gsl/gsl_integration.h> ...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
sections_construct.c
#include <omp.h> #include <stdio.h> void sum_num(int a,int b) { printf("Adding %d and %d gives %d on thread %d\n",a,b,a+b, omp_get_thread_num()); } void sum_n_num(int n) { int i; int sum=0; for(i=0;i<=n;i++) { sum+=i; } printf("\nSum of first %d numbers is %d from thread %d\n",n,sum,o...
cholesky_escalar.c
/* * Cholesky por bloques. */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include "ctimer.h" #include <cblas.h> #include <omp.h> #define L(i,j) L[j*n+i] #define A(i,j) A[j*n+i] #define C(i,j) C[j*n+i] int cholesky_escalar( int n, double *C ); int cholesky_bloques( int n, int b, double *C ); int m...
GB_binop__second_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unop__lnot_uint64_uint64.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...
pi_omp_lock.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...
graph.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "graph.h" #include "csf.h" #include "sort.h" #include "util.h" #ifdef SPLATT_USE_PATOH #include <patoh.h> #endif #...
GB_unaryop__lnot_bool_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
HaloArray3D.h
/* ParSGCT Code source file. Copyright (c) 2015 Peter Edward Strazdins. All rights reserved. Licensed under the terms of the BSD License as described in the LICENSE_SGCT file. This comment must be retained in any redistributions of this source file. */ // Simple 3D (x,y) array with a halo class. // Storage is contig...
DRB093-doall2-collapse-orig-no.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...
MKL_flops_32_omp.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include <omp.h> #include "gene_bruit_rayleigh_scalaire.c" #ifdef MKL_LIB #include "mkl.h" #include "mkl_dfti.h" #endif int main(int argc, char** argv) { int NFFT,NPOINTS,NTOT; NTOT=67108864; printf("-*/*-*/- Programme ...
Layer_Linear.h
/* * Layers.h * * Created by Guido Novati on 29.10.18. * Copyright 2018 ETH Zurich. All rights reserved. * */ #pragma once #include "Layers.h" template<int nOutputs, int nInputs> struct LinearLayer: public Layer { Params* allocate_params() const override { return new Params(nInputs*nOutputs, nOutputs);...
stats.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "stats.h" #include "sptensor.h" #include "ftensor.h" #include "csf.h" #include "io.h" #include "reorder.h" #include "uti...
GB_unaryop__abs_int16_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
duplex.c
/* * compute the duplex structure of two RNA strands, * allowing only inter-strand base pairs. * see cofold() for computing hybrid structures without * restriction. * * Ivo Hofacker * Vienna RNA package */ #if...
mandelbrot-omp.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> void mandelbrot(double zreal, double zimag){ int i, niter = 500000, threshold = 4; double temp, zabs, x = 0, y = 0; for (i = 0; i < niter; i++){ temp = x; x = (x*x) - (y*y) + zreal; y = (2*temp*y) + zimag; zabs = (x*x) +...
quantile.c
/****************************************************************** * Melissa * *-----------------------------------------------------------------* * COPYRIGHT (C) 2017 by INRIA and EDF. ALL RIGHTS RESERVED. * * ...
GB_binop__band_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...
GB_unop__lnot_uint16_uint16.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...
edges_container.h
#pragma once ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class EdgesContainer { private: int vertices_count; long long edges_count; int *src_ids; int *dst_ids; public: int *get_src_ids() {return src_ids;}; int *get_dst_i...
GB_to_hyper.c
//------------------------------------------------------------------------------ // GB_to_hyper: convert a matrix to hyperspasre //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com S...
GB_binop__lor_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-...
purkinje_matrix_assembly.c
// // Created by bergolho on 04/09/19. // #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <time.h> #include "../alg/grid/grid.h" #include "../config/assembly_matrix_config.h" #include "../monodomain/constants.h" #include "../utils/utils.h" #include "../single_file_libraries/stb_ds.h" #include "....
GB_unaryop__lnot_int32_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
apery.c
/* * Copyright (c) 2017 Leonhard Reichenbach * * This file is released under the MIT license. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <inttypes.h> #include <omp.h> #include <time.h> #include "pcg_basic.h" #define FAILURE(progname, msg...) \ fprintf(stderr,msg); usage(progname); ...
set_horz_pres_BCs.h
#pragma omp target teams distribute parallel for thread_limit(BLOCK_SIZE) for (int col = 1; col < NUM/2+1; col++) { col = (col * 2) - 1; int NUM_2 = NUM >> 1; // p_i,0 = p_i,1 pres_black(col, 0) = pres_red(col, 1); pres_red(col + 1, 0) = pres_black(col + 1, 1); // p_i,jmax+1 = p_i,jmax pres_red(col, NU...
x86_functions_fp32.h
// Copyright (C) 2019. 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,...
pi.c
#include<stdio.h> #include<omp.h> int main(int argc, char *argv[]){ int nThreads = 4; omp_set_num_threads(nThreads); unsigned long long n = 100000000; //scanf("%ld", &n); double sum = 0, step = 1.0/((double)n); /* * FOR * schedule(type, [chunk]) * shared(list) * private(list) * firstprivate(list) ...
mafillvmain.c
/* CalculiX - A 3-dimensional finite element program */ /* Copyright (C) 1998-2015 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* pub...
matrixmultiply-ompacc2.c
/* Naive matrix-matrix multiplication(mmm) multiple GPUs, standard OpenMP 4.0 directives By C. Liao */ #include <stdio.h> #include <assert.h> #include <omp.h> #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 veri...
HDAA_fmt_plug.c
/* HTTP Digest access authentication patch for john * * Written by Romain Raboin. OMP and intrinsics support by magnum * * This software is Copyright (c) 2008 Romain Raboin - romain.raboin at * gmail.com, and Copyright (c) 2012 magnum and it is hereby released to * the general public under the following terms: ...
9802.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...
DenseTensor.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseTensor.h // \brief Header file for the OpenMP-based dense tensor SMP implementation // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // Copyright (C) 2018 Ha...
GB_unop__identity_uint32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
omp.c
// RUN: mlir-clang %s --function=* -fopenmp -S | FileCheck %s void square(double* x, int sstart, int send, int sinc) { #pragma omp parallel for for(int i=sstart; i < send; i+= sinc) { x[i] = i; } } // CHECK: func @square(%arg0: memref<?xf64>, %arg1: i32, %arg2: i32, %arg3: i32) attributes {llvm....
chi_calc.c
//////////////////////////////////////////////////////// // Chi Square Calculation and Trapezoidal Integration // // Matheus J. Castro // // Version 2.3 // // Last Modification: 06/11/2021 (month/day/year) // ///////////////////////////////////...
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)...
t005.c
#include<stdint.h> #include<stdlib.h> #include<stdio.h> #include<omp.h> typedef struct {int64_t nteam; int64_t nthread; int64_t team_n; int64_t thread_n;} tinfo; int main(int argc, char **argv) { const int64_t narr = 1 << 10; tinfo tinit = {-1, -1, -1, -1}; tinfo *t = aligned_alloc(1 << 22, sizeof(tinfo)*narr); fo...
KadabraBetweenness.h
/* * KadabraBetweenness.h * * Created on: 18.07.2018 * Author: Eugenio Angriman, Alexander van der Grinten */ #ifndef KADABRA_H_ #define KADABRA_H_ #include <atomic> #include "../auxiliary/SortedList.h" #include "../base/Algorithm.h" #include "../components/ConnectedComponents.h" #include "../graph/Graph.h" ...
cg_single.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - CG This benchmark is an OpenMP C version of the NPB CG code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
wave1d.c
#ifndef TAPENADE #include <math.h> #endif #define Max(x,y) fmax(x,y) #define Min(x,y) fmin(x,y) #define Heaviside(x) ((x>=0)?1.0:0.0) #define u(x) u[x] #define c(x) c[x] #define u_1(x) u_1[x] #define u_2(x) u_2[x] void wave1d(double* u, double* c, double* u_1, double* u_2, double D, int n) { int i; #pragma om...
convolution_1x1_pack4.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 ...
Example_nesting_restrict.3.c
/* * @@name: nesting_restrict.3c * @@type: C * @@compilable: no * @@linkable: no * @@expect: failure */ void work(int i, int j) {} void wrong3(int n) { #pragma omp parallel default(shared) { int i; #pragma omp for for (i=0; i<n; i++) { /* incorrect nesting of regions */ #pragma omp single ...
idaFoodWeb_bnd_omp.c
/* * ----------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU * Based on idaFoodWeb_bnd.c and parallelized with OpenMP * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2020, Lawr...
visualize_helper.c
#include <ruby.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <math.h> #include <omp.h> void RemoveSpaces(char* source) { char* i = source; char* j = source; while(*j != 0) { *i = *j++; if(*i != ' ') i++; } *i = 0; } int myCompare (const void * a, const void * b ) { ...
1999.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...
FLASH_Queue_exec.c
/* Copyright (C) 2014, The University of Texas at Austin This file is part of libflame and is available under the 3-Clause BSD license, which can be found in the LICENSE file at the top-level directory, or at http://opensource.org/licenses/BSD-3-Clause */ #include "FLAME.h" #if FLA_MULTITHREADIN...
Reconstruction3D.h
/* * 3DReconstruction.h * * Created on: Oct 25, 2015 * Author: nicolasrosa */ #ifndef RECONSTRUCTION_3D_H #define RECONSTRUCTION_3D_H /* Libraries */ #include "opencv2/opencv.hpp" //TODO: Arrumar Bibliotecas //#include <pcl/common/common_headers.h> //#include <pcl/io/pcd_io.h> //#include <pcl/visualizatio...
hierarchical_sne_inl.h
/* * * Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology) * 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 ...
yescrypt-simd.c
/*- * Copyright 2009 Colin Percival * Copyright 2012-2014 Alexander Peslyak * 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 copy...
darts-wrong.c
#include <stdio.h> #include <omp.h> #include "lcgenerator.h" #include <mpi.h> // This code gets the wrong answer. static long num_trials = 1000000; int main(int argc, char **argv) { long i; long Ncirc = 0; double pi, x, y; double r = 1.0; // radius of circle double r2 = r*r; int rank, size, manager = 0;...
task1_omp.c
#include <math.h> #include <string.h> #include "timer.h" #include <stdio.h> #define NN 1024 #define NM 1024 float A[NN][NM]; float Anew[NN][NM]; int main(int argc, char** argv) { int i,j; const int n = NN; const int m = NM; const int iter_max = 1000; const double tol = 1.0e-6; double err...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
SKIM.h
/* Algorithm for Influence Estimation and Maximization Copyright (c) Microsoft Corporation All rights reserved. MIT License 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 re...
solver.c
//======================================================================================================================================================150 // UPDATE //======================================================================================================================================================1...
IndexLinear.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/IndexLinear.c" #else #ifdef _OPENMP #include <omp.h> #endif /* Threshold used to trigger multithreading */ #ifndef THNN_SPARSE_OMP_THRESHOLD #define THNN_SPARSE_OMP_THRESHOLD 100000 #endif /* Threshold used to trigger BLAS axpy call */ #ifndef THNN_SPARSE_OUTD...
omp_loop.h
// -*- C++ -*- // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; eit...
1999.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...
vq.h
// // Created by xydai on 2020/5/18. // #ifndef HNSW_LIB_UTIL_H #define HNSW_LIB_UTIL_H #include <cstdint> #include <stdexcept> #include "simd.h" int vq(const float *centroids, const float *x, int ks, int dsub) { int id = 0; float min_dist = fvec_L2sqr(centroids, x, dsub); for (int i = 1; i < ks; ++i) ...
GB_unop__identity_int16_int16.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...
sumavectores-Parallel.c
/* SumaVectoresC.c Suma de dos vectores: v3 = v1 + v2 Para compilar usar (-lrt: real time library): gcc -O2 SumaVectores.c -o SumaVectores -lrt Para ejecutar use: SumaVectoresC longitud */ #include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se encuentra la fu...
math_array.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & Newcastle University 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...
elkan_par8.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <stdbool.h> #include <string.h> #include <omp.h> #include "csvparser.h" void vector_init(double *a, int length) { for (int i = 0; i < length; i++) { a[i] = 0; } } void vector_copy(double *dst, double *src, int length) { for...
bitlocker_fmt_plug.c
/* * JtR format to crack BitLocker hashes. * * This software is Copyright (c) 2017, Dhiru Kholia <kholia at kth.se> and it * is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * Big thanks t...
HYPRE_IJMatrix.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
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 * * Redistribution an...
utilityNestedDisectionMetis.h
// *********************************************************************** // // Grappolo: A C++ library for graph clustering // Mahantesh Halappanavar (hala@pnnl.gov) // Pacific Northwest National Laboratory // // *************************************************************...