source
stringlengths
3
92
c
stringlengths
26
2.25M
ray_tracing.h
#ifndef _RAY_TRACING_H_ #define _RAY_TRACING_H_ #include <glm.hpp> #include <ctime> #include <cmath> #include <random> #include "omp.h" #include "model.h" #define NS 1 #define RAY_DEEPTH 9 // 3D model + pose and scale struct Obj { Model &model; glm::dmat4x4 pose = glm::dmat4x4(1.0); double scale = 1.0; ...
looptc_c2.c
#include <string.h> void deinterleave(char *page, char *transposed, const int ntabs, const int nchannels, const int ntimes, const int padded_size) { int tab; for (tab = 0; tab < ntabs; tab++) { // unroll time dimension once int time; for (time = 0; time < ntimes; time+=2) { // build temporary a...
vision.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
pysnobal.h
/* ** NAME ** pgm.h ** ** DESCRIPTION ** The include file for 'isnobal'. */ #ifndef _ISNOBAL_H_ #define _ISNOBAL_H_ #define DEFAULT_Z_U 5.0 /* default wind speed measurement height */ #define DEFAULT_Z_T 5.0 /* default air temp and vapor press hght */ #define IBANDS 6 /* # bands in input image */...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable coefficients * 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) #...
gemm.h
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
citrix_ns_fmt_plug.c
/* * Description from Nicolas Ruff: * - Salt value is hashed as an hexadecimal string, not bytes. * - The trailing NULL byte of password string is taken into account during * hashing. * - The leading '1' is actually the string length * '1' = 49 = len('1') + len(hex_salt) + len(hex_sha1) * * ----------------...
atomic-4.c
/* PR middle-end/35611 */ extern void abort (void); int main (void) { long double d = .0L; int i; #pragma omp parallel for shared (d) for (i = 0; i < 1000; i++) #pragma omp atomic d += 1.0L; if (d != 1000.0L) abort (); return 0; }
omp_bug1fix.c
/****************************************************************************** * FILE: omp_bug1fix.c * DESCRIPTION: * This is a corrected version of the omp_bug1.c example. Corrections * include removing all statements between the parallel for construct and * the actual for loop, and introducing logic to preserv...
test.c
#include <stdio.h> #include <omp.h> #pragma omp requires unified_shared_memory #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) int main(void) { check_offloading...
GB_unop__lnot_int16_int16.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...
convolutiondepthwise_3x3_packn_fp16s.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 ...
FriendAlignFinder.h
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2012) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
nvptx_target_printf_codegen.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ // Test target codegen - host bc file has to be cr...
GB_unop__signum_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
Example_scan.2.c
/* * @@name: scan.2.c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #include <stdio.h> #define N 100 int main(void) { int a[N], b[N]; int x = 0; // initialization for (int k = 0; k < N; k++) a[k] = k + 1; // a[k] is not included i...
depth-metrics.h
// License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2017 Intel Corporation. All Rights Reserved. // // Plane Fit implementation follows http://www.ilikebigbits.com/blog/2015/3/2/plane-from-points algorithm #pragma once #include <vector> #include <mutex> #include <array> #include <imgui.h> #incl...
ams.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322. * This file is part of AMG. See files READ...
signalMachine.c
#include <getopt.h> #include <string.h> #include "signalMachineUtils.h" #include "pairwiseAligner.h" #define STEP 6 // space between degenerate nucleotides in for error correction #define ESTIMATE_PARAMS 1 #define ASSIGNMENT_THRESHOLD 0.1 typedef enum { full = 0, variantCaller = 1, assignments = 2 } Out...
intruder.c
/* ============================================================================= * * intruder.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
GB_unop__identity_uint64_int64.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__identity_uint16_bool.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...
omp.h
#ifndef PARLAY_INTERNAL_SCHEDULER_PLUGINS_OMP_H_ #define PARLAY_INTERNAL_SCHEDULER_PLUGINS_OMP_H_ #if defined(PARLAY_OPENMP) #include <omp.h> namespace parlay { // IWYU pragma: private, include "../../parallel.h" inline size_t num_workers() { return omp_get_max_threads(); } inline size_t worker_id() { return omp_ge...
GB_unop__abs_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...
biotsavart.h
#pragma once #include "EigenInclude.h" #include "types.h" #include "mapping.h" #include "debugutils.h" #include <limits> #include <math.h> #include <cmath> #define VORTEX_RADIUS_DEF 1e-6 // #define VORTEX_RADIUS_SQ 1e-4 #define Nvert 4 // Declaration for parallel computing #pragma omp declare reduction (sum_Vector3...
nvptx_device_cmath_functions.c
// Test calling of device math functions. ///==========================================================================/// // REQUIRES: nvptx-registered-target // RUN: %clang_cc1 -internal-isystem %S/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %...
parallel-reduction-nowait.c
/* * parallel-reduction-nowait.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
phylokernel.h
/* * phylokernel.h * * Created on: Dec 14, 2014 * Author: minh */ #ifndef PHYLOKERNEL_H_ #define PHYLOKERNEL_H_ #include "phylotree.h" //#include "vectorclass/vectorclass.h" //#include "vectorclass/vectormath_exp.h" #include "alignment/superalignment.h" #ifdef __SSE2__ inline Vec2d horizontal_add(Vec2d x[...
lu2.c
// lu2.c // // test program for blocked LU decomposition // // Time-stamp: <2019-05-06 14:43:09 makino> //#define NOBLAS #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <getopt.h> #include <emmintrin.h> typedef dou...
buggy_version.c
#include <stdio.h> int main(){ int T[5]; int sum = 0; // initializing array T for (int i = 0; i < 10; i ++) { T[i] = i; } // running the loop 10 times using openmp #pragma omp parallel for shared (T,sum) reduction (+ : sum) for ( int i = 0; i < 10; i ++) { // assign value for elements in...
findSubGraphs.c
#include "defs.h" double findSubGraphs(graph* G, edge* maxIntWtList, int maxIntWtListSize) { VERT_T* S; LONG_T *start; char* visited; LONG_T *pSCount; #ifdef _OPENMP omp_lock_t* vLock; #endif LONG_T phase_num, numPhases; LONG_T count; double elapsed_time = get_seconds();...
raytracing.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "math-toolkit.h" #include "primitives.h" #include "raytracing.h" #include "idx_stack.h" #include <immintrin.h> #define MAX_REFLECTION_BOUNCES 3 #define MAX_DISTANCE 1000000000000.0 #define MIN_DISTANCE 0.00001 #define SAMPLES 4 #define SQUARE(x) (x * x...
program_evaluator.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2010, 2011, 2012 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met...
office_fmt_plug.c
/* Office 2007 cracker patch for JtR. Hacked together during March of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com> */ #if FMT_EXTERNS_H extern struct fmt_main fmt_office; #elif FMT_REGISTERS_H john_register_one(&fmt_office); #else #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #...
base_mortar_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
core_slansy.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zlansy.c, normal z -> s, Fri Sep 28 17:38:21 2018 * **/ #include <plasma_core_blas.h> #include "pla...
mmp.c
#include "XSbench_header.h" #ifdef MPI #include<mpi.h> #endif int main( int argc, char* argv[] ) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int version = 19; int mype ...
opencl_sxc_fmt_plug.c
/* * Modified by Dhiru Kholia <dhiru at openwall.com> for Keychain format. * * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * 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, ar...
core_zlaset.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" // for memset function #include <string...
mandelbrot.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <complex.h> #include "types.h" static double in_mandelbrot_set(double complex c, long iterations, long escape_radius) { long i; double complex z = 0; for (i = 0; i < iterations; i++) { doub...
GB_unaryop__identity_bool_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...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * 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) >...
adjointnavierstokes_avx.h
//***************************************************************************** // Title : src/equation_avx/adjointnavierstokes_avx.h // Author : Tanabe Yuta // Date : 2021/02/11 // Copyright : (C)2021 TanabeYuta //*************************************************************************...
Fig_5.9_piloop.c
#include <stdio.h> #include <omp.h> #define NTHREADS 4 static long num_steps = 100000000; double step; int main() { double x, pi, sum = 0.0; double start_time, run_time; int i; step = 1.0 / (double) num_steps; omp_set_num_threads(NTHREADS); start_time = omp_get_wtime(); #pragma omp parallel ...
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)...
GB_binop__bshift_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
kernel_so4_acoustic.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "ittnotify.h" #include "xmmintrin.h" #include "pmmintrin.h" #include <stdio.h> #include "omp.h" #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict ...
omp-simd-clone.c
/* OMP constructs' SIMD clone supporting code. Copyright (C) 2005-2018 Free Software Foundation, Inc. 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 the Free Software Foundation; either version 3, or (at your ...
stereo_costs.h
#ifndef RECONSTRUCTION_BASE_STEREO_COSTS_ #define RECONSTRUCTION_BASE_STEREO_COSTS_ #include <iostream> #include <unordered_map> #include <opencv2/core/core.hpp> #include <Eigen/Core> #include "../../core/types.h" namespace recon { typedef Eigen::Matrix<uint32_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> M...
GB_unaryop__minv_uint16_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
linAlgWeightedNorm2.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 t...
fields_modifiers.c
// RUN: %libomp-compile-and-run // 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) \ if (!(condition)) { ...
nqueens-1.c
/* { dg-do run } */ /* { dg-options "-O2 -fopenmp" } */ /* { dg-require-effective-target tls_runtime } */ #include <omp.h> #include <stdio.h> #include <string.h> int cnt; #pragma omp threadprivate (cnt) void nqueens (char *a, int n, int pos) { /* b[i] = j means the queen in i-th row is in column j. */ char b[po...
Match_fs.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "grb2.h" #include "wgrib2.h" #include "fnlist.h" /* * MATCH_fs package * * like Match package but uses "fixed strings" and not regular expressions * * 11/2014 in public domain Wesley Ebisuzaki * */ extern int match_fs; extern int match_flag; ...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nqueens-1.c
/* { dg-do run } */ /* { dg-options "-O2 -fopenmp" } */ /* { dg-require-effective-target tls_runtime } */ #include <omp.h> #include <stdio.h> #include <string.h> int cnt; #pragma omp threadprivate (cnt) void nqueens (char *a, int n, int pos) { /* b[i] = j means the queen in i-th row is in column j. */ char b[po...
nowait-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...
convolution_winograd_transform_pack4_bf16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
DRB030-truedep1-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...
big.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> int main() { //Fails with 512 * 4081 long size = 512 * 5000; int *data = (int*)malloc(size * sizeof(int)); #pragma omp parallel for for( long i = 0; i < 512 * 5000; i++) { int rank = omp_get_thread_num(); /* ...
core_dlauum.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zlauum.c, normal z -> d, Fri Sep 28 17:38:22 2018 * **/ #include <plasma_core_blas.h> #include "pla...
NeighborhoodGraph.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_NG_H_ #define _SPTAG_COMMON_NG_H_ #include "../VectorIndex.h" #include "CommonUtils.h" #include "Dataset.h" #include "FineGrainedLock.h" #include "QueryResultSet.h" #include <chrono> #if defined(GP...
deconvolution_packn.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 ...
pooling_2x2.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
ten_tusscher_2004_epi_S1_3.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S1_3.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO:...
msl_raptor_backend.h
/* Copyright 2020 Benjamin Ramtoula 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 agreed to in writing, softwar...
NeoHookeanMaterial.c
/* This file is part of redbKIT. * Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL) * Author: Federico Negri <federico.negri@epfl.ch> */ #include "NeoHookeanMaterial.h" /*************************************************************************/ void NeoHookeanMaterial_forces(mxArray* plhs...
dahua_fmt_plug.c
/* * Format for cracking Dahua hashes. * * http://www.securityfocus.com/archive/1/529799 * https://github.com/depthsecurity/dahua_dvr_auth_bypass * * This software is Copyright (c) 2014 Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under the following terms: * * Redist...
lotus85_fmt_plug.c
/* * This software is Copyright (c) 2013 Sébastien Kaczmarek <skaczmarek@quarkslab.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * Fixed the format to crack multiple hashes + ...
GB_unop__identity_fc64_bool.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...
pixel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
OMPElementWiseVectorAssembler.h
/** * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.com) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.com/LICENSE.txt * * * \file OMPElementWiseVectorAssembler.h * * Created on 2012-08-20 by Nor...
matfuncs.c
#include "matrix.h" /** \brief Computes addition function * * \param[in] x * \param[in] y * \return \f$ x+y \f$ * */ mtype __mat_addfunc(mtype x, mtype y) { return (x+y); } /** \brief Computes subtraction function * * \param[in] x * \param[in] y * \return \f$ x-y \f$ * */ mtype __mat_subfunc(mtype ...
omp_copyin.c
#include "omp_testsuite.h" #include <stdlib.h> #include <stdio.h> #include <omp.h> /* static int sum0 = 0; #pragma omp threadprivate(sum0) static int myvalue = 0; #pragma omp threadprivate(myvalue) */ static int sum1 = 789; #pragma omp threadprivate(sum1) int check_omp_copyin (FILE * logFile) { int sum = 0; int...
GB_binop__minus_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
region_layer.c
#include "region_layer.h" #include "activations.h" #include "blas.h" #include "box.h" #include "opencl.h" #include "utils.h" #include <stdio.h> #include <assert.h> #include <string.h> #include <stdlib.h> layer make_region_layer(int batch, int w, int h, int n, int classes, int coords) { layer l = {0}; l.type =...
forest.c
#include "forest.h" #ifdef USING_MPI const MPI_Comm comm = MPI_COMM_WORLD; int myrank, size; #endif int main(int argc, char** argv) { int i, y, seed; args* myArgs; forest* f; cell** swapGrid; struct random_data* rand_state; char rand_buf[256]; memset(rand_buf, 'q', (size_t)256); int ...
bem_pbc.c
#include "common.h" void build_matrix_T(double *x_t, int *tri_nodes, double *bm, double *T, int n_node, int n_face) { int i,j,k, p, c; double be[3]; double *v, *v1, *v2, *v3; //#pragma omp parallel for #pragma omp parallel for private(i,j,k,p,c,be,v,v1,v2,v3) for(p=0; p<n_node; p++){ v = &x_t[3*p]; f...
kernel_exp.c
/*! @copyright (c) 2017 King Abdullah University of Science and * Technology (KAUST). All rights reserved. * * STARS-H is a software package, provided by King Abdullah * University of Science and Technology (KAUST) * * @generate NDIM -> n 1 2 3 4 * Generate different functions fo...
template-for-new-benchmark.c
/** * template.c: This file is part of the PolyBench/C 3.2 test suite. * * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench c...
main.c
#include <fcntl.h> #include <math.h> #include <omp.h> #include <sys/param.h> typedef struct Stack Stack; typedef struct Queue Queue; typedef struct Node Node; struct Node { Node *next; unsigned int i; double d; }; struct Queue { Node *first; Node *last; }; struct Stack { Stack *head; uns...
main_decades_biscuit.h
int main(int argc, char** argv) { char *x_to_y_fname; bgraph x_to_y_bgraph; weight_type *y_project; assert(argc == 2); x_to_y_fname = argv[1]; x_to_y_bgraph = parse_bgraph(x_to_y_fname); y_project = (weight_type*) calloc(get_projection_size(x_to_y_bgraph), sizeof(weight_type)); assert(y_project); ...
dbatch.c
#include "kog.h" #include "mem.h" #ifdef USE_MSR #include "msr.h" #endif /* USE_MSR */ #include "wre.h" int main(int argc, char *argv[]) { if (4 != argc) { (void)fprintf(stderr, "%s n #batches infile\n", argv[0]); return EXIT_FAILURE; } const size_t n = atoz(argv[1]); if (!n) { perror("atoz(n)"); ...
stencil_par.c
/******************************************************************* NAME: Stencil PURPOSE: This program tests the efficiency with which a space-invariant, linear, symmetric filter (stencil) can be applied to a square grid or image. USAGE: The program takes as input the linear dimen...
trmv_x_sky_n_lo.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_N...
hello_world.c
#include<stdio.h> #include<omp.h> int main() { omp_set_num_threads(4); #pragma omp parallel { printf("%d\n", omp_get_thread_num()); } }
5298.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])...
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...
DRB053-inneronly1-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...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
star2d3r.c
#define BENCH_DIM 2 #define BENCH_FPP 25 #define BENCH_RAD 3 #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] = (SB_TYPE (*)[dimsize][dimsize])A1; ...
divsufsort.c.inc.h
/* * 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 ...
beam_vdif.c
/******************************************************** * * * Licensed under the Academic Free License version 3.0 * * * ********************************************************/ #include <stdlib.h> #include...
MzXMLHandler.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
SybasePROP_fmt_plug.c
/* SybasePROP cracker. Hacked together during November of 2013 by Dhiru Kholia * <dhiru [at] openwall.com>. * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>, * Frank Benhamou, Gregory Terrien and Marcel Major and it is hereby released * to the general public under the following terms...
jik_optimize.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int A_row; int A_col; int B_row; int B_col; int **constructMatrix(int row, int col){ int **matrix = (int **)malloc(sizeof(int *) * row); for (int i = 0; i < row;i++){ matrix[i] = (int *)malloc(sizeof(int) * col); } return matrix; } void ...
eavlSourceTopologyGatherMapOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_SOURCE_TOPOLOGY_GATHER_MAP_OP_H #define EAVL_SOURCE_TOPOLOGY_GATHER_MAP_OP_H #include "eavlCUDA.h" #include "eavlCellSet.h" #include "eavlCellSetExplicit.h" #include "eavlCellSetAllStructured.h" #include "eavlDataSet.h" #inclu...
collatzGuided.c
// test file to execute the collatz conjecture on 1 proc #include <stdio.h> #include <stdlib.h> #include <omp.h> typedef unsigned long long ullong; ullong hotpo(ullong currn); int main(int argc, char** argv) { ullong n, // track current n high, // highest number recorded nmax = (argc > 1) ? atoi(...