source
stringlengths
3
92
c
stringlengths
26
2.25M
ZBinDumper_MPI.h
/* * ZBinDumper_MPI.h * Cubism * * Created by Panos Hadjidoukas on 3/20/14. * Copyright 2014 CSE Lab, ETH Zurich. All rights reserved. * */ #pragma once #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include "BlockInfo.h" #include "Lossless...
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 ...
GB_unop__identity_uint8_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...
st_up.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> #include "mypng.h" /** * A transform finding the gradient of the steepest upwards tangent at each pixel. * <p> * CODER WARNING: Many of the internal methods use the square of the slope. */ double* inGrey ; int fullWidth ; int f...
diffusion.c
/* * ======================= PGF ==================== * Integrate forward (advection only) by one time step. * ATMS 502 / CSE 566, Spring 2016 * * Arguments: * * q1 real array values at current step * q2 real array values at next step * c real true speed of wave * dx real grid spacing * dt real time step ...
GB_binop__isne_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
syr2k.plutotileparallel.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)) /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <po...
residualbased_block_builder_and_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // ...
CALPHADSpeciesPhaseGibbsEnergyExpansion.h
#ifndef included_CALPHADSpeciesPhaseGibbsEnergyExpansion #define included_CALPHADSpeciesPhaseGibbsEnergyExpansion namespace Thermo4PFM { #ifdef HAVE_OPENMP_OFFLOAD #pragma omp declare target #endif template <typename ScalarType> class CALPHADSpeciesPhaseGibbsEnergyExpansion { public: CALPHADSpeciesPhaseGibbsEner...
tvl1flow_lib.c
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2011, Javier Sánchez Pérez <jsa...
LinkedCellParallelCellLock.h
#pragma once #include <omp.h> #include "physics/Physics.h" #include "physics/variants/LennardJones.h" #include "container/LinkedCell/LinkedCellContainer.h" #include "LinkedCell.h" /** * This class implements the linked cell algorithm in the form of a parallel algorithm that works with locks. * @tparam T The physic...
stresslet_real_rc.c
#include "stresslet_real_rc.h" #ifdef BEENAKKER #include "beenakker_op_fd.h" #else #error "Must provide -D<method> to compiler" #endif #define SWAP(x,y) { tmp=x;x=y;y=tmp; } static void quicksort(int* restrict list, int* restrict slave, int m, int n); static void build_cell_list( // Input const double* ...
pr91920.c
/* PR middle-end/91920 */ void bar (float *); void foo (void) { int i; float f[3] = { 0.0f, 0.0f, 0.0f }; #pragma omp parallel for default(none) reduction(+:f[:3]) for (i = 0; i < 1000; i++) { int j; float k[3] = { 0.25f, 0.5f, 0.75f }; for (j = 0; j < 3; j++) f[j] += k[j]; } bar (f...
core_stslqt.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_ztslqt.c, normal z -> s, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
rose_v1_outer_only.c
/* Only the outmost loop can be parallelized */ #include <omp.h> void foo() { int n = 100; int m = 100; double b[n][m]; int i; int j; #pragma omp parallel for private (i,j) firstprivate (n,m) for (i = 0; i <= n - 1; i += 1) { for (j = 1; j <= m - 1; j += 1) { b[i][j] = b[i][j - 1]; } }...
sm2x2avg_t3_1_1_1.c
#if (LEAF_PHASE_MATRICES_AUTOVECTORIZE) == 1 for(k=0; k != 2; ++k) { #if defined __INTEL_COMPILER __assume_aligned(scat2x2m,64); #pragma vector always #pragma code_align(64) #elif defined __GNUC__ && !defined __INTEL_COMPILER scat2x2m = (std::complex<float>*)__builtin_assume_aligned(scat2...
bias_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
matrix.c
#include "matrix.h" // Documentation for MPC // http://www.multiprecision.org/downloads/mpc-1.2.1.pdf long modd(long A, long B) { if (B == 0) return -1; long k = A/B; long rtn = A - k*B; if (rtn < 0) rtn += B; return rtn; } matrix_t * make_matrix(long col, long row) { matrix_t * rtn = (matrix_t *) malloc(siz...
1d.par.512.c
/*@ begin PerfTuning ( def build { arg command = 'icc'; arg options = '-fast -openmp -I/usr/local/icc/include -lm'; } def performance_counter { arg method = 'basic timer'; arg repetitions = 1; } def performance_params { param T1[] = ...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ChooserDemandCalculator.h
#pragma once #include <cassert> #include <fstream> #include <iostream> #include <random> #include <string> #include "DataStructures/Graph/Graph.h" #include "Tools/CommandLine/ProgressBar.h" #include "Tools/OpenMP.h" #include "Tools/Timer.h" // A travel demand calculator based on repeatedly choosing random sources an...
streaming_find_most_influential.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <ctype.h> #include "functions.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % ...
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) >...
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)...
interp2.c
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * interp2.c * * Code generation for function 'interp2' * */ /* Include files */ #include "interp2.h" #includ...
debug_test_system.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
iochain.c
/* * IOchain - Distribute a chain of dependant IO events amoung threads. * * This file is part of Bitshuffle * Author: Kiyoshi Masui <kiyo@physics.ubc.ca> * Website: http://www.github.com/kiyo-masui/bitshuffle * Created: 2014 * * See LICENSE file for details about copyright and rights to use. * */ #include <...
1.norace2.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp parallel for for (int i = 1; i < N; i++) for (int j = 1; j < N - 1; j++) A[i][j] = A[i][j + 1]; } // CHECK: Region is Data Race Free. // END
GB_unop__conj_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
D-element-to-1-shared.host.c
if (<in0_dimensions> > 0) { // Store the initial value <out0_type> bones_initial_value = <out0_name>[0]; // Create a temporary array to store intermediate data int bones_thread_count = BONES_MIN(omp_get_num_procs(),<in0_dimensions>); <out0_type>* bones_temporary = (<out0_type>*)malloc...
gbdt.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_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2020, Shiqi Yu, all ...
r_direct_o1.c
/* * */ #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include <complex.h> //#include <omp.h> #include "config.h" #include "cint.h" #include "optimizer.h" #include "nr_direct.h" #include "time_rev.h" static void transpose01324(double complex * __restrict__ a, ...
parallelfor.c
#include <omp.h> #define N 10 int main (int argc, char *argv[]) { double a[N], b[N]; int i, sum; // This omp construct is completely eliminated /* #pragma omp parallel for for (i=0; i < N-1; i++) b[i+1] = a[i+1] + 2*i; */ // These nested omp constructs are completely eliminated #pr...
GB_binop__bset_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_unop__exp_fp32_fp32.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...
pfem_2_monolithic_slip_strategy.h
#ifndef KRATOS_PFEM2_MONOLITHIC_SLIP_STRATEGY_H #define KRATOS_PFEM2_MONOLITHIC_SLIP_STRATEGY_H #include "includes/define.h" #include "includes/model_part.h" #include "utilities/openmp_utils.h" #include "processes/process.h" #include "solving_strategies/schemes/scheme.h" #include "solving_strategies/strategies/solving...
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...
GB_unop__log1p_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://...
seqence_data.h
/* Copyright (c) 2019, Sanaxen All rights reserved. Use of this source code is governed by a MIT license that can be found in the LICENSE file. */ #ifndef _SEQUENCE_DATA_H #define _SEQUENCE_DATA_H namespace cpp_torch { namespace test { class SeqenceData { std::vector<tiny_dnn::vec_t> train_labels, test_labe...
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 <plasma_core_blas.h> #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" // for memset function #include ...
viter.c
#include "libimagequant.h" #include "pam.h" #include "viter.h" #include "nearest.h" #include <stdlib.h> #include <string.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_max_threads() 1 #define omp_get_thread_num() 0 #endif /* * Voronoi iteration: new palette color is computed from weighted average of color...
leet_cc_fmt_plug.c
/* Cracker for leet.cc hashes. * * hsh = bin2hex(hash("sha512", $password . $salt, true) ^ hash("whirlpool", $salt . $password, true)) * $salt == username * * Input hash format: username:hash * * This software is Copyright (c) 2016, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the ge...
GB_unop__minv_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
problem14.c
//Benjamin Ford //Problem 14: https://projecteuler.net/problem=14 //gcc -o prob14 problem14.c -lm -fopenmp #include <stdio.h> #include <omp.h> #define limit 10000000 int getSeq(int); int main(int argc, char *argv[]){ int maxValue = 0; int longest = 0; int i = 0; double time0, time1, timeTaken; ...
SpatialConvolutionLocal.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialConvolutionLocal.c" #else static inline void THNN_(SpatialConvolutionLocal_shapeCheck)( THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kH, int kW, int dH, int dW, int padH, int padW, long inputHeight, long...
parallel.h
#pragma once //*************************************** // All the pbbs library uses only four functions for // accessing parallelism. // These can be implemented on top of any scheduler. //*************************************** // number of threads available from OS //template <> static int num_workers(); // id of r...
atomic-2.c
/* { dg-do run } */ /* { dg-options "-O2 -mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ #ifdef __x86_64__ #include "cpuid.h" #endif double d = 1.5; long double ld = 3; extern void abort (void); void test (void) { #pragma omp atomic d *= 1.25; #pragma omp atomic ld /= 0.75; if (d != 1.875 || ld != ...
sync.c
/** * \file * \brief BOMP barrier synchronization microbenchmark */ /* * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, U...
primes.c
#include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> #include <offload.h> const int a = 1; const int b = 3000000; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec + (double)t.tv_usec * 1E-6; } /* * is_prime_number: Returns 1 if n is a prime numbe...
serial_tree_learner.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_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/dataset.h> #include <Ligh...
user_test.c
#include <stdio.h> #include <omp.h> #include <time.h> #include <sys/time.h> #include <unistd.h> #include "buzzLockU.h" #define THREADCOUNT 100 #define GOLD 30 #define BLACK THREADCOUNT-GOLD #define THREADPOOL 5 #define TIMEOUT 10 // in us #define ACTIVITY 5 // in us bzz_t GTLOCK; void thread(){ struct timeval t1,...
GB_binop__bor_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...
pmv-OpenMP-a.c
// gcc -O2 algo.c -o nombre -fopenmp #include <stdlib.h> #include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_num_threads() 1 #endif int main(int argc, char** argv) { int i, j; double t1, t2, total; //Argumento de entrada, N es el número de componentes del vec...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
automine_omp.h
void automine_tc(Graph &g, uint64_t &total) { uint64_t counter = 0; #pragma omp parallel for schedule(dynamic, 1) reduction(+:counter) for (VertexId v0 = 0; v0 < g.V(); v0++) { VertexSet y0 = g.N(v0); for (auto v1 : y0) { VertexSet y1 = g.N(v1); counter += intersection_num(y0, y1); } } ...
DRB021-reductionmissing-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...
target-2.c
extern #ifdef __cplusplus "C" #endif void abort (void); void fn1 (double *x, double *y, int z) { int i; for (i = 0; i < z; i++) { x[i] = i & 31; y[i] = (i & 63) - 30; } } double fn2 (int x) { double s = 0; double b[3 * x], c[3 * x], d[3 * x], e[3 * x]; int i; fn1 (b, c, x); fn1 (e, d...
lis_precon_iluc.c
/* Copyright (C) 2002-2012 The SSI Project. 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, this list of condition...
symm_x_dia_n_hi_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *...
tzetar.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
lap.c
#include <mpi.h> extern int *cn_c; extern int *ce_c; extern int *ec_c; extern int *cn_crem; extern int *ce_crem; extern int *ec_crem; extern int *neighbor_map; extern int *cedge_map; extern int *ecell_map; extern int *neighbor_maprem; extern int *cedge_maprem; extern int *ecell_maprem; extern GVAL **neighbor_2Dbuf; ex...
poly.c
/* poly.c - Polynomial (de)compression routines * * Copyright (c) 2015 Maurizio Tomasi * * 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 limita...
spmv_float.c
////Example of sparse matrix-vector multiply, using CSR (compressed sparse row format). #include <stdio.h> #include <stdlib.h> #include <string.h> // Add timing support #include <sys/timeb.h> #define REAL float double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millit...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2021, Shiqi Yu, all ...
dctz-comp-lib-float.c
/** * @file dctz-comp-lib-float.c * @author Seung Woo Son * @date July 2019 * @brief DCTZ compression library routine for float * (C) 2019 University of Massachuetts Lowell. See LICENSE in top-level directory. */ #include <stdlib.h> #include <memory.h> #include <string.h> #ifdef TIME_DEBUG #include <sys/ti...
GB_memcpy.c
//------------------------------------------------------------------------------ // GB_memcpy: parallel memcpy //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com See GraphBLAS/Doc/L...
hecmw_util.c
/***************************************************************************** * Copyright (c) 2019 FrontISTR Commons * This software is released under the MIT License, see LICENSE.txt *****************************************************************************/ #include <stdio.h> #include <string.h> #include <std...
gpus.c
// Copy of helloworld smoke test to verify compile/link for all GPUs // in the GFXLIST located in aomp_common_vars. #include <stdio.h> #include <omp.h> int main(void) { int isHost = 1; #pragma omp target map(tofrom: isHost) { isHost = omp_is_initial_device(); printf("Hello world. %d\n", 100); for (in...
crossvalidation.h
#ifndef CROSSVALIDATE_H #define CROSSVALIDATE_H //#include<cosan/selection/KFold.h> //#include<cosan/model/AllModels.h> //#include<cosan/utils/CosanMetric.h> #include <variant> #include <vector> #include<cosan/selection/selection.h> namespace Cosan { /* Conduct Cross Validation on a given model Inputs: model: ...
recursiveBinarySearch.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> int binarySearch(int left, int right, int t, int token, int *a); int main() { int i, token, n, t = 2, result, *a; printf("Enter the size of the vector a: "); scanf("%d", &n); a = (int *)malloc(n * sizeof(int)); srand(time(NU...
GridInit.c
#include "XSbench_header.h" // Generates randomized energy grid for each nuclide // Note that this is done as part of initialization (serial), so // rand() is used. void generate_grids( NuclideGridPoint ** nuclide_grids, int n_isotopes, int n_gridpoints ) { for( int i = 0; i < n_isotopes; i++ ) ...
stereo.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "../inc/lodepng.h" //define parameters for the functions #define DISP_VALUE 50 #define WIN_SIZE 5 #define THRESHOLD 12 //define file names of images #define IMG0 "../../data/im0small.png" #define IMG1 "../../data/im1small.png" //gcc -...
parallel_mmul.c
#include <stdio.h> #include "include/Matrix.h" int parallelMatrixMul(Matrix a, Matrix b, Matrix *result) { if (a.columnCount != b.rowCount) { printf("Error: wrong matrix dimensions.\n"); return 1; } #pragma omp parallel for collapse(2) for (int i = 0; i < a.rowCount; ++i) { fo...
vefie.c
/* Methods related to creating and solving the VEFIE. Copyright 2015 Ian Kavanagh 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 ...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <rabit/rabit.h> #include <cstring> #include <memory> #include <numeric> #include <al...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "aux.h" #include "omp.h" #define MAX_THREADS 8 #define MAXIT 1000000 double sequential_minimization(double s, int p, double x0, double y0); double parallel_minimization(double s, int p, double x0, double y0); int main(int argc, char **argv){ long ...
calc.c
/** * Copyright (c) 2005,2010 Yury Mishin <yury.mishin@gmail.com> * See the file COPYING for copying permission. * * $Id$ */ #include <string.h> #include <math.h> #include <omp.h> #include "common.h" #include "vector.h" #include "kernel.h" #include "eos.h" #include "calc.h" /*********************...
plusplus-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...
singlenode_apply.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
DRB043-adi-parallel-no.c
/** * adi.c: This file is part of the PolyBench/C 3.2 test suite. * * Alternating Direction Implicit solver: * * 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> #in...
MkBase.h
#ifndef MkBase_h #define MkBase_h #include "Matrix.h" #include "PropagationMPlex.h" namespace mkfit { //============================================================================== // MkBase //============================================================================== class MkBase { public: MPlexLS Err[2...
weightedInnerProdMany.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...
4.race2.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 4 int main() { int A[N][N][N][N][N][N][N][N][N]; for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) for (int k = 1; k < N; k++) for (int l = 1; l < N; l++) for (int m = 1; m < N; m++) for (int n ...
omp_hello.c
/****************************************************************************** * FILE: omp_hello.c * DESCRIPTION: * OpenMP Example - Hello World - C/C++ Version * In this simple example, the master thread forks a parallel region. * All threads in the team obtain their unique thread number and print it. * The m...
nvptx_device_math_functions.c
// Test calling of device math functions. ///==========================================================================/// // REQUIRES: nvptx-registered-target // RUN: %clang_cc1 -x c -internal-isystem %S/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s...
rom_builder_and_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // ...
do_data_tstep.c
/* ** NAME do_data_tstep -- run model for 1 data timestep between 2 input records ** ** SYNOPSIS ** #include "snobal.h" ** ** int ** do_data_tstep(void) ** ** DESCRIPTION ** This routine performs the model's calculations for 1 data timestep ** between 2 input-data records which are in 'input_rec1' and **...
bmesh_interp.c
/* * ***** BEGIN GPL LICENSE BLOCK ***** * * 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 d...
displacement_op_opencl.h
// // // ----------------------------------------------------------------------------- // // // // Copyright (C) The BioDynaMo Project. // // 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. // // // /...
3794.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...
IOLayersRules.h
// Copyright 2016-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #ifndef INPUTLAYER_H #define INPUTLAYER_H // Rulebook Format // rules[0][0] == mode // rules[0][1] == maxActive per s...
matrix_op-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
questao01.c
#include <stdio.h> #include <stdlib.h> #include "omp.h" int valida_primo(int numero); int main() { int i, inicio = 10000; int entrada, qtd_primos_encontrados = 0; int *numeros; int sum_s = 0, sum_p = 0; double t1_s, t2_s, t1_p, t2_p; printf("Informe um numero inteiro positivo: "); scanf("%d", &entrada)...
for-9.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-ompexp" } */ /* LLVM LOCAL test not applicable */ /* { dg-require-fdump "" } */ extern void bar(int); void foo (int n) { int i; #pragma omp for schedule(guided) ordered for (i = 0; i < n; ++i) bar(i); } /* { dg-final { scan-tree-dump-times "GOM...
pdgeqrf.c
/** * * @file pdgeqrf.c * * PLASMA auxiliary routines * PLASMA is a software package provided by Univ. of Tennessee, * Univ. of California Berkeley and Univ. of Colorado Denver * * @version 2.6.0 * @author Jakub Kurzak * @author Hatem Ltaief * @author Mathieu Faverge * @date 2010-11-15 * @generated d Tu...
tentusscher_epi_2004_S1_2.c
#include <assert.h> #include <stdlib.h> #include "tentusscher_epi_2004_S1_2.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; } SET_ODE_INITIAL_CONDITIONS_CPU(se...