source
stringlengths
3
92
c
stringlengths
26
2.25M
SoaDistanceTableBA.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeongnim ...
psr_profile.c
/***************************************************************************** * PSRGEOM * Sam McSweeney, 2018 * * This program attempts to simulate the profile as observed from a pulsar * with given angles α and ζ, period P, and frequency range f1 to f2. * * For each sampled field line, the line is followed out...
fac_amr_fcoarsen.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
LAGraph_SortByDegree.c
//------------------------------------------------------------------------------ // LAGraph_SortByDegree: sort a graph by its row or column degree //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Iden...
utilities.c
// // MIT license // // Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limit...
an9-stream.c
/* * Copyright (c) 2017, Cray Inc. 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 conditions and ...
client_utils.h
// Copyright (c) 2020 - present Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the r...
assign_1.c
// // Created by nick on 1/30/18. // #include "limits.h" #include "stdio.h" #include "stdlib.h" #include "memory.h" #include "omp.h" #include <sys/time.h> // ======== Defines for the entire project ========= // Getting the value of the macro as a string #define STR(name) #name #define MACRO_VALUE(name) STR(name) // D...
GB_unaryop__minv_uint16_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_FaceDatabaseCompact.h
#ifndef _ZQ_FACE_DATABASE_COMPACT_H_ #define _ZQ_FACE_DATABASE_COMPACT_H_ #pragma once #include <malloc.h> #include <stdio.h> #include <vector> #include <omp.h> #include "ZQ_FaceRecognizerSphereFace.h" #include "ZQ_MathBase.h" #include "ZQ_MergeSort.h" namespace ZQ { class ZQ_FaceDatabaseCompact { enum CONST_VAL ...
phostone.c
// Normal compile // Intel: // mpiicc -qopenmp phostone.c -o phostone // gcc: // mpicc -qopenmp phostone.c -o phostone // // To compile without openmp // Intel: // mpiicc -qopenmp-stubs phostone.c -o purempi // gcc: // mpicc -DSTUBS phostone.c -o purempi // // #include <ctype.h> #include <math.h> #include <mpi...
par_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
GB_unop__log_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
bml_scale_csr_typed.c
#include "../../typed.h" #include "../blas.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_parallel.h" #include "../bml_scale.h" #include "../bml_types.h" #include "bml_allocate_csr.h" #include "bml_copy_csr.h" #include "bml_scale_csr.h" #include "bml_types_csr.h" #include <stdlib.h> #inclu...
dropout-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 ...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
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. // //===-------------------------------------------------------...
parallel_iter.c
#include<stdio.h> #include<stdlib.h> #include<time.h> #include<omp.h> #include<math.h> #include<string.h> #define constant 6.28318530718 #define CLK CLOCK_MONOTONIC struct timespec diff(struct timespec start, struct timespec end){ struct timespec temp; if((end.tv_nsec-start.tv_nsec)<0){ temp.tv_sec = end.tv_sec-st...
TemporalMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/TemporalMaxPooling.c" #else static inline void THNN_(TemporalMaxPooling_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, THIndexTensor *indic...
GxB_Scalar_wait.c
//------------------------------------------------------------------------------ // GxB_Scalar_wait: wait for a scalar to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier:...
loops.h
// Cuda/host loops #pragma once #include "cutil.h" #include "debug.h" #include "preprocessor.h" #include "print.h" #include <optional> #include <type_traits> #ifndef __APPLE__ #include <omp.h> #endif namespace mandelbrot { using std::is_signed_v; using std::optional; using std::tuple; // For now, assume we fit in in...
yescrypt-opt.c
/*- * 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...
sxc_fmt_plug.c
/* SXC cracker patch for JtR. Hacked together during Summer of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and b...
@mropes.nim.c
/* Generated by Nim Compiler v1.0.11 */ /* (c) 2019 Andreas Rumpf */ /* The generated code is subject to the original license. */ #define NIM_INTBITS 64 #include "nimbase.h" #include <string.h> #include <stdio.h> #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef li...
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 ...
openmp-ex06.c
#include <stdio.h> #include <unistd.h> #include <omp.h> int main(void) { int num_threads, my_thread; num_threads = omp_get_num_threads(); my_thread = omp_get_thread_num(); printf ("\"You're all individuals!\" said %d of %d.\n", my_thread, num_threads); /* You can also declare private variable(s) that sha...
GrB_Matrix_wait.c
//------------------------------------------------------------------------------ // GrB_Matrix_wait: wait for a matrix to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier:...
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...
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: ...
GB_unop__identity_int64_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
NETSPLITLM_fmt_plug.c
/* * NETHALFLM_fmt.c * Written by DSK (Based on NetLM/NetNTLM patch by JoMo-Kun) * Performs brute-force cracking of the HalfLM challenge/response pairs. * * Modified for performance and OMP support by magnum 2011 * * Storage Format: * domain\username:::lm response:nt response:challenge * * NOTE, in loader.c,...
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...
GB_binop__first_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-...
django_fmt_plug.c
/* Django 1.4 patch for JtR. Hacked together during May of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binar...
rose_v1_accumulateForce.c
#include <omp.h> void AccumulateForce(int *idxBound,int *idxList,int len,double *tmp,double *force) { for (register int ii = 0; ii <= len - 1; ii += 1) { int count = idxBound[ii + 1] - idxBound[ii]; int *list = &idxList[idxBound[ii]]; double sum = 0.0; #pragma omp parallel for reduction (+:sum) fir...
GB_binop__lor_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-...
pooling_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...
MathTools.h
/** * * \copyright * Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * */ #pragma once #include <cstddef> #ifdef _OPENM...
TGV_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC * * Copyright 2019 Daniil Kazantsev * Copyright 2019 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (the "License")...
ft_ao.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 ...
openmp_ctx.h
#ifndef MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #define MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #include <omp.h> namespace mobula { #define KERNEL_RUN(a, n) (a) template <typename Func> MOBULA_DEVICE void parfor(const int n, Func F) { #pragma omp parallel for for (int i = 0; i < n; ++i) { F(i); } } } // namespace mobul...
agmgMatrices.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus, Rajesh Gandham 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 w...
ast-dump-openmp-parallel.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(void) { #pragma omp parallel ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp...
imd_main_risc_2d.c
/****************************************************************************** * * IMD -- The ITAP Molecular Dynamics Program * * Copyright 1996-2011 Institute for Theoretical and Applied Physics, * University of Stuttgart, D-70550 Stuttgart * **************************************************************************...
eam.c
/******************************************************************************* Copyright (c) 2016 Advanced Micro Devices, Inc. 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 so...
fast_gaussian_blur_template.h
// Copyright (C) 2017-2022 Basile Fraboni // Copyright (C) 2014 Ivan Kutskir (for the original fast blur implmentation) // All Rights Reserved // You may use, distribute and modify this code under the // terms of the MIT license. For further details please refer // to : https://mit-license.org/ // //#pragma once #incl...
GB_binop__islt_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
irbuilder_unroll_partial_heuristic_constant_for.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics // RE...
fixed_version.c
#include<stdio.h> int main(){ int T[10]; // initializing array T using openmp #pragma omp parallel for shared(T) for ( int i = 0; i < 10; i ++) { T[i] = i; } }
llg.c
#include "common_clib.h" /* The right hand side of the LLG equation for the CVOde solver. This can be * used both for the micromagnetic and atomistic codes since m or S are unitless * and the prefactors keep the same structure. * * The LLG equation has the structure: * ( * is for dot or scalar product) * * ...
GB_binop__times_int8.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_nvec_nonempty.c
//------------------------------------------------------------------------------ // GB_nvec_nonempty: count the number of non-empty vectors //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Id...
graph_generator.c
/* Copyright (C) 2009-2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
GB_unaryop__ainv_uint64_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...
matrixstrassen.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...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
bml_normalize_ellpack_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_normalize.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_add_ellpack.h" #include "bml_allocate_ellpack.h" #include "bml_normalize_ellpack.h" #include "bml_scale_ellpack.h" #include "bml_types_ellpac...
GB_unop__identity_int32_int64.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...
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 // //===---------------------------...
scattering.c
/****************************************************************************** * * * SCATTERING.C * * * ...
mandelbrot-parallel.c
// // mandelbrot.c // // // The Mandelbrot calculation is to iterate the equation // z = z*z + c, where z and c are complex numbers, z is initially // zero, and c is the coordinate of the point being tested. If // the magnitude of z remains less than 2 for ever, then the point // c is in the Mandelbrot set. In ...
GB_binop__bset_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
api_test.c
#include "ctest/ctest.h" #include "splatt_test.h" #include "../src/sptensor.h" /* API includes */ #include "../include/splatt.h" #ifdef _OPENMP #include <omp.h> #endif CTEST_DATA(api) { splatt_idx_t ntensors; sptensor_t * tensors[MAX_DSETS]; }; CTEST_SETUP(api) { data->ntensors = sizeof(datasets) / sizeof...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
GB_binop__le_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__bxnor_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
boundary_mask_mex.c
#include <inttypes.h> #include <omp.h> #include "mex.h" #include "boundary_mask_mex.h" void boundary_mask(uint8_t *B, const uint8_t *G, const size_t *sz); #ifdef BOUNDARY_MASK_MEX void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { if ((nrhs != 2) || (nlhs > 1)) { mexErrMsgTxt...
truedepsingleelement-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...
Mrpt.h
#ifndef CPP_MRPT_H_ #define CPP_MRPT_H_ #include <algorithm> #include <cmath> #include <functional> #include <map> #include <numeric> #include <random> #include <set> #include <stdexcept> #include <string> #include <utility> #include <vector> #include <Eigen/Dense> #include <Eigen/SparseCore> struct Mrpt_Parameters ...
tabu_search.h
/*****************************************************************************/ // Copyright (c) 2020-2021 Yuji KOGUMA // Released under the MIT license // https://opensource.org/licenses/mit-license.php /*****************************************************************************/ #ifndef PRINTEMPS_SOLVER_TABU_SEARCH...
GB_binop__band_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
ex02.c
/* Copyright (c) 2019 CSC Training */ /* Copyright (c) 2021 ENCCS */ #include <stdio.h> #include <math.h> #define NX 102400 int main(void) { double vecA[NX],vecB[NX],vecC[NX]; double r=0.2; /* Initialization of vectors */ for (int i = 0; i < NX; i++) { vecA[i] = pow(r, i); vecB[i] = 1.0; } /* dot p...
alignment.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
par_mod_lr_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
jacobi-avx-peel.c
#include <immintrin.h> // Jacobi stencil // AVX intrinsics + manual peeling + streaming stores // typedef double adouble __attribute__ ((aligned(16))); inline void kernel(adouble* v1, adouble * v2, int m) { __m256d alpha = _mm256_set1_pd(0.25); // __m256d phi_e = _mm256_loadu_pd (v1 + 1 ); __m256d phi_w = _mm256...
OMP.c
#define CHUNK 1024*1024 // Run CHUNK iterations and check error #define LOG 1024 // Print progress each LOG iterations #define LIMIT 1024*1024 // LIMIT of iterations #include "../common.h" int main(int argc, char *argv[]) { unsigned int digits; unsigned int threads; double precision; getParams(argc, a...
dynamic_enough_threads.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" int main() { omp_set_dynamic(1); #pragma omp parallel num_threads(4) { print_ids(0); print_ids(1); } print_fuzzy_address(1); // Check if libomp supports the callbacks for this test. // CHECK-NOT: {{^}}0: Coul...
DRB057-jacobiinitialize-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...
sparselu.balance.c
#include "hclib.h" #include <omp.h> int ____num_tasks[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite ...
fitzhugh_1961.c
#include "fitzhugh_1961.h" GET_CELL_MODEL_DATA(init_cell_model_data) { 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(set_model_initial_conditions_cpu) { sv[0] = 0.000000f; //V millivolt ...
matrixmultiply-ompacc.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #define N 1024 #define M 1024 #define K 1024 #define REAL float int i,j,k; REAL a[N][M],b[M][K],c[N][K], c2[N][K]; int init(); int mmm(); int mmm2(); int verify(); int main(void) { init(); mmm(); ...
DRB055-jacobi2d-parallel-no.c
/** * jacobi-2d-imper.c: This file is part of the PolyBench/C 3.2 test suite. * Jacobi with array copying, no reduction. * * 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 <st...
opencl_keychain_fmt_plug.c
/* * Modified by Dhiru Kholia <dhiru at openwall.com> for Keychain format. * * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, ar...
special_random_ops.h
// // @author raver119@gmail.com // #ifndef LIBND4J_SPECIAL_RANDOM_OPS_H #define LIBND4J_SPECIAL_RANDOM_OPS_H #include <ops/random_ops.h> #include <helpers/shape.h> namespace randomOps { ////////////////////////////////////////////////////////////////////// template<typename T> class Choice { public: ...
convert.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...
CometMatrix.h
// This file os part of FVM // Copyright (c) 2012 FVM Authors // See LICENSE file for terms. #ifndef _COMETMATRIX_H_ #define _COMETMATRIX_H_ #include "MatrixJML.h" #include "Array.h" #include "ArrayBase.h" #include "NumType.h" #include "SquareMatrixESBGK.h" #include <omp.h> template<class T> class CometMatrix : publ...
convolution_winograd_dot_pack8.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 ...
omp_get_num_procs.c
// omp_get_num_procs.c // compile with: /openmp /* ############################################################################# ## DESCRIPTION: Using omp_get_num_procs() to show your CPUS. ## NAME: omp_get_num_procs.c ## AUTHOR: Lucca Pessoa da Silva Matos ## DATE: 10.04.2020 ## VERSION: 1.0 ## EXEMPLE: ## PS C:\...
bezier_post_utility.h
// // Project Name: Kratos // Last Modified by: $Author: hbui $ // Date: $Date: 2013-10-12 $ // Revision: $Revision: 1.0 $ // // #if !defined(KRATOS_BEZIER_POST_UTILITY_H_INCLUDED ) #define KRATOS_BEZIER_POST_UTILITY_H_INCLUDED // System includes #include <string> #include...
GB_unaryop__minv_uint32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
blake2bp.c
/* BLAKE2 reference source code package - optimized C implementations Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at your option. The terms of these licenses can be found at: - CC0 1.0 Univers...
prod-cons.c
#include <omp.h> #include <stdio.h> #define SIZE 100000 int flag = 0; void fill_rand(int N,double A[]) { for(int i=0;i<N;++i) A[i] = 1; printf("Producer populated data\n"); #pragma omp flush flag = 1; #pragma omp flush(flag) } double Sum_array(int N,double A[]) { double sum = 0.0; int p_flag; while(1) { ...
reduction_teams.c
#include <stdio.h> #include <omp.h> #define N 1000000ll #define SUM (N * (N-1)/2) void checkHost(int gpu_error, int* errors, long long a){ int host_error = 0; if (a != SUM){ printf ("Host - Incorrect result = %lld, expected = %lld!\n", a, SUM); host_error = 1; (*errors)++; } if(!host_error && !g...
pr86025.c
/* PR c++/86025 */ /* { dg-do compile } */ /* { dg-additional-options "-Wduplicated-branches" } */ int i; void foo (int x) { if (x) { #pragma omp critical (foo) i++; } else { #pragma omp critical i++; } }
ams.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
grid_ao.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 ...
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_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...
gr3_mc.c
/*!\file gr3_mc.c * * Optimized OpenMP implementation of the marching cubes algorithm. * * This code is based on Paul Bourke's Marching Cubes implementation * (http://paulbourke.net/geometry/polygonise/) * * Creates an indexed mesh to reduce the number of vertices to calculate. * This is done by caching generat...
global.h
#ifndef _GLOBAL_H_ #define _GLOBAL_H_ #pragma omp declare target const double aaa = 11.; #pragma omp end declare target #endif