source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unaryop__minv_uint8_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...
yolov2_forward_network.c
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h // softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h #define GEMMCONV /* // from: box.h typedef struct { float x, y, w, h; } box; ...
vars1-omp.c
#include <stdio.h> #include <omp.h> int gvar = 12345; int main( int argc, char **argv ) { #pragma omp parallel { gvar = omp_get_thread_num(); #pragma omp barrier printf( "[%d] gvar=%d\n", omp_get_thread_num(), gvar ); } return 0; }
ompfor-decremental.c
/* * default, decremental */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int foo(int lower, int upper, int stride) { int i; #pragma omp for for (i=lower;i>upper;i-=stride) { printf("Iteration %2d is carried out by thread %2d\n",\ i, omp_get_thread_num()); } } int main(void) { #prag...
cg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - CG This benchmark is an OpenMP C version of the NPB CG code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS. ...
vq_train.c
/*Daala video codec Copyright (c) 2012-2014 Daala project contributors. 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 l...
GB_unop__cosh_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
1d.par.256.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[] = [1]; pa...
GB_subassign_06n.c
//------------------------------------------------------------------------------ // GB_subassign_06n: C(I,J)<M> = A ; no S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See Gra...
yescrypt-opt_c.h
/*- * Copyright 2009 Colin Percival * Copyright 2013,2014 Alexander Peslyak * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copy...
vtp_fmt_plug.c
/* * Cracker for MD5 based authentication in VTP. * * This software is Copyright (c) 2014 Alexey Lapitsky <lex at * realisticgroup.com> and Dhiru Kholia <dhiru at openwall.com>, and it is * hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, wit...
tensor_cpu-inl.h
/*! * Copyright (c) 2014 by Contributors * \file tensor_cpu-inl.h * \brief implementation of CPU host code * \author Bing Xu, Tianqi Chen */ #ifndef MSHADOW_TENSOR_CPU_INL_H_ #define MSHADOW_TENSOR_CPU_INL_H_ #include <cstring> #include <functional> #include <utility> #include <vector> #include "./base.h" #includ...
DRB088-dynamic-storage-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...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 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 c...
SpatialMaxPooling.c
#include <math.h> #include "../thnets.h" static void nn_SpatialMaxPooling_updateOutput_frame(float *input_p, float *output_p, long nslices, long iwidth, long iheight, long owidth, long oheight, int kW, int kH, int dW, int dH, int padW, int padH) { long k; #pragma omp parallel for private(k) for (k = 0; k < nsli...
serialized.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc, icc-19 #include "callback.h" int main() { #pragma omp target teams num_teams(1) thread_limit(1) #pragma omp parallel num_threads(1) { printf("In teams\n"); } return 0; } // CHECK: 0: NULL_POINTER=[[NULL:.*$]] // CHECK-NOT: 0: p...
bezier_classical_post_utility.h
// // Project Name: Kratos // Last Modified by: $Author: hbui $ // Date: $Date: 2013-10-12 $ // Revision: $Revision: 1.0 $ // // #if !defined(KRATOS_BEZIER_CLASSICAL_POST_UTILITY_H_INCLUDED ) #define KRATOS_BEZIER_CLASSICAL_POST_UTILITY_H_INCLUDED // System includes #inclu...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
nqueens-openmp.c
//# 601 west second street, 2nd floor, elevator B, two rights #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <math.h> #include <unistd.h> void print_board(int n, char *board){ for (int r = 0; r < n; r++) { for (int c = 0; c < n; c++) { printf("%c ", board[r*n+c]); } ...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
residual_based_adjoint_static_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #if !defined(KRATOS_RESIDUAL_BASED_ADJOINT_STATI...
morn_image_shape.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; 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 wri...
DRB112-linear-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...
GB_unaryop__identity_bool_int32.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__one_uint16_uint16.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...
labyrinth.c
/* ============================================================================= * * labyrinth.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * ======================================...
filter_2d.h
#pragma once #include <initializer_list> #include <vector> #include "numerics.h" #include "image.h" namespace harris { // 2d cross-correlation kernel used in the Filter2d function class FilterKernel { public: // Rule of five: moveable and copyable FilterKernel(const FilterKernel&) = default; FilterKerne...
r_ao2mo.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
GB_unaryop__identity_uint64_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...
Host.c
#include "Sync.h" #define checkCuda(error) __checkCuda(error, __FILE__, __LINE__) //////////////////////////////////////////////////////////////////////////////// // A method for checking error in CUDA calls //////////////////////////////////////////////////////////////////////////////// inline void __checkCuda(cudaE...
not_enough_threads.c
// RUN: %libomp-compile && env OMP_THREAD_LIMIT=2 %libomp-run | FileCheck %s // RUN: %libomp-compile && env OMP_THREAD_LIMIT=2 %libomp-run | %sort-threads \ // RUN: | FileCheck --check-prefix=THREADS %s // REQUIRES: ompt #include "callback.h" int main() { #pragma omp parallel num_threads(4) { print_ids(0);...
mapped_im2col.h
#ifndef MAPPED_IM2COL_H_ #define MAPPED_IM2COL_H_ #include <omp.h> #include <torch/extension.h> #include "common/mapped_im2col.h" namespace spherical { namespace cpu { template <typename T> void MappedIm2Col2D(const int64_t num_kernels, torch::Tensor data_im, torch::Tensor sample_map, // OH, O...
declare_mapper_messages.c
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s int temp; // expected-note {{'temp' declared here}} struct vec { // expected-note {{definition of 'struct vec' is not complete until the cl...
feature.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
kronecker.c
#include <stdio.h> #include <omp.h> #include <math.h> #include <complex.h> void kronecker(int *a, int *b, int *c, size_t m1, size_t n1, size_t m2, size_t n2) { #pragma omp parallel for for (size_t j1 = 0; j1 < m1; ++j1) { size_t j1n1m2n2 = j1 * n1 * m2 * n2; for (size_t i1 = 0; i1 < n1; +...
is.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - IS This benchmark is an OpenMP C version of the NPB IS code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
cloud.c
#include <string> #include <iostream> #include <algorithm> #include <utility> #include <tfhe/tfhe.h> #include <tfhe/tfhe_io.h> #include <stdio.h> #include <time.h> #include <vector> #include <cassert> #include <sys/time.h> #include <omp.h> #include <fstream> using namespace std; ifstream read; #define T_FILE "averages...
sparseMath.c
/// \file /// Sparse matrix functions. #include "sparseMath.h" #include <stdio.h> #include <string.h> #include <math.h> #include <omp.h> #include "sparseMatrix.h" #include "parallel.h" #include "constants.h" // \details // Sparse matrix multiply X^2 void sparseX2(real_t* trX, real_t* trX2, struct SparseMatrixSt* xm...
convolution_winograd_dot_pack4.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 ...
LAGraph_Sort1.c
//------------------------------------------------------------------------------ // LAGraph_Sort1: sort a list of integers //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Identifier: BSD-2-Clause // ...
softmax-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 ...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
rnn_helpers.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifdef _WIN32 #pragma warning(disable : 4267) #endif #include <algorithm> #include <functional> #include <future> #include <string> #include <vector> #include "gsl/span" #include "gsl/gsl_algorithm" #includ...
GB_reduce_each_index.c
//------------------------------------------------------------------------------ // GB_reduce_each_index: T(i)=reduce(A(i,:)), reduce a matrix to a vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // ...
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)...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
symmetry.c
/* symmetry.c */ /* Copyright (C) 2008 Atsushi Togo */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include "cell.h" #include "debug.h" #include "lattice.h" #include "mathfunc.h" #include "pointgroup.h" #include "primitive.h" #include "symmetry.h" #include "debug.h" #define NUM_ATOMS_CRITERION_FOR_OPENMP...
filter.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #include <stdint.h> #include <string.h> #ifndef IMG_SIZE #define IMG_SIZE 1024*32-2 #endif #ifndef NUM_THREADS #define NUM_THREADS 8 #endif typedef struct { unsigned int width; unsigned int height; unsigned int internalWidth; unsigned int in...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "gesummv.h" /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /*...
libreduce.c
/* * Library to use openmp parallel region and dlopen() in init * constructor. * * Copyright (c) 2019, Rice University. * See the file LICENSE for details. * * Mark W. Krentel * August 2019 */ #include <sys/types.h> #include <dlfcn.h> #include <err.h> #include <errno.h> #include <signal.h> #include <std...
rawMD4_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2010 by Solar Designer * Copyright (c) 2011, 2012 by magnum * * Use of Bartavelle's mmx/sse2/intrinsics and reduced binary size by * magnum in 2011-2012. * * OMP added May 2013, JimF */ #if FMT_EXTERNS_H extern struct fmt_main fmt_raw...
sum_v1.c
/* * Assignment 2 (CSE436) * Kazumi Malhan * 06/08/2016 * * Sum of A[N] */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm ...
grid_ao_drv.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
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...
lis_matvec_bsr.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...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
ipw_dim_red_parallel.c
// ------------------------------------------------------------------------ // // This file is part of SDRcausal. // // SDRcausal 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 ve...
DRB011-minusminus-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...
GB_binop__plus_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
rotpar.c
/* * gcc rotpar.c -fopenmp -o rotpar */ /****************************************************************************************** ** CABEÇALHO ******************************************************************************************/ #include "stdio.h" #include "fifo.c" #inclu...
omp-unique-threadid.c
/***************************************************************************************** Example 1.1 : omp-unique-threadid.c Objective : Write a simple OpenMP program to print unique number for each thread started by the #pragma parallel. This ...
omp_bug2.c
/****************************************************************************** * FILE: omp_bug2.c * DESCRIPTION: * Another OpenMP program with a bug. * AUTHOR: Blaise Barney * LAST REVISED: 04/06/05 ******************************************************************************/ #include <omp.h> #include <stdio.h> #i...
ast-dump-openmp-target-teams-distribute.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp target teams distribute for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target teams distribute for...
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 ...
rotLibIDLLoopsFlt.c
# include "rotLibIDLLoopsFlt.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #ifdef _OPENMP #include <omp.h> #define OPENMPLIMIT 100000l #endif #include "rotationLibCDbl.h" int ax2cuLoopf (float* ax, float* cu, unsigned long long n, int p){ int trash; unsigned long long j, i, iIn, iOut, axste...
DOMINOSEC_fmt_plug.c
/* * DOMINOSEC_fmt.c (version 3) * * Notes/Domino More Secure Internet Password module for Solar Designer's JtR * by regenrecht at o2.pl, Dec 2005. * Algorithm discovery by regenrecht at o2.pl, bartavelle at bandecon.com. * * Short description. * 1. Make 128bit digest of key. (128/8=16 bytes) * 2. Do bin2hex()...
hnsw.h
// Copyright 2017 Kakao Corp. <http://www.kakaocorp.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 License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
init_state_setter.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* In this file, the initial state of the simulation is read in from a netcdf file. */ #include <stdio.h> #include <stdlib.h> #incl...
GB_unaryop__ainv_int64_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
transformfxd-impl.h
//================================================================================== // BSD 2-Clause License // // Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors // // All rights reserved. // // Author TPOC: contact@openfhe.org // // Redistribution and use in source and binary forms, wi...
GB_unop__identity_int64_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_unaryop__abs_int32_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...
resample.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
SparseMatrix.h
#pragma once #include <Matrix.h> #include <algorithm> #include <utility> namespace freeaml { /** * @brief @c SparseMatrix<T> is a class suited for representing sparse matrices. * * This class stores a matrix of elements of type @c T. It overloads the * addition (+), subtraction (-), multiplication (*) and divisio...
residual_based_pseudo_static_displacement_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_RESIDUAL_PSEUDO_STATIC_DISPLACEMENT_SCHEME ) #de...
test3.c
int main() { int x; #pragma omp parallel { 0; int p; if (1) { 2; if (3) { #pragma omp atomic write x = 0; 4; #pragma omp barrier 5+x; } else { x=6; #pragma omp barrier 7+x; } x= 8; } else { 9+x; if (x+10) { x=11; #pragma omp barrier x=12+x; } else { 13+x...
GB_subassign_zombie.c
//------------------------------------------------------------------------------ // GB_subassign_zombie: C(I,J)<!,repl> = empty ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Iden...
numint_uniform_grid.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
bins_dynamic_objects.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Nelson Lafontaine // ...
relu_hcl_arm.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 ma...
core_ztsmqr.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" #include <omp.h> /********************...
Simpson.c
/** Simpson rule for Numerical Integration https://rosettacode.org/wiki/Numerical_integration @file Simpson.cpp */ #include "Simpson.h" //SIMPSON-Serial double simpson(double from, double to, double n, double (*func)()) { double h = (to-from)/n; double sum1 = 0.0; double sum2 = 0.0; int i; for(i = 0;i...
ten_tusscher_2004_RS_CPU_epi_S3.c
// Ten Tusscher version for the Scenario 3 (AP + max:dvdt + Rd) //AP+Rd+Vmax:3obj: Tr2,pop41, //Error:0.237161115433174,0.000785891679072392,0.000207784955952597 (calculated Rc=0.00523558046455782) //GNa,GNab,GCaL,GCab,Gto,GKr,GKs,GK1,Gpk,PNak,KNaCa,Vmax_up,GpCa,arel,crel,Vleak, //parameters: 14.4350685070016 3.577026...
eff.c
#if (defined(_OPENMP) || defined(SPEC_OPENMP)) && !defined(SPEC_SUPPRESS_OPENMP) && !defined(SPEC_AUTO_SUPPRESS_OPENMP) # undef OPENMP # define OPENMP #else # undef OPENMP #endif /* * eff.c: implement energy subroutines for 3 or 4 cartesian coordinates. * * Parallelization via OpenMP, creation of pair lists using a...
arm_device.h
#ifndef ANAKIN2_SABER_ARM_DEVICES_H #define ANAKIN2_SABER_ARM_DEVICES_H #include <stdio.h> #include <vector> #include "device.h" #ifdef PLATFORM_ANDROID #include <sys/syscall.h> #include <unistd.h> #define __NCPUBITS__ (8 * sizeof (unsigned long)) #define __CPU_SET(cpu, cpusetp) \ ((cpusetp)->mask_bits[(cpu) / _...
bucketsort.c
#include <fcntl.h> #include <float.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <time.h> #include <omp.h> #include "bucketsort.h" ////////////////////////////////////////////////////////////////////////////////...
pado_weighted_unv_para.h
/* * pado.h * * Created on: Dec 18, 2018 * Author: Zhen Peng * Modified: 02/24/2019: change weight type from 8-bit int to 32-bit int. */ #ifndef INCLUDES_PADO_WEIGHTED_PARA_UNV_H_ #define INCLUDES_PADO_WEIGHTED_PARA_UNV_H_ #include <vector> #include <unordered_map> #include <map> #include <algorithm> #...
ICP.h
/////////////////////////////////////////////////////////////////////////////// /// "Sparse Iterative Closest Point" /// by Sofien Bouaziz, Andrea Tagliasacchi, Mark Pauly /// Copyright (C) 2013 LGG, EPFL /////////////////////////////////////////////////////////////////////////////// /// 1) This file contains ...
omp_parallel_for_private.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel for private directive.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp parallel for private</ompts:directive> <ompts:dependences>omp parallel for reduction,omp flush</ompts:dependences> <ompts:testcode> #include...
bm2d.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <sys/time.h> #include "homp.h" #include "bm2d.h" /* 2D/3D stencil computation, take a maxwin sized coefficient matrix, and apply stencil computation to a matrix * The stencil could be cross-based, which only uses neighbors from one dim...
matmul.c
#include <stdlib.h> #include <sys/time.h> #include <stdio.h> #if OMP == 1 #include <omp.h> #endif #include <resilience.h> #ifndef ENABLE_OPENACC #define ENABLE_OPENACC 1 #endif #ifndef _N_ #define _N_ 512 #endif #define ITER 10 int N = _N_; int M = _N_; int P = _N_; double my_timer () { struct timeval time; ...
ScatterHelper.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
gbdt.h
#ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include <LightGBM/prediction_early_stop.h> #include <LightGBM/json11.hpp> #include "score_updater.hpp" #include <cstdio> #include <vector> #include <string> #include <fstream> ...
cancel-taskgroup-2.c
/* { dg-do run } */ /* { dg-set-target-env-var OMP_CANCELLATION "true" } */ #include <stdlib.h> #include <unistd.h> #include <omp.h> int main () { #pragma omp parallel #pragma omp taskgroup #pragma omp task { #pragma omp cancel taskgroup if (omp_get_cancellation ()) abort (); } #pragma omp p...
pr94874.c
/* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-gimple" } */ #include <stddef.h> size_t vla (int array_li) { float array[array_li]; size_t size1, size2; #pragma omp parallel default(none) shared(size1, array) size1 = sizeof array; #pragma omp target defaultmap(none) map(from:size2) map(alloc:a...
spmm_hicoo_sks_mat.c
/* This file is part of ParTI!. ParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
nbody.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #define SOFTENING 1e-9f typedef struct { float x, y, z, vx, vy, vz; } Particle; void randomizeBodies(float *data, int n) { for (int i = 0; i < n; i++) { data[i] = 2.0f * (rand() / (float)RAND_MAX) - 1.0f; } } void bodyForce(Particle...
diffusion_omp.h
// // diffusion.h // // // Created by Ibrahim Harrane on 11/05/2016. // // #ifndef diffusion_h #define diffusion_h /* * * L: Desired parameter lenght * N: Number of nodes * K: Number of iterations * * * A: N x N * C: N x N * w_0 L x N * u L x N x K * d ...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "dark_cuda.h" #include "box.h" #include "http_stream.h" #include <stdio.h> #include <stdlib.h> #include <string.h> extern int check_mistakes; #define NUMCHARS 37 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { ...