source
stringlengths
3
92
c
stringlengths
26
2.25M
Shapes.h
/************************************************************************* > File Name: Shapes.h > Author: Yibo Lin > Mail: yibolin@utexas.edu > Created Time: Thu 06 Nov 2014 09:04:57 AM CST ************************************************************************/ #ifndef SIMPLEMPL_SHAPES_H #define SI...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (1024*3) #define M (16*32) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) double A[M][N], B[M][N], C[N], D[N], E[N]; double S[M]; d...
keystore_fmt_plug.c
/* Java KeyStore cracker. Written by Dhiru Kholia <dhiru at openwall.com> and * Narendra Kangralkar <narendrakangralkar at gmail.com>. * * Input Format: $keystore$target$data_length$data$hash$nkeys$keylength$keydata$keylength$keydata... * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru.kholia at gmail.c...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2017 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
omp_array.c
/****************************************************************************** * * FILE: omp_array.c * * DESCRIPTION: * * Array addition - C/C++ Version * * This is a simple array adition running with omp * * AUTHOR: Victor Rodriguez * * LAST REVISED: 04/06/05 * *****************************************...
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...
counters2parallel.c
//counters2 parallel version HPC Felix Feliu #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <memory.h> #include <malloc.h> #include <papi.h> #include <omp.h> #define SIZE 1000 int main(int argc, char** argv) { float matrixa[SIZE][SIZE], matrixb[SIZE...
5643.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 <...
parallel_section_firstprivate.c
/* This file contains all checks for the section construct without the checks for the reduction clauses: ordered: checks that the execution is equivalent to the serial case */ // Skip testing on 64 bit systems for now! #ifndef __LP64__ #include <stdio.h> #include "omp_testsuite.h" int check_parallel_section_...
thdat.c
/* * Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain this list * of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce t...
mscash1_fmt_plug.c
/* MSCASH patch for john (performance improvement) * * Modified for utf-8 support by magnum in 2011, same terms as below * * Written by Alain Espinosa <alainesp at gmail.com> in 2007. No copyright * is claimed, and the software is hereby placed in the public domain. * In case this attempt to disclaim copyright a...
util.c
#include <mpi.h> #include "precision.h" #include "util.h" /* Use the modified Gram-Schmidt process to compute (in place) the portion of * the n-dimensional vector v orthogonal to each of the nv vectors s. The * projection * of the vector onto each of the basis vectors is stored in the * length-nv array c. This is...
smg3_setup_rap.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...
GB_unaryop__lnot_fp64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__ne_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
floram_util.c
#include "floram_util.h" #include <omp.h> #include <unistd.h> void get_random_bytes(void *buf, size_t bytes) { //only supported on recent linuxes, unfortunately. //getrandom(buf, bytes, 0); FILE *fp = fopen("/dev/urandom", "r"); if (fread(buf, 1, bytes, fp) != bytes) { fprintf(stderr,"Could not read random byt...
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) ...
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
debug_test_system.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
GB_binop__le_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
syrk.c
/** * syrk.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic...
vec_avx.h
/* Copyright (c) 2018 Mozilla 2012-2017 Jean-Marc Valin */ /* 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...
bug_36720.c
// RUN: %libomp-compile-and-run /* Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36720 Assertion failure at kmp_runtime.cpp(1715): nthreads > 0. OMP: Error #13: Assertion failure at kmp_runtime.cpp(1715). The assertion fails even with OMP_NUM_THREADS=1. If the second task is removed, everything runs to completion....
band.h
// Copyright (c) 2013-2017 Anton Kozhevnikov, Thomas Schulthess // 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, ...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
NQueen-Paralelo.c
/*Proyecto Final de Algoritmos Sebastian Gonzalo Vives Faus - A01025211 Sergio Hernandez Castillo - A01025210 Descripción: Problema de las N Reinas resuelto paralelizado */ #include <omp.h> #include <stdio.h> #include <stdbool.h> //Variables globales int n = 0; //Tamaño del tablero int soluciones = 0; bo...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "dark_cuda.h" #include "box.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #define NUMCHARS 37 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { char *path; FILE *file = fopen(filename, "r"); ...
pooling_3x3_pack4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy...
GB_binop__lt_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...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
pr26943-4.c
/* PR c++/26943 */ /* { dg-do run } */ extern int omp_set_dynamic (int); extern void omp_set_nested (int); extern int omp_get_thread_num (void); extern void abort (void); extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; volatile...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__isgt_fp32.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_unaryop__minv_int64_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
interpolation_pc.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
wshfl.c
/* Copyright 2018-2019. Massachusetts Institute of Technology. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2018-2019 Siddharth Iyer <ssi@mit.edu> * * Tamir J, Uecker M, Chen W, Lai P, Alley MT, Vasanawala SS, Lustig M...
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 // //===---------------------------...
bench.c
#include "omp.h" #include "pmsis.h" #define LOOP_ITER (2048) #define NB_ITER (256) #define NB_BARRIER_ITER (256) #define NB_ITER_SINGLE (128) #define CORE_ID pi_core_id() #define PRINTF(...) //#define PRINTF(...) printf(__VA_ARGS__) static void start_timer() { pi_perf_cl_reset(); pi_perf_conf(1<<PI_PERF_CYC...
special_random_ops.h
// // @author raver119@gmail.com // #ifndef LIBND4J_SPECIAL_RANDOM_OPS_H #define LIBND4J_SPECIAL_RANDOM_OPS_H #include <ops/random_ops.h> namespace randomOps { ////////////////////////////////////////////////////////////////////// template<typename T> class Choice { public: method_idx m...
mandelbrot-9.c
// The Computer Language Benchmarks Game // http://benchmarksgame.alioth.debian.org/ // // Contributed by Jeremy Zerfas // This is the square of the limit that pixels will need to exceed in order to // escape from the Mandelbrot set. #define LIMIT_SQUARED 4.0 // This controls the maximum amount of iterations that...
krb5pa-sha1_fmt_plug.c
/* * Kerberos 5 "PA ENC TIMESTAMP" by magnum (modified by Dhiru) * * Pcap file -> input file: * 1. tshark -r capture.pcapng -T pdml > ~/capture.pdml * 2. krbng2john.py ~/capture.pdml > krb5.in * 3. Run john on krb5.in * * http://www.ietf.org/rfc/rfc4757.txt * http://www.securiteam.com/windowsntfocus/5BP0H0A6K...
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...
transforms_mpfr.c
void ft_mpfr_destroy_plan(mpfr_t * A, int n) { for (int j = 0; j < n; j++) for (int i = 0; i < n; i++) mpfr_clear(A[i+j*n]); free(A); } void ft_mpfr_destroy_triangular_banded(ft_mpfr_triangular_banded * A) { for (int j = 0; j < A->n; j++) for (int i = 0; i < A->b+1; i++) ...
conv3x3s1_winograd64_transform_kernel_pack4_neon_GgG.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GraphMatRuntime.h
/****************************************************************************** ** Copyright (c) 2015, Intel Corporation ** ** All rights reserved. ** ** ** ...
GB_binop__min_uint16.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_unaryop__ainv_uint8_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unaryop__ainv_uint8_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...
icv-2.c
/* { dg-do run { target *-*-linux* *-*-gnu* *-*-freebsd* } } */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <pthread.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> pthread_barrier_t bar; void *tf (void *p) { int l; if (p) omp_set_num_threads (3); pthread_barrier_wait (&bar); if ...
SP2.c
/////////////////////////// 8INF854 - ARCHITECTURES PARRALLELES - DEVOIR #2 /////////////////////////////////// ///////////////////////////// SP1.c - Corentin RAOULT - Adrien Cambillau ///////////////////////////////////// #include <omp.h> #include <stdio.h> #include <stdlib.h> ////////////////////// ...
GB_unaryop__minv_uint32_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...
ast-dump-openmp-target.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test() { #pragma omp target ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-targe...
deriche-dace.c
/* DaCe AUTO-GENERATED FILE. DO NOT MODIFY */ ////__DACE:0 #include <dace/dace.h> ////__DACE:0 ////__DACE:0 void FOR26_2_3_0(int& ___w, int&...
mandelbrot.c
#include "mandelbrot.h" #include "il/color/color.h" array2ui8 *mandelbrot(float x_left, float x_right, float y_bottom, float y_top, int depth, int nx, int ny) { float dx = (x_right - x_left) / nx; float dy = (y_top - y_bottom) / ny; array2ui8 *m = array2ui8_new(); array2ui8_resize(m, ny, nx); for (...
tutorial_region_prof.c
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, Intel Corporation * * 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 ...
fwk_render.h
// naive rendering framework // - rlyeh, public domain // // IQM skeletal meshes by @lsalzman (public domain) - https://bit.ly/2OQh0Me // SH code by @ands (public domain) - https://github.com/ands/spherical_harmonics_playground // SHM code by @jarikomppa (unlicensed) - https://github.com/jarikomppa/shadertoolkit #ifnd...
fdp.c
#include <math.h> #include <string.h> #include <stdio.h> #include "types.h" #include "util.h" #include "vector.h" #include "atom.h" #include "random.h" #include "fdp.h" #include "main.h" //////////////////////////////////////////////////////////// // Force-directed placement code. ////////////////////////////////////...
GB_unaryop__ainv_uint8_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...
GB_unop__minv_int8_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...
GB_unop__creal_fp64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
mkl_quantized_conv_ops.h
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nested.c
// OpenMP Nested Example #include <omp.h> #include <stdio.h> #include <stdlib.h> int main( int argc, char** argv ) { omp_set_nested( 1 ); // Enable Nested Parallelism omp_set_dynamic( 0 ); // Disable Dynamic Threads // Outer Level Parallel Region - 2 Threads #pragma omp parallel num_threads( 2 ) { ...
8700.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...
GB_binop__land_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
utils.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include <fcntl.h> #include <algorithm> #include <cassert> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <string> #include <memory> #include <random> #include <set> #inc...
nbodysystem.h
#include <cstdio> #include <cassert> #include <cmath> #include <vector> struct NbodySystem{ long nbody; long num_step, num_bstep; long num_step_tot, num_bstep_tot; typedef dd_real real_type; typedef qvec3 vect_type; real_type eps2; real_type tsys; real_type init_energy, prev_energy; real_type dt...
OMP.c
#define CHUNK 1024*1024 // Run CHUNK iterations and check error #define LOG 1024 // Print progress each LOG iterations #define LIMIT 1024*1024 // LIMIT of iterations #include "../common.h" int main(int argc, char *argv[]) { unsigned int digits; unsigned int threads; double precision; getParams(argc, a...
GB_transpose.c
//------------------------------------------------------------------------------ // GB_transpose: C=A' or C=op(A'), with typecasting //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.co...
9644.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...
simple_particle_filter.h
// -*- mode: c++ -*- /********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2015, JSK Lab * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the ...
opencl_office2013_fmt_plug.c
/* MS Office 2013 cracker patch for JtR. Hacked together during March of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com> * * This OpenCL format by magnum. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * and Copyright (c) 2012, magnum and it is hereby released to the general ...
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 // //===---------------------------...
pr27573.c
/* PR middle-end/27573 */ /* { dg-do compile } */ /* { dg-require-profiling "-fprofile-generate" } */ /* { dg-options "-O2 -fopenmp -fprofile-generate" } */ extern int puts (const char *); int main (void) { int i, j = 8; #pragma omp parallel { puts ("foo"); for (i = 1; i < j - 1; i++) ; } return...
valid.yolo11.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_28272_17_17_1024_1_1.h" #include "gen_ukr_A1B2gemm_1_28272_17_17_1024_1_1.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 17; int Ny = 17; int Nh = 1; lon...
smul.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...
computeGraph.c
#include "defs.h" double computeGraph(graph* G, graphSDG* SDGdata) { mcsim_skip_instrs_begin(); VERT_T* endV; LONG_T *degree, *numEdges, *pos, *pSums; WEIGHT_T* w; double elapsed_time; #ifdef _OPENMP omp_lock_t *vLock; LONG_T chunkSize; #endif elapsed_time = get_seconds(); #ifdef _OPENM...
axpy_ompacc.c
// Experimental test input for Accelerator directives // Liao 1/15/2013 #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> /* change this to do saxpy or daxpy : single precision or double precision*/ #define REAL double #define VEC_LEN 1024000 //use a fixed number for now /* zero out the enti...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
sgemm.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "sgemm.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__acosh_fp64_fp64.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_for_firstprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp for firstprivate clause by counting up a variable in a parallelized loop. Each thread has a firstprivate variable (1) and an variable (2) declared by for firstprivate. First it stores the result of its last iteration in variable (2). Then it stores the value...
stream_mmap.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...
lock.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { //need to use an OpenMP construct so that OMPT will be initalized #pragma omp parallel num_threads(1) print_ids(0); omp_lock_t lock; printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thr...
remap.c
#define _GNU_SOURCE #include <assert.h> /* assert */ #include <omp.h> /* openmp library */ #include <stdio.h> /* printf */ #include <stdlib.h> /* EXIT_SUCCESS */ #include <string.h> /* memset */ #include <sys/mman.h> /* mmap, mremap, munmap */ #include <unistd.h> /* sysconf */ int main() { int ret; ...
copyprivate3.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #define LOOPCOUNT 100 int main(void) { int result = 0; int nr_iterations = 0; int i; int j; #pragma omp parallel private(i,j) { for (i = 0; i < LOOPCOUNT; i++) { #pragma omp single copyprivate(j) { nr_iterations++; ...
init_ops_random.c
#include <stdio.h> #include <stdlib.h> #include "init_ops.h" #include "utility.h" #include <time.h> #include <limits.h> #ifdef _OPENMP #include <omp.h> #endif // state randomization unsigned long xor128(unsigned long* state); double random_uniform(unsigned long* state); double random_normal(unsigned long* state); void...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ft.c
/*[]*/ struct __sFILEX ; /*[]*/ int printf(const char *restrict , ...); /*[]*/ void exit(int ); /*[]*/ extern double cos(double ); /*[]*/ extern double sin(double ); /*[]*/ extern double exp(double ); /*[]*/ extern double log(double ); /*[]*/ extern double fabs(double ); /*[]*/ typedef int boolean; /*[]*/ struct stUn_...
GB_binop__pow_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
triplet_iw.c
/* Copyright (C) 2016 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
csr_matvec.c
/*BHEADER********************************************************************** * Copyright (c) 2006 The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * Written by the HYPRE team. UCRL-CODE-222953. * All rights reserved. * * This file is part of HYPRE (see ht...
GB_unaryop__abs_int8_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
sortc.c
#include <stdlib.h> #include <stdio.h> #include <math.h> typedef struct { float val; int index; } THEFIT; THEFIT *work; THEFIT *a; #pragma omp threadprivate (work,a) void RecMergeSort(int left, int right); void Sort(THEFIT *Ain, int n); void Merge(int s, int n, int m); void merge2(THEFIT *d1,int n,THEFIT...
c-parser.c
/* Parser for C and Objective-C. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat influenced by and fragments ba...
network_simplex_simple.h
/* -*- mode: C++; indent-tabs-mode: nil; -*- * * * This file has been adapted by Nicolas Bonneel (2013), * from network_simplex.h from LEMON, a generic C++ optimization library, * to implement a lightweight network simplex for mass transport, more * memory efficient than the original file. A previous version of this fi...
GB_unop__bnot_int32_int32.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...
ParallelVertexFilter.h
/** * @file * This file is part of PUMGen * * For conditions of distribution and use, please see the copyright * notice in the file 'COPYING' at the root directory of this package * and the copyright notice at https://github.com/SeisSol/PUMGen * * @copyright 2017 Technical University of Munich * @author Se...
rkb_screen.c
/* Copyright 2014-2018 The PySCF Developers. 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 requi...
utils.h
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...