source
stringlengths
3
92
c
stringlengths
26
2.25M
sum_openmp.c
/* Copyright (C) 2021 The Blosc Developers <blosc@blosc.org> https://blosc.org License: BSD 3-Clause (see LICENSE.txt) Example program showing how to operate with compressed buffers. To compile this program for synthetic data (default): $ gcc -fopenmp -O3 sum_openmp.c -o sum_openmp -lblosc2 To run: ...
c-typeck.c
/* Build expressions with type checking for C compiler. Copyright (C) 1987-2020 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, o...
parallel_for_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}} #pragma omp parallel for // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}} #pragma omp parallel for foo void test_no_clause() { int i; #pragma omp paral...
BenchUtils.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * 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. */ #pragma once #include <chrono> #include <vector> #ifdef _OPENMP #include <omp.h> #endif #include "Aligned...
flow_rate_slip_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // #ifndef KRATOS_FLOW_RAT...
c_print_results.c
/*****************************************************************/ /****** C _ P R I N T _ R E S U L T S ******/ /*****************************************************************/ #include <stdlib.h> #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void c_print_results( char *name, ...
GB_unaryop__abs_fp32_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...
lu_decomposition.h
/** * @file lu_decomposition.h * @author [Krishna Vedala](https://github.com/kvedala) * @brief Functions associated with [LU * Decomposition](https://en.wikipedia.org/wiki/LU_decomposition) * of a square matrix. */ #pragma once #include <iostream> #include <valarray> #include <vector> #ifdef _OPENMP #include <...
declare-simd-4.c
/* { dg-do compile } */ /* { dg-options "-fopenmp-simd" } */ #pragma omp declare simd linear(a:1 + b) uniform(b) /* { dg-error ".linear. clause step .b \\+ 1. is neither constant nor a parameter" } */ int f1 (int a, int b); #pragma omp declare simd linear(a:b + 1) uniform(b) /* { dg-error ".linear. clause step .b \\+ ...
partial.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) **************************************...
deconvolution_pack4to1.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 ...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- 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 // //===---------------------------...
GB_unaryop__minv_uint32_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...
BLI_kdopbvh.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 i...
20_omp_priv_combi_nested.c
// clang-format off // RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s // RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s --check-prefix=check-opt // ...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
schedbench.c
/**************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 3.1 * * * * ...
estimator.h
// Copyright (C) 2013 The Regents of the University of California (Regents). // 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...
spmm.h
/*! * Copyright (c) 2020 by Contributors * \file array/cpu/spmm.h * \brief SPMM CPU kernel function header. */ #ifndef DGL_ARRAY_CPU_SPMM_H_ #define DGL_ARRAY_CPU_SPMM_H_ #include <dgl/array.h> #include <dgl/bcast.h> #include <limits> #include <algorithm> namespace dgl { namespace aten { namespace cpu { /*! * ...
gen2DTorus.c
#include "defs.h" #define PARALLEL_SDG /* Set this variable to zero to run the data generator on one thread (for debugging purposes) */ double gen2DTorus(graphSDG* SDGdata) { VERT_T *src, *dest; WEIGHT_T *wt; #ifdef _OPENMP omp_lock_t* vLock; #endif double elapsed_time; int seed; ...
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) / _...
CBasedTraversal.h
/** * @file CBasedTraversal.h * @author C. Menges * @date 26.04.2019 */ #pragma once #include "autopas/containers/cellPairTraversals/CellPairTraversal.h" #include "autopas/utils/ArrayMath.h" #include "autopas/utils/DataLayoutConverter.h" #include "autopas/utils/ThreeDimensionalMapping.h" namespace autopas { /**...
2018-simd2-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_binop__bclr_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-...
ParallelBeginLink.c
int main() { #pragma omp parallel { } }
intruder.c
/* ============================================================================= * * intruder.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
encrypt.c
/************************************************************************************ File: encrypt.c Generates the encrypted page ***********************************************************************************/ #include "pixmap.h" #include <omp.h> void encrypt (unsigned char *v1, unsigned char *v2) { //...
uni_plymc_write.h
/* * plymc.h * filter_plymc * * Created by Paolo Cignoni on 10/23/09. * Copyright 2009 ISTI - CNR. All rights reserved. * */ #ifndef __PLYMC_H__ #define __PLYMC_H__ #ifndef WIN32 #define _int64 long long #define __int64 long long #define __cdecl #endif #include <cstdio> #include <time.h> #include <float.h>...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // // And has the following additional copyright: // // (C) Cop...
core_ztrsm.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 "core_lapack.h" /************************************************************...
kernel1.h
/* #include "worklist.h" #include <vector> #include <set> using namespace std; */ #define MAXCOLOR 128 void FirstFit(int m, int nnz, int *csrRowPtr, int *csrColInd, Worklist &inwl, int *coloring) { unsigned start, end; int ii; start = inwl.start; end = inwl.end; #ifdef ENABLE_OPENMP #pragma omp parallel ...
GB_unaryop__ainv_uint64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
reduction-clauseModificado7.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n=20, a[n],suma=0; if(argc < 2){ fprintf(stderr,"Falta iteraciones\n"); exit(-1); } n = atoi(argv[1]); if(n>20) {n=20; printf("n=%d",n);} for(i=0;i<...
DRB002-antidep1-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
lehmer.c
#if defined(LEHMER) || defined(PRIMESIEVE_STANDALONE) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> /***************************************************************************** * * Lehmer prime counting utility. Calculates pi(x), count of primes <= x. * * Copyright (c) 2012-2013 ...
DRB010-lastprivatemissing-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
spectrum.h
#pragma once #include <boost/array.hpp> #include <cmath> #include <limits> #include <vector> #include "std.h" #include "glm.h" #include <boost/range/irange.hpp> namespace framework { static inline vec3 xyz_to_rgb(const vec3 & xyz) noexcept { return vec3{ 3.240479f * xyz[0] - 1.537150f * xyz[1] - 0.498535...
omp_threadprivate.c
/* * * threadprivate is tested in 2 ways * 1. The global variable declared as threadprivate should have local copy * for each thread. Otherwise race condition for wrong result * 2. if the value of local copy is retained for two adjacent parallel region */ #include "omp_testsuite.h" #include <stdlib.h> #include <s...
omp_parallel_for.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel for directive.</ompts:testdescription> <ompts:ompversion>1.0</ompts:ompversion> <ompts:directive>omp parallel for</ompts:directive> <ompts:dependences></ompts:dependences> <ompts:testcode> #include "omp_testsuite.h" #include <stdio.h> int <ompts:t...
GB_unaryop__lnot_int64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
zq_cnn_convolution_gemm_nchwc_kernel1x1_neon_raw.h
#define __ARMV8 1 static void conv1x1s1_sgemm_transform_kernel_neon(const Mat& _kernel, Mat& kernel_tm, int inch, int outch) { const float* kernel = _kernel; // interleave #if __ARMV8 kernel_tm.create(4 * 8, inch / 4 + inch % 4, outch / 8 + (outch % 8) / 4 + outch % 4); #else kernel_tm.create(4 * 4, inch / 4 + in...
colorspace_ops.h
#ifndef colorspace_ops_h #define colorspace_ops_h #include <aRibeiroCore/aRibeiroCore.h> #include <aRibeiroPlatform/aRibeiroPlatform.h> using namespace aRibeiro; #include <stdint.h> #include <stdlib.h> #include <memory.h> #include <string.h> #if defined(ARIBEIRO_SSE2) #ifdef _MSC_VER //_WIN32 #include <i...
s_aatritemp.h
/* * Mesa 3-D graphics library * Version: 7.0.3 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, ...
scan.c
/** * scan.c * Authors: Yizhao Gao <yizhaotsccsj@gmail.com> * Date: {08/03/2017} */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> void getCCCount4DSph(double * x1, double * y1, double * x2, double * y2, int * nCass, int * nCons, int locCount, double wSize, int wCount, int * casInW, int...
stats.c
//----------------------------------------------------------------------------- // stats.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/20/14 (Build 5.1.001) // 09/15/14 (Build 5.1.007) // 03/19/15 (Build 5.1.008) // 08/01/16 (Build 5.1.011) // ...
Functions.h
// // smarties // Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland. All rights reserved. // Distributed under the terms of the MIT license. // // Created by Guido Novati (novatig@ethz.ch). // #ifndef smarties_Function_h #define smarties_Function_h #include "../../Utils/FunctionUtilities.h" #include "../../Util...
mixedulm_linear_solver.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_...
GB_binop__max_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
interpolation_pl.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
test.c
#include <stdlib.h> #include <check.h> #include <omp.h> START_TEST(omp_parallel_for) {/*{{{*/ int a[128] = {0}; #pragma omp parallel for shared(a) for(int i=0; i<128; i++) { a[i] = i; } int sum = 0; int sum_gold = 0; for(int i=0; i<128; i++) { sum += a[i]; sum_...
sptensor.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "sptensor.h" #include "matrix.h" #include "sort.h" #include "io.h" #include "timer.h" #include <math.h> /******************************...
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...
SpMat.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
mpi_omp_functions.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <limits.h> #include <mpi.h> #include <omp.h> #include "mpi_omp_functions.h" /* Read command line arguments from user and store them to a struct */ void ParseInput(int argc, char **argv, inputArguments *input) { int i; if ...
sse.h
/* SPDX-License-Identifier: MIT * * 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 the rights to use, copy, * modify, merge, publish, ...
VolumetricMaxUnpooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/VolumetricMaxUnpooling.c" #else static inline void THNN_(VolumetricMaxUnpooling_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, THIndex...
GB_unaryop__abs_uint64_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...
mmul.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...
Example_target_ptr_map.3b.c
/* * @@name: target_ptr_map.3b.c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_5.0 */ #define N 100 int x[N], y[N]; #pragma omp declare target int *p1; #pragma omp end declare target int *p2; int foo() { p1 = &x[0]; p2 = &y[0]; // Explicitly map array s...
DRB097-target-teams-distribute-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...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- 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 // //===---------------------------...
prog1.c
/* Copyright (c) 2017 Rob Gillen 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 the rights to use, copy, modify, merge, publish, distribute, subl...
CriticalEndLink.c
int x; int main () { #pragma omp critical { 11; } #pragma omp critical { int x; } }
pxgstrf_scheduler.c
/*! \file Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) All rights reserved. The source code is distributed under BSD license, see the file License.txt at the top-level director...
opencl_odf_fmt_plug.c
/* Modified by Dhiru Kholia <dhiru at openwall.com> for ODF Blowfish format. * * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, a...
runner_openmp.h
//#include <omp.h> /* template<typename ...Args> void Runner<Args...>::run_openmp() { //TODO enable openmp #pragma omp parallel for for(int i =0; i < N;++i) { global_id = i; run_cpu(); } } */ void run_openmp() { #pragma omp parallel for for(int i =0; i < N;++i) { ...
GB_binop__second_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
dynmat.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
GB_unaryop__identity_fp32_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...
residualbased_elimination_builder_and_solver_componentwise.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_RESIDUAL...
mea_pb2_traco.c
#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <omp.h> #include <math.h> #define min(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #define floord(n,d) floor(((double)(n))/((double)(d))) #define ceild(n,d) ce...
depthwise_convolution_3x3_int4.c
/* * Copyright (C) 2016-2022 T-Head Semiconductor Co., Ltd. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * 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 * * www.apache....
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
EmbeddingBag.h
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
sub_model_part_skin_detection_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #if !defined(...
blake2sp-ref.c
/* BLAKE2 reference source code package - reference C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is dist...
host_targ.c
#include <stdio.h> int arr[100]; int nt =12; int main() { #pragma omp target teams distribute parallel for num_threads(nt) for (int i=0; i<100;i++) arr[i] =i; //Verify int errors = 0; for (int i=0; i<100;i++){ if(arr[i] != i) errors++; } if(!errors){ fprintf(stderr, "Success\n"); return 0; ...
fill_r_3c.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...
ams.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) **************************************...
NeuralNetwork_OMP_CPU1.c
/* NEURAL NETWORK OMP CPU1.c * by Lut99 * * Created: * 4/18/2020, 11:25:46 PM * Last edited: * 19/11/2020, 17:10:57 * Auto updated? * Yes * * Description: * The NeuralNetwork class implements a matrix-based Feedforward Neural * Network which is hardcoded to use Mean Squared Error for cost functi...
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, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #ifdef ENABLE_PARS...
pool-split.c
/* This file is part of Primer Pooler (c) Silas S. Brown. For Wen. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law...
example.c
// PWR026: Annotate function for OpenMP offload // https://www.appentra.com/knowledge/checks/pwr026 int foo(int a) { return 2 * a; } void example(int n, int *A) { #pragma omp target teams distribute parallel for for (int i = 0; i < n; i++) { A[i] = foo(i); } }
GB_unop__identity_bool_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
Repulsive_forces.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> double get_walltime() { struct timeval tp; gettimeofday(&tp, NULL); return (double) (tp.tv_sec + tp.tv_usec * 1e-6); } void force_repulsion(int np, const double *pos, double L, double krepulsion, double *force...
isx.c
/* Copyright (c) 2015, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following discla...
GB_atomics.h
//------------------------------------------------------------------------------ // GB_atomics.h: definitions for atomic operations //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
rkb_screen.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
simple_env.c
// RUN: %libomp-compile // RUN: env OMP_DISPLAY_AFFINITY=true OMP_AFFINITY_FORMAT='TESTER-ENV: tl:%L tn:%n nt:%N' OMP_NUM_THREADS=8 %libomp-run | %python %S/check.py -c 'CHECK-8' %s #include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char** argv) { #pragma omp parallel { } #pragma omp par...
GB_unaryop__abs_fp64_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_unop__ainv_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
configurator.c
/* Simple tool to create config.h. * Would be much easier with ccan modules, but deliberately standalone. * * Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license. * * c12r_err, c12r_errx functions copied from ccan/err/err.c * Copyright Rusty Russell <rusty@rustcorp.com.au>. CC0 (Public domain) Lice...
GB_binop__rminus_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
rankktensor.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...
cryptsha512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * based on rawSHA256_fmt.c code and Drepper's spec at * http://www.akkadia.org/drepper/SHA-crypt.txt * * This software is Copyright (c) 2012 magnum, and it is hereby released to the * general public under the following terms: Redistribution and use in s...
main.c
#include <omp.h> #include <stdio.h> #include <stdint.h> #define MAX_N 16 char BLOCK[MAX_N*MAX_N]; inline int abs(int x) { // mask of sign bit uint32_t y = x >> 31; // toggle the sign bit x ^= y; // add 1 if x is negative (2's complement) x += y & 1; return x; } int place(int board[], int...
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...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
threading-multiple.c
#include <omp.h> #include "mpi.h" #include <stdio.h> void compute_row(int row_index, float input[6][8], float output[6][8]) { for (int j = 0; j < 8; j = j + 1) { /* Here is the 5-point stencil */ const int right_column_index = (j + 1) % 8; const int left_column_index = (j + 8 - 1) % 8; ...
lock.c
#include <stdio.h> #include <omp.h> static omp_lock_t lock; int main(int argc, char const *argv[]) { /* code */ omp_init_lock(&lock); #pragma omp parallel for for (size_t i = 0; i < 5; i++) { omp_set_lock(&lock); printf("%d+\n", omp_get_thread_num()); printf("%d-\n", omp_g...