source
stringlengths
3
92
c
stringlengths
26
2.25M
npb_cg.c
# 1 "main.c" # 0 "main.c" # 1 "/opt/pgi/linux86-64/17.10/include/_c_macros.h" <System_Header> # 10 "/opt/pgi/linux86-64/17.10/include/_c_macros.h" <System_Header> # 16 "/opt/pgi/linux86-64/17.10/include/_c_macros.h" <System_Header> # 21 "/opt/pgi/linux86-64/17.10/include/_c_macros.h" <System_Header> # 1 "main.c" ...
DRB106-taskwaitmissing-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...
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) >...
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...
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][...
GB_binop__times_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
window.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/) * * 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 Lic...
wrapfftw.c
#include <stdio.h> #include <stdlib.h> #include "hpccfft.h" #ifdef _OPENMP #include <omp.h> #endif hpcc_fftw_plan HPCC_fftw_create_plan(int n, fftw_direction dir, int flags) { hpcc_fftw_plan p; fftw_complex *a = NULL, *b = NULL; p = (hpcc_fftw_plan)fftw_malloc( sizeof *p ); if (! p) return p; p->w1 = (f...
V3_openmp.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <pthread.h> #include <omp.h> #include <time.h> #include "../lib/mmio.h" #include "../lib/triangles_library.h" //V3 ALGORITHM USING OPENMP void V3_algorithm_openmp(uint32_t *csc_col,uint32_t *csc_row, uint32_t *c3, int n); int main(int argc, char *...
computepi.c
#include "computepi.h" #include <immintrin.h> #include <math.h> #include <omp.h> #include <stdint.h> #include <stdio.h> double compute_pi_baseline(size_t N) { double pi = 0.0; double dt = 1.0 / N; // dt = (b-a)/N, b = 1, a = 0 for (size_t i = 0; i < N; i++) { double x = (double) i / N; // x = ti =...
GB_unaryop__abs_bool_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...
Cylinder.h
#ifndef CYLINDER_HEADER #define CYLINDER_HEADER #include "basic.h" #include <stdexcept> #include <utility> #include <MiscLib/Vector.h> #include "PointCloud.h" #include <ostream> #include <istream> #include <GfxTL/HyperplaneCoordinateSystem.h> #include <stdio.h> #include <MiscLib/NoShrinkVector.h> #include "...
bml_adjungate_triangle_dense_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_adjungate_triangle.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_types.h" #include "bml_adjungate_triangle_dense.h" #include "bml_allocate_dense.h" #include "bml_types_dense.h" #include <complex.h> #include <stdlib.h> #in...
blackscholes.c
// Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice // Hall, John C. Hull, // SIMD Version by Juan M. Cebrian, NTNU - 2013. (modifications under JMCG tag) #include <stdio.h> ...
cffi.c
#include <stdbool.h> #include <stdio.h> #include <math.h> #include <inttypes.h> // Check little or big endian // Linux (32- or 64-bit) is probably little endian bool endian(void) { // https://stackoverflow.com/questions/12791864/c-program-to-check-little-vs-big-endian volatile uint32_t i=0x01234567; // ret...
GB_unop__identity_fc32_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__band_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
par_interp.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) **************************************...
MyMiscellany.h
/* Copyright (c) 2017, Michael Kazhdan 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 and the following di...
8990.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...
FillInLinearSystemImpl.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
GB_binop__bshift_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
particle_levelset_utilities.h
/* ============================================================================== KratosTestApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2010 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cim...
vector.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...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_AxB_rowscale_template.c
//------------------------------------------------------------------------------ // GB_AxB_rowscale_template: C=D*B where D is a square diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
GB_unaryop__identity_int8_int64.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__identity_uint16_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...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
t_cholmod_gpu.c
/* ========================================================================== */ /* === GPU/t_cholmod_gpu ==================================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
opencl_blockchain_fmt_plug.c
/* blockchain "My Wallet" cracker patch for JtR. Hacked together during June of * 2013 by Dhiru Kholia <dhiru at openwall.com>. * * See https://blockchain.info/wallet/wallet-format * This software is Copyright (c) 2012 Lukas Odzioba <ukasz at openwall.net> * and Copyright (c) 2013 Dhiru Kholia <dhiru at openwall....
electrum_fmt_plug.c
/* * JtR format to crack password protected Electrum Wallets. * * 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....
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__identity_int8_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
jacobi2d.c
#include <stdio.h> #include <stdlib.h> #define ROW 5 #define COL 5 #define LIMIT 2 int main(){ float *A = (float *)malloc(ROW*COL*sizeof(float)); //Matriz creada float *B = (float *)malloc(ROW*COL*sizeof(float)); //2da Matriz, que usaremos para calcular valores. //Primero vamos a inicializar la matri...
test_omp.c
#include <nautilus/nautilus.h> #include <rt/omp/omp.h> #define N 4 volatile float a[N]; volatile float b[N]; volatile float c[N]; static int omp_simple() { int i; for (i=0;i<N;i++) { a[i] = i; b[i] = i; } #pragma omp parallel nk_vc_printf("I am thread %d (%d total)\n",omp_get_thread_num(),omp_get_num...
data_read.c
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <time.h> #include <omp.h> #include <string.h> #include "shared_consts.h" #include <varargs.h> double **LoadEquationMatrix(char *path, int *rows, int *columns) { double **matrix; int n, i, j; FILE *file; if ((file = fopen(path, "r")) == NULL) { ...
hello.c
#include<stdio.h> #include<omp.h> int main(){ #pragma omp parallel { printf("Hello, World from thread #%0X.\n", omp_get_thread_num()); } return 0; }
simd5.c
#include <math.h> void main(int n,int m,float *a,float *b) { int i; #pragma omp simd order(concurrent) { for (i = 1; i < n; i++) b[i] = ((a[i] + a[i - 1]) / 2.0); } }
task_single_producer_omp.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * See LICENSE.txt in top-level directory. */ #include <assert.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #define NUM_TASKS 5000000 #define NUM_REPS 1 void sscal(float value, float *a) { *a = *a...
primordial.c
/** @file primordial.c Documented primordial module. * * Julien Lesgourgues, 24.08.2010 * * This module computes the primordial spectra. It can be used in different modes: * simple parametric form, evolving inflaton perturbations, etc. So far only * the mode corresponding to a simple analytic form in terms of amp...
ps.c
/*** Some usefull math macros ***/ #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) static double mnarg1,mnarg2; #define FMAX(a,b) (mnarg1=(a),mnarg2=(b),(mnarg1) > (mnarg2) ?\ (mnarg1) : (mnarg2)) static double mnarg1,mnarg2; #define FMIN(a,b) (mnarg1=(a),mnarg2=(b),(mnarg1) < (mnarg2) ?\ (mnarg1) : (mnarg2)) #d...
GB_unaryop__identity_int64_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...
implicit_blender.c
/* * This program 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 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
GB_unaryop__ainv_uint64_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
boxFilter_OPSAT_SoA.h
#pragma once #include "boxFilter.hpp" //one pass box filtering SoA class boxFilter_OPSAT_SoA { protected: cv::Mat src; cv::Mat dest; int r; int parallelType; float div; int row; int col; int cn; int loop; std::vector<cv::Mat> vSrc; std::vector<cv::Mat> vDest; virtual void filter_impl(cv::Mat& input, c...
Example_taskloop.1.c
/* * @@name: taskloop.c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.5 */ void long_running_task(void); void loop_body(int i, int j); void parallel_work(void) { int i, j; #pragma omp taskgroup { #pragma omp task long_running_task(); // can execute ...
DRB069-sectionslock1-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...
needle.c
#define LIMIT -999 #define TRACE #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <sys/time.h> #ifdef _OPENMP #include <omp.h> #endif #define DEBUG #ifndef VERIFICATION #define VERIFICATION 1 #endif #ifndef ENABLE_OPENACC #define ENABLE_OPENACC 1 #endif #ifndef _MAX_ROWS_ #defi...
base_mortar_criteria.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_...
matfilter.c
#include "matrix.h" /** \brief Computes 2-D convolution * * \param[in] A Input matrix * \param[in] mask Input kernel/mask * \param[in] scratch Scratch matrix for temporary calculations * \param[in] result Matrix to store the result * \return Convolved output matrix * */ MATRIX mat_conv2(MATRIX A, MATRIX mask...
map-4.c
/* PR c/96678. */ #define SIZE (100) typedef double Grid[SIZE]; void test (Grid src1) { #pragma omp target map(alloc:src1[:]) /* { dg-error "for array function parameter length expression must be specified" } */ { src1[0] = 5; } } void test2 (double src2[]) { #pragma omp target map(alloc:src2[:]) /...
HybridRepSetReader.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2019 QMCPACK developers. // // File developed by: Ye Luo, yeluo@anl.gov, Arg...
pad.h
// Copyright 2018 Xiaomi, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
array_multiply_omp.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> /* <--- OpenMP --- */ int main(int argc, char **argv) { struct timespec ts_start, ts_end; int size = 1e8; int multiplier = 2; int *a, *c; int i; float time_total; /* Allocate memory for arrays */ a = malloc(size * sizeof(int)); c = mal...
rt_dgeqrf.c
#include "runtime.h" void RT_CORE_dgeqrt(Quark *quark, Quark_Task_Flags *task_flags, int m, int n, int ib, int nb, double *A, int lda, double *T, int ldt) { plasma_context_t *plasma; plasma = plasma_context_self(); if (plasma->runtime == PLASMA_QU...
Matrix.h
#pragma once #include <algorithm> #include <exception> #include <functional> #include <iostream> #include <omp.h> #include <stdexcept> #include <type_traits> #include <vector> namespace cppmath { template <typename T> class Matrix { static_assert(std::is_floating_point<T>::value, "An specializa...
matmult.c
/****************************************************************************** * OpenMp Example - Matrix Multiply - C Version * Demonstrates a matrix multiply using OpenMP. * * Modified from here: * https://computing.llnl.gov/tutorials/openMP/samples/C/omp_mm.c * * For PAPI_FP_INS, the exclusive coun...
d2d_memcpy.c
// RUN: %libomptarget-compile-aarch64-unknown-linux-gnu && env OMP_MAX_ACTIVE_LEVELS=2 %libomptarget-run-aarch64-unknown-linux-gnu | %fcheck-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu && env OMP_MAX_ACTIVE_LEVELS=2 %libomptarget-run-powerpc64-ibm-linux-gnu | %fcheck-powerpc64-ibm-li...
gemm.c
// This file is generated from test alphabets program by code generator in alphaz // To compile this code, use -lm option for math library. // Includes #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <string.h> #include <limits.h> #include <float.h> #include <omp.h> #include <imm...
ex1.c
#include <stdio.h> #include <omp.h> # define PAD 8 #define NUM_THREADS 4 static long num_steps = 100000; double step; int main() { double pi, sum[NUM_THREADS][PAD]; int i, ts_num; step = 1.0/(double)num_steps; // set number of used threads omp_set_num_threads(NUM_THREADS); #pragma omp parallel { int...
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) ...
variational_distance_calculation_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Ruben Zorrill...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
initialize-brisbane.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB SP code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
jinv_ddd_in_h.h
//**************************************************************************************** // // Copyright (c) 2015-2020, Yoshifumi Nakamura <nakamura@riken.jp> // Copyright (c) 2015-2020, Yuta Mukai <mukai.yuta@fujitsu.com> // Copyright (c) 2018-2020, Ken-Ichi Ishikawa <ishikawa@theo.phys.sci.hirosima-u.ac...
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...
linalg.h
/** * Copyright (c) 2020, Massachusetts Institute of Technology, * Cambridge, MA 02139 * All Rights Reserved * Authors: Jingnan Shi, et al. (see THANKS for the full author list) * See LICENSE for the license information */ #pragma once #include <iostream> #include <Eigen/Core> #include <Eigen/SparseCore> #incl...
tree.h
#ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/meta.h> #include <LightGBM/dataset.h> #ifdef USE_PROTO #include "model.pb.h" #endif // USE_PROTO #include <string> #include <vector> #include <memory> namespace LightGBM { #define kMaxTreeOutput (100) #define kCategoricalMask (1) #define kDefaultL...
convolutiondepthwise_5x5_pack4_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 copy ...
omp_master.c
#include <stdio.h> int main() { #pragma omp parallel { #pragma omp master { printf("1.Hello OpenMP\n"); } printf("2.Hello OpenMP\n"); } /* implicit barrier */ return 0; }
convolution_5x5.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 ...
common.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h>...
sparse_matrix_multiplication_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
palindrome_linear.c
#include <ctype.h> #include <omp.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_LEN 32 char dictionary[(1 << 15)][MAX_LEN]; int words_cnt; bool query_string(const char* query) { char reversed[MAX_LEN] = {'\0'}; for (int i = strlen(query) - 1, j = 0; i >= 0; i--...
teams_notarget_get_num_teams.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #define N 10000 #define MAX_TEAMS 64 int main() { int n = N; int team_id, cur_teams; int teams_sizes[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512}; int *a = (int *)malloc(n*sizeof(int)); int err = 0; for (int j = 0; j < 10; j++) { cur_teams = 0...
J2OrbitalSoA.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeongnim ...
kernel.openmp.h
#include <iris/iris_openmp.h> static void saxpy(float* Z, float A, float* X, float* Y, IRIS_OPENMP_KERNEL_ARGS) { size_t i; #pragma omp parallel for shared(Z, A, X, Y) private(i) IRIS_OPENMP_KERNEL_BEGIN(i) Z[i] = A * X[i] + Y[i]; IRIS_OPENMP_KERNEL_END }
geometric_distortion.h
/* * Software License Agreement * * Point to plane metric for point cloud distortion measurement * Copyright (c) 2016, MERL * * All rights reserved. * * Contributors: * Dong Tian <tian@merl.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted pro...
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 // //===---------------------------...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__min_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
hello.c
#include <stdio.h> #include <omp.h> int main(int argc, char *argv[]) { int tid, nthreads; printf("Hello world!\n"); #pragma omp parallel private(tid) shared(nthreads) { tid = omp_get_thread_num(); #pragma omp single nthreads = omp_get_num_threads(); #pragma omp critica...
bug_nested_proxy_task.c
// RUN: %libomp-compile-and-run // The runtime currently does not get dependency information from GCC. // UNSUPPORTED: gcc // REQUIRES: !abt // Very flaky on openmp-clang-x86_64-linux-debian. // https://bugs.llvm.org/show_bug.cgi?id=45397 // UNSUPPORTED: linux #include <stdio.h> #include <omp.h> #include <pthread.h> ...
invert.c
/* Copyright 2016. The Regents of the University of California. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2016 Jon Tamir <jtamir@eecs.berkeley.edu> */ #include <stdlib.h> #include <assert.h> #include <complex.h> #i...
GB_binop__eq_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__bget_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
pi-v21.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 <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You...
shallow_water_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // #ifn...
convolution_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 ...
jacobian_calculation.h
#ifndef JACOBIAN_CALCULATION_H #define JACOBIAN_CALCULATION_H #include "neural_nets\training_options.h" namespace neural_nets { namespace detail { template <typename T, typename sys_type> boost::numeric::ublas::matrix<T> calc_jacobian_numerically(sys_type const &sys_, boost::numeric::ublas::matrix<T> const &inp...
GB_unaryop__lnot_uint16_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...
6319.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/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
Reductions.h
#ifndef _REDUCTIONS_H_ #define _REDUCTIONS_H_ #include <mpi.h> #include <sys/time.h> #include <iostream> #include <iomanip> #include <functional> #include <algorithm> #include <vector> #include <string> #include <sstream> #include "CombBLAS/CombBLAS.h" #include "Glue.h" #include "CCGrid.h" namespace combblas { /...
irbuilder_unroll_partial_heuristic.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=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics #ifnd...
GB_binop__land_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
paddle_tensor_impl.h
// Copyright (c) 2020 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...
convolution_pack8_int8.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 ...
for.c
#include <omp.h> #define N 10 int main (int argc, char * argv[]){ double a[N]; int i; #pragma omp parallel #pragma omp for for(i=0; i<N; i++) a[i] = 0; }