source
stringlengths
3
92
c
stringlengths
26
2.25M
eavlNto1GatherOp.h
// Copyright 2010-2013 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_N_TO_1_GATHER_OP_H #define EAVL_N_TO_1_GATHER_OP_H #include "eavlCUDA.h" #include "eavlOperation.h" #include "eavlArray.h" #include "eavlOpDispatch.h" #include "eavlException.h" #ifdef HAVE_OPENMP #include <omp.h> #endif #ifn...
no_raytracing_timeloop.c
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * no_raytracing_timeloop.c * * Code generation for function 'no_raytracing_timeloop' * */ /* Include files *...
helloWorld.c
/* Author: Luiz Hello World using as much threads as supported by your processor */ #include <stdio.h> void main(){ #pragma omp parallel { int ID = omp_get_thread_num(); printf("Hello world from thread %d\n", ID); } }
libperf_int.h
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2016. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #ifndef LIBPERF_INT_H_ #define LIBPERF_INT_H_ #include <tools/p...
Quicksort.h
/* Copyright (c) 2014-2019, 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 fol...
zmobius.h
#include<config.h> CPS_START_NAMESPACE //------------------------------------------------------------------ // // mobius.h // // C header file for the complex mobius fermion library // //------------------------------------------------------------------ #ifndef INCLUDED_ZMOBIUS_H #define INCLUDED_ZMOBIUS_H CPS_END_NA...
ab-totient-omp-11.c
// Distributed and parallel technologies, Andrew Beveridge, 03/03/2014 // To Compile: gcc -Wall -O -o ab-totient-omp -fopenmp ab-totient-omp.c // To Run / Time: /usr/bin/time -v ./ab-totient-omp range_start range_end #include <stdio.h> #include <omp.h> /* When input is a prime number, the totient is simply the prim...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
montecarlo_pi.c
#include <inttypes.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <Random123/philox.h> #include <bp_util.h> typedef union philox2x32_as_1x64 { philox2x32_ctr_t orig; uint64_t combined; } philox2x32_as_1x64_t; double montecarlo_pi(uint32_t samples, uint32_t x_index, uint32_t y_index, uint...
DRB031-truedepfirstdimension-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...
taskloop_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -t...
omp-loop02.c
#include <omp.h> /* Orphaned work sharing. */ extern void abort (void); #define N 10 void parloop (int *a) { int i; #pragma omp for for (i = 0; i < N; i++) a[i] = i + 3; } int main() { int i, a[N]; #pragma omp parallel shared(a) { parloop (a); } for (i = 0; i < N; i++) if (a[i] != i + 3...
GB_binop__bor_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
matvec_itlmic_kernel.c
#include "matvec.h" #include <offload.h> #include <homp.h> #ifdef USE_INTEL_MKL #include <mkl.h> #endif void matvec_itlmic_wrapper(omp_offloading_t *off, long n, long start_n, long length_n,REAL *a,REAL *x,REAL *y) { int i, j; int sysid = off->dev->sysid; int num_cores = off->dev->num_cores; #ifdef USE_INT...
kernel.h
// // Notes: // // 1) strategy: one thread per node in the 2D block; // after initialisation it marches in the k-direction // working with 3 planes of data at a time // // 2) each thread also loads in data for at most one halo node; // assumes the number of halo nodes is not more than the // number of inter...
fprintf.c
#include <stdio.h> #include <omp.h> void write_index(int*a, int N, FILE* fileptr ){ printf(" ===> Encounter target pragma fileptr:%p \n", fileptr); // fileptr is host pointer, but set is_device_ptr so openmp does not map it. #pragma omp target teams distribute parallel for map(tofrom: a[0:N]) is_device_p...
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...
searchAlgorithms.c
/************************************************************************* * * PathFinder: finding a series of labeled nodes within a * two-layer directed, cyclic graph. * Copyright (2013) Sandia Corporation * * Copyright (2013) Sandia Corporation. Under the terms of Cont...
blurtwo.c
#include <stdlib.h> #include "blurtwo.h" void blurtwo(float* v,int M,int N,float*output){ float* tmp2 = (float*) calloc(1,((N + 1 + 1 + 0)) * (M) * sizeof (float)); for (int H7 = 0; H7 < (N + 1 + 1 + 0); H7++) { for (int H8 = 0; H8 < M; H8++) { if (0 <= H7 - (1) && H7 - (1) < N) { float tmp3 = 0; float ...
target_teams_distribute_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}} #pragma omp target teams distribute simd // expected-error@+1 {{unexpected Ope...
pcptdesencryptecbcaomp.c
/******************************************************************************* * Copyright 2002-2018 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") co...
tinyexr.h
/* Copyright (c) 2014 - 2015, Syoyo Fujita All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and t...
ps_local-inl.h
/*! * Copyright (c) 2014 by Contributors * \file ps_local-inl.h * \brief local multi-threading implementation of PS abstraction * * \author Tianqi Chen, Mu Li */ #ifndef MSHADOW_PS_LOCAL_INL_H_ #define MSHADOW_PS_LOCAL_INL_H_ #include <map> #include <utility> #if defined(_OPENMP) #include <omp.h> #ifdef _MSC_VER...
8a73e1_so4.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; i...
laplace3d.c
// This file is a part of Julia. License is MIT: http://julialang.org/license // GCC command line: gcc -fopenmp -mavx2 laplace3d.c -o laplace3d /* Laplace 3D orig: simple serial version naive: simple parallelized version auto: some ninja knowledge, using icc directives sse/avx: ni...
outputdep-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...
kvstore_dist_server.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 ...
brilliantrussian.c
/******************************************************************* * * M4RI: Linear Algebra over GF(2) * * Copyright (C) 2007, 2008 Gregory Bard <bard@fordham.edu> * Copyright (C) 2008-2010 Martin Albrecht <M.R.Albrecht@rhul.ac.uk> * * Distributed under the terms of the GNU General Publi...
copyprivate3.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #define LOOPCOUNT 100 int main(void) { int result = 0; int nr_iterations = 0; int i; int j; #pragma omp parallel private(i,j) { for (i = 0; i < LOOPCOUNT; i++) { #pragma omp single copyprivate(j) { nr_iterations++; ...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "heat-3d.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 */ /*...
YAKL_parallel_for_common.h
// #pragma once is purposefully omitted here because it needs to be included twice: once in each namespace: c and fortran // Included by YAKL_parallel_for_c.h and YAKL_parallel_for_fortran.h // Inside the yakl::c and yakl::fortran namespaces ////////////////////////////////////////////////////////////////////////////...
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...
loop-7.c
void foo (void) { #pragma omp for collapse(2) /* { dg-error "invalid OpenMP non-rectangular loop step" } */ for (int i = 0; i < 6; i++) for (int j = 4 * i; j < 7 * i; j += 2) ; #pragma omp for collapse(2) /* { dg-error "invalid OpenMP non-rectangular loop step" } */ for (int i = 0; i < 32; i += 7) ...
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...
4-1.c
#include <omp.h> #include <stdio.h> int main() { #pragma omp parallel num_threads(2) #pragma omp for schedule(static) for (int i = 0; i < 100; i++) { int id = omp_get_thread_num(); printf("T%d:i%d ", id, i); fflush(stdout); } }
test_utils.h
/* * Copyright (c) 2019, NVIDIA CORPORATION. * * 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 ...
residualbased_block_builder_and_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // ...
m_image.h
/*====================================================================== Maratis Tiny C Library version 1.0 ------------------------------------------------------------------------ Copyright (c) 2015 Anael Seghezzi <www.maratis3d.org> Copyright (c) 2015 Marti Maria Saguer This software is provided 'as-is', withou...
linAlgWeightedInnerProd.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation t...
fill_nr_s8.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <string.h> #include <math.h> //#include <omp.h> #include "config.h" #include "cint.h" #include "cvhf.h" #include "nr_direct.h" #include "optimizer.h" #define NCTRMAX 64 static void unpack_block2tril(double *buf, double *eri, ...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define MAX_N 25000 #define TRIALS (1) #define N (1024*3) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i+1;}) #define ZERO(X) ZERO_ARRAY(N, X) #define DUMP_SUCCESS6() { \ if (cpuExec) { \ D...
libperf_int.h
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2016. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #ifndef LIBPERF_INT_H_ #define LIBPERF_INT_H_ #include <tools/p...
IJMatrix_parcsr.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...
dtreetest.c
/* gasp -- global address space toolbox dtree -- distributed dynamic scheduler, microbenchmark */ #include <mpi.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <strings.h> #include <unistd.h> #include <sys/param.h> #include <omp.h> #include <pthread.h> #include <math.h> #include <mkl.h> #...
feature_histogram.h
#ifndef LIGHTGBM_FEATURE_HISTOGRAM_H_ #define LIGHTGBM_FEATURE_HISTOGRAM_H_ #include <LightGBM/split_info.h> #include <LightGBM/utils/array_args.h> #include <LightGBM/dataset.h> #include <cstring> #include <cmath> #include <vector> namespace LightGBM { class FeatureMetainfo { public: int num_bin; MissingType ...
tinyexr.h
#ifndef TINYEXR_H_ #define TINYEXR_H_ /* Copyright (c) 2014 - 2020, Syoyo Fujita and many 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 th...
GB_unop__identity_fp32_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...
for-6.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-ompexp" } */ extern void bar(int); void foo (int n) { int i; #pragma omp for schedule(monotonic:runtime) for (i = 0; i < n; ++i) bar(i); } /* { dg-final { scan-tree-dump-times "GOMP_loop_runtime_start" 1 "ompexp" } } */ /* { dg-final { scan-tre...
swapCheck.c
int main() { int A = 5; int B = 10; int C; int D = 0; #pragma omp parallel { #pragma omp atomic D = D + 1; int x = 11; while (1) { #pragma omp master { l4: D = D + A + B; } #pragma omp barrier #pragma omp single nowait { l1: C = A; l2: A = B; l3: B = C; } #pragma omp barrier #prag...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
stream_int_omp.c
/*-----------------------------------------------------------------------*/ /* Program: Stream */ /* Revision: $Id: stream_omp.c,v 5.4 2009/02/19 13:57:12 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Progr...
GB_binop__rminus_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
charge_deposition.h
#ifndef XFIELDS_CHARGE_DEPOSITION_H #define XFIELDS_CHARGE_DEPOSITION_H //include_file atomicadd.clh for_context opencl //include_file atomicadd.h for_context cpu_serial cpu_openmp /*gpufun*/ void p2m_rectmesh3d_one_particle( // INPUTS: const double x, const double y, const double z, // part...
GB_builder.c
//------------------------------------------------------------------------------ // GB_builder: build a matrix from tuples //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-...
main.c
// #define USE_LEVMAR #include "core/inpaint.h" #include "core/half.h" #include "core/clip.h" #include "core/solve.h" #include "q2t.h" #include <strings.h> #include "../../pipe/modules/i-raw/adobe_coeff.h" #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <math.h> #include <string.h> #include <assert....
singleConstruct.c
int main() { int x = 10; #pragma omp parallel { int localX = 2; #pragma omp single { x = x + 10; } localX = x; } x = 30; }
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
softmax_layer.c
#include "softmax_layer.h" #include "blas.h" #include "dark_cuda.h" #include "utils.h" #include "blas.h" #include <float.h> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <assert.h> #define SECRET_NUM -1234 void softmax_tree(float *input, int batch, int inputs, float temp, tree *hierarchy, float *...
keystore_fmt_plug.c
/* Java KeyStore cracker. Written by Dhiru Kholia <dhiru at openwall.com> and * Narendra Kangralkar <narendrakangralkar at gmail.com>. * * Input Format: $keystore$target$data_length$data$hash$nkeys$keylength$keydata$keylength$keydata... * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru.kholia at gmail.c...
bug_proxy_task_dep_waiting.c
// RUN: %libomp-compile-and-run // The runtime currently does not get dependency information from GCC. // UNSUPPORTED: gcc #include <stdio.h> #include <omp.h> #include <pthread.h> #include "omp_my_sleep.h" /* An explicit task can have a dependency on a target task. If it is not directly satisfied, the runtime shoul...
1346.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
parallel_ublas_space.h
/* ============================================================================== Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cimne.upc.edu CIMNE (International Center for...
parallel_for_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -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 ...
Example_task_reduction.1.c
/* * @@name: task_reduction.1c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success */ #include<stdlib.h> #include<stdio.h> #define N 10 typedef struct node_tag { int val; struct node_tag *next; } node_t; int linked_list_sum(node_t *p) { int res = 0; #pragma omp ta...
omp-low.c
/* Lowering pass for OpenMP directives. Converts OpenMP directives into explicit calls to the runtime library (libgomp) and data marshalling to implement data sharing and copying clauses. Contributed by Diego Novillo <dnovillo@redhat.com> Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc....
GB_ijsort.c
//------------------------------------------------------------------------------ // GB_ijsort: sort an index array I and remove duplicates //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Id...
pmv-OpenMP-reduction.c
// gcc -O2 algo.c -o nombre -fopenmp #include <stdlib.h> #include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_num_threads() 1 #endif int main(int argc, char** argv) { int i, j; double t1, t2, total; //Argumento de entrada, N es el número de componentes del vec...
copenmp.c
#define N (1 << 29) volatile long count; void fn() { count++; } void loop() { long i; for(i = 0; i < N; i++) fn(); } int main(int argc, char **argv) { #pragma omp parallel num_threads(2) loop(); return 0; }
test.c
#include <stdio.h> #include <omp.h> #pragma omp requires unified_shared_memory #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) // // TODO: Add the following runti...
4.collapse.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> /* OpenMP */ #define N 5 /* Q1: Which iterations of the loops are executed by each thread */ /* when the collapse clause is used? */ /* Q2: Is the execution correct if we remove the collapse clause? */ ...
omp_parallel_copyin.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include "omp_testsuite.h" static int sum1 = 789; #pragma omp threadprivate(sum1) int test_omp_parallel_copyin() { int sum, num_threads; int known_sum; sum = 0; sum1 = 7; num_threads = 0; #pragma omp parallel copyin(sum1) { /*p...
linear_system_solver.c
// // Created by sachetto on 04/10/17. // Modified by berg on 13/05/18 // #include "../monodomain/config/linear_system_solver_config.h" #include "../libraries_common/config_helpers.h" SOLVE_LINEAR_SYSTEM(conjugate_gradient) { double tol = 1e-16; GET_PARAMETER_NUMERIC_VALUE_OR_USE_DEFAULT(double, tol, config-...
nested_lwt.c
// RUN: %libomp-compile-and-run | FileCheck %s // RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #include "callback.h" #include <omp.h> #include <unistd.h> int main() { omp_set_nested(1); int condition = 0; #...
implicit_blender.c
/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is d...
test.c
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <time.h> #include <omp.h> static int const N = 10000; //number of agents static int const M = 5; //number of links static double const alfa = -2.1; //heavy tail exponent static double const xmin = 0.001; //lower cutoff of the power law static doub...
GB_bitmap_masker_template.c
//------------------------------------------------------------------------------ // GB_bitmap_masker_template: phase2 for R = masker (C, M, Z), R is bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. /...
GB_unop__isinf_bool_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...
pt.c
/* Handle parameterized types (templates) for GNU -*- C++ -*-. Copyright (C) 1992-2017 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com) while at Watchmaker Computing. Rewritten by Jason Merrill (jason@cygnus.com). This file is part of GCC. GCC is free software; you can redistribute ...
red_black_constantcoef_gs.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...
whirlpool_fmt_plug.c
/* whirlpool cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 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 bin...
openmp_wrapper.h
/*! * Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_ #ifdef _OPENMP #include <LightGBM/utils/log.h> #include <omp.h> #include <ex...
conv3x3s1_winograd64_pack4_neon_BdB.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_unaryop__identity_fp64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_binop__min_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-...
ompfor2.c
/* loop scheduling */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int a[20]; int foo(int lower, int upper, int stride) { int i; #pragma omp single printf("---------default schedule--------------\n"); #pragma omp for nowait for (i=lower;i<upper;i+=stride) { a[i]=i*2; printf("Iteration %...
update_ops_control_single_target_single.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif //void single_qubit_control_single_qubit_dense_matrix_gate_...
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...
PhonetisaurusPy.h
/* PhonetisaurusPy.h Copyright (c) [2012-], Josef Robert Novak 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, th...
omp_parallel_for_if.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" int test_omp_parallel_for_if() { int known_sum; int num_threads; int sum, sum2; int i; int control; control = 0; num_threads=0; sum = 0; sum2 = 0; #pragma omp parallel for private(i) if (control==1) ...
GB_binop__plus_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unaryop__minv_int32_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...
set_horz_pres_BCs.h
#pragma omp target teams distribute parallel for thread_limit(BLOCK_SIZE) for (int col = 1; col < NUM/2+1; col++) { col = (col * 2) - 1; int NUM_2 = NUM >> 1; // p_i,0 = p_i,1 pres_black(col, 0) = pres_red(col, 1); pres_red(col + 1, 0) = pres_black(col + 1, 1); // p_i,jmax+1 = p_i,jmax pres_red(col, NU...
GB_unaryop__lnot_int64_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...
convolution_pack1to4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
picolrn.c
/* * This code is released under the MIT License. * Copyright (c) 2013 Nenad Markus */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <stdint.h> #include <omp.h> // hyperparameters #define NRANDS 128 /* auxiliary stuff */ #define MAX(a, b) ((a)>(b)?(a):(b)) #define MIN(a, b) ((a)<(b)?(a):(...
pi-omp-v1.c
/******************************************************** * Calculating Pi with using midpoint rectangle method: * * integral 4.0/(1+x^2) dx = pi * * or * * summation (for i=0 to n) 4.0/(1+x_i^2) * * where x_i = (i + 1/2) * delta x * * OpenMP Version 1 * ********...
displacement_lagrangemultiplier_residual_frictional_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
nvm_buf.c
/* * buf - Helper functions for buffer management * * Copyright (C) Simon A. F. Lund <slund@cnexlabs.com> * 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 ...
mandelSSED.c
#include <immintrin.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include "mandel.h" // copied from https://github.com/skeeto/mandel-simd/blob/master/mandel_avx.c // changed a lot to make it easier readable and support distance and last z void mandel_ssed(int32_t *iters, ...
cancel-sections-1.c
/* { dg-do run } */ /* { dg-set-target-env-var OMP_CANCELLATION "true" } */ #include <stdlib.h> #include <omp.h> int main () { if (!omp_get_cancellation ()) return 0; #pragma omp parallel num_threads (32) { #pragma omp sections { { #pragma omp cancel sections abort (); } #pragma omp ...