source
stringlengths
3
92
c
stringlengths
26
2.25M
direct_computation.c
#include "direct_computation.h" #include "omp.h" #include <immintrin.h> /* debug */ /*extern my_rank;*/ /********************************************************************************************* ********************************************************************************************** ***********************...
vect-simd-clone-9.c
/* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #include "tree-vect.h" #ifndef N #define N 1024 #endif int a[N], b[N]; long int c[N]; unsigned char d[N]; #pragma omp declare simd notinbranch __attri...
GB_unop__sqrt_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...
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-...
cpu_bound.c
/* * Copyright (c) 2009, 2010, 2011, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #include <stdlib.h>...
GB_binop__lt_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
openmp-task-detach.c
#include <mpi.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include "mpi-detach.h" #include <unistd.h> int main(int argc, char** argv) { int provided; MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); if (provided != MPI_THREAD_MULTIPLE) { printf("This code needs MPI_THREAD_MULTIPL...
mpi-omp-mat-vect-mult-blkstp.c
#ifdef _CIVL #include <civlc.cvh> #endif /********************************************************************* C-DAC Tech Workshop : HeGaPa-2012 July 16-20,2012 Example 4 : Mpi-Omp_MatVect_Mult_blkstp.c Objective : Write an MPI-OpenMP Program to perform Ma...
Fig_7.11_fibonacciTasks.c
#include <omp.h> int fib(int n) { int x, y; if (n < 2) return n; #pragma omp task shared(x) x = fib(n - 1); #pragma omp task shared(y) y = fib(n - 2); #pragma omp taskwait return (x + y); } int main() { int NW = 30; #pragma omp parallel { #pragma omp single fib(NW); } ...
OnDiscMSExperiment.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
GB_unop__identity_fc64_int32.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...
ast-dump-openmp-parallel-for-simd.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp parallel for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp parallel for simd for (int i = 0;...
GB_unaryop__abs_int64_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
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...
measures_threads.c
#include <int3d.h> #include <hpchain.h> #include <movchain.h> #include <fitness/fitness.h> #include <config.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include "fitness_private.h" #include "gyration.h" static FitnessCalc FIT_BUNDLE = {0, 0, NULL, 0, 0}; void FitnessCalc_initializ...
GB_binop__max_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-...
bfs_simple.c
/* Copyright (C) 2010-2011 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:...
pr27388-2.c
/* PR middle-end/27388 */ /* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-omplower" } */ extern void baz (int); void foo (void) { int i; #pragma omp parallel for shared (i) for (i = 0; i < 2; i++) baz (i); } void bar (void) { int j = 0; #pragma omp parallel shared (j) { j++; #pragma omp...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b) #...
expt_sum_prod.c
#include "q_incs.h" uint64_t num_ops; extern int sum_prod( float **X, /* M vectors of length N */ uint64_t M, uint64_t N, double *w, /* vector of length N */ double **A /* M vectors of length M */ ); int sum_prod( float **X, /* M vectors of length N */ uint64_t M, uint64_t N, doub...
mandel_para.c
/* Generated by Cython 0.15.1 on Mon Feb 11 15:34:04 2013 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #else #include <stddef.h> /* For offsetof */ #ifndef offsetof #define offsetof(type, mem...
GB_binop__plus_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
calc_pi_reduction.c
#define _POSIX_C_SOURCE 200112L //Johannes Hartmann, Jonas Einig #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent.h> #include <ctype.h> #include <math.h> #include <omp.h> void getparams(int argc, char **argv, int *iterations); int isNumber(char *number); void calculatePi(int iterations); in...
pooling_layer.h
//Tencent is pleased to support the open source community by making FeatherCNN 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 of...
quicksort.c
/* * quicksort.c: Example of QucikSort in OpenMP. * * (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com> */ /*Многопоточная программа, реализующая алгоритм быстрой сортировки. Входными данными для программы является неотсортированный числовой массив a, заполненный случайными значениями. Результат выполнения программы ...
rose_v1_foo.c
#if 1 #include <omp.h> void foo1(double o1[],double c[],int len) { int i; #pragma omp parallel for private (i) firstprivate (len) for (i = 0; i <= len - 1; i += 1) { double volnew_o8 = 0.5 * c[i]; o1[i] = volnew_o8; } } #endif #if 1 void goo(double *o1,double *o2,double *a,double *b,double *c,int **...
sparselu.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...
DRB066-pointernoaliasing-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_unaryop__minv_int32_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
zeroslike_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
mainOpenMP.c
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.c * Author: Nikolaos Mamais(2371),Nikolaos Bafatakis(2383),Panagiotis Maroylidis(2431) * * Created on March 19,...
GB_binop__second_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
kernel_cam.h
#pragma omp declare target void kernel_cam(const fp timeinst, const fp* initvalu, fp *finavalu, const int valu_offset, const fp* params, const int params_offset, fp* com, const int com_offset, const fp Ca){ //===================================================================== // ...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
header.h
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
chlpca.h
/* # # File : chlpca.cpp # ( C++ source file ) # # Description : Example of use for the CImg plugin 'plugins/chlpca.h'. # This file is a part of the CImg Library project. # ( http://cimg.eu ) # # Copyright : Jerome Boulanger # ( http://www....
imginputfileconn.h
/** * DeepDetect * Copyright (c) 2014 Emmanuel Benazera * Author: Emmanuel Benazera <beniz@droidnik.fr> * * This file is part of deepdetect. * * deepdetect 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 F...
GB_unop__sqrt_fp32_fp32.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...
merge_sort.c
/****************************************************************************** * Copyright (c) 1998 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) ***************************************...
move_particle_utility.h
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___ // / __/ _ \| \| \ \ / /__| \_ _| __| __| // | (_| (_) | .` |\ V /___| |) | || _|| _| // \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pablo Beck...
mat_mult.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #include <assert.h> #include <time.h> //#define DEBUG #define DTYPE float void print_mat(const DTYPE *mat, const int r, const int c, const char *name); DTYPE *init_mat(DTYPE *mat, const int r, const int c, const DTYPE val); DTYPE *rand_mat(DTYPE *mat, const int ...
elastic.h
#ifndef ELASTIC #define ELASTIC #include "mesh.h" #include "math.h" using namespace Eigen; using namespace std; typedef Eigen::Triplet<double> Trip; class Elastic { protected: double muscle_fibre_mag = 1; double rho = 6.4; VectorXd sW1, sW2, sW3, sW4, sW5, sW6, muscle_forces, elastic_forces; std::vector<int> ...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
pvc_gen.h
#pragma once #include "emp-pvc/judge.h" #include "emp-pvc/common.h" #include "emp-pvc/logged-ot.h" #include "emp-pvc/hash_array.h" #include "emp-pvc/internal_gen.h" #include "emp-pvc/gc_commit_gen.h" #include "emp-pvc/gc_hash_io.h" #include "emp-pvc/ecdsa.h" #include <deque> #include <memory> #ifdef DEBUG static const...
ab-totient-omp-10.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...
vector.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) **************************************...
parallel_execution_omp.h
/* * Copyright 2018 Universidad Carlos III de Madrid * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
hmacSHA384_fmt_plug.c
/* * This software is Copyright (c) 2012 magnum, 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, are permitted. * * Based on hmac-md5 by Bartavelle * * SIMD added Feb, 2015, JimF. */ #if FMT_EXTERNS...
activation.h
// Copyright 2018 The MACE Authors. 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 by appl...
ten_tusscher_2004_epi_S3_9.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S3_9.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO:...
GB_unop__identity_int16_int32.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...
GB_unaryop__identity_uint16_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...
TemporalMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/TemporalMaxPooling.c" #else static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor); int kW = luaT_getfieldcheckint(L, 1, "kW"); int dW = luaT_getfieldcheckint(L, 1, "dW"); THTensor *indices =...
search_lsh.h
#include <boost/functional/hash.hpp> #include <boost/geometry/index/rtree.hpp> #include <unordered_map> #include <vector> #include <set> #include "utils.h" #include "rss.h" using namespace std; extern int_t nb; extern int_t nq; extern int_t dimension; extern float *xb; extern float *xq; extern float *rg; extern vecto...
time_multi_new.c
///////////////////////////////////////////////////////////////////////////// // einspline: a library for creating and evaluating B-splines // // Copyright (C) 2007 Kenneth P. Esler, Jr. // // Released under the BSD-3-clause license // ////////...
kmp_detach_tasks_t2.c
// RUN: %libomp-compile && env OMP_NUM_THREADS='3' %libomp-run // RUN: %libomp-compile && env OMP_NUM_THREADS='1' %libomp-run #include <stdio.h> #include <omp.h> #include "omp_my_sleep.h" // detached tied #define PTASK_FLAG_DETACHABLE 0x41 // OpenMP RTL interfaces typedef unsigned long long kmp_uint64; typedef long ...
declare_variant_mixed_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s --check-prefix HOST // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-unknown-linux -emit-pch -o %t -fopenmp-version=45 %s // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-unknown-linux -include-pch %t -verify %s -emit-...
pkzip_fmt_plug.c
/* * PKZIP patch for john to handle 'old' pkzip passwords (old 'native' format) * * Written by Jim Fougeron <jfoug at cox.net> in 2011. No copyright * is claimed, and the software is hereby placed in the public domain. * In case this attempt to disclaim copyright and place the software in the * public domain is ...
rhs.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB BT code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
sections.c
/* --- File sections.c --- */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #define N 5000 int main (int argc, char *argv[]) { int i, th; float a[N], b[N], c[N], d[N]; /* Initialize arrays */ for (i=0; i<N; i++) { a[i] = i * 2.3; b[i] = i + 10.35; } #pragma omp parallel private(i,...
app_baseline.c
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <unistd.h> #include <getopt.h> #include <assert.h> #include <stdint.h> #include <omp.h> #include "../../support/timer.h" #define T int64_t static int pos; static T *A; static T *B; static T *C; static T *C2; // Create a "test ...
reduce.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
openmp_wrapper.h
#ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_ #ifdef _OPENMP #include <omp.h> #include <exception> #include <stdexcept> #include <mutex> #include <vector> #include <memory> #include <boost/thread/mutex.hpp> #include <boost/exception_ptr.hpp> #include "log.h" #if __GNUC__ #define nullptr ((void...
fibonacci.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int fibonacci(int n) { int i, j; if (n<2) return n; else { #pragma omp task shared(i) i=fibonacci(n-1); #pragma omp task shared(j) j=fibonacci(n-2); #pragma omp taskwait return i+j; } } int main(int argc, c...
pr29947-1.c
/* PR libgomp/29947 */ /* { dg-options "-O2 -fopenmp" } */ /* { dg-do run } */ extern void abort (void); int cnt; void test1 (long j1, long k1, long j2, long k2) { long i, e = 0, c = 0; #pragma omp parallel reduction (+:e,c) { #pragma omp for schedule (dynamic) for (i = j1; i <= k1; ++i) { if (i < j2 ...
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...
update_local_ranks_parallel.c
#include <omp.h> #include "utils.h" #include "algorithm.h" #include <limits.h> int update_local_ranks_parallel (char * rank_dir, char * temp_dir, int total_chunks, int chunk_id, int h){ int size_order = 0; while((WORKING_CHUNK_SIZE >> size_order) > 1) {size_order++;} int next_chunk_dist = h > size_order ? 1<<(h-si...
LAGraph_cc_fastsv4.c
//------------------------------------------------------------------------------ // LAGraph_cc_fastsv4: connected components //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. (see Contribu...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
parallel_loop3.c
// Joshua Stevens #include<stdio.h> #include<stdlib.h> #include <math.h> #include <omp.h> #include <time.h> #include <sys/time.h> #define FILE_INPUT 0 //// Do not touch this function //// This function will be replaced int input_generator(int n, int dim, double **M) { int i, j; // Generating the X points for(i=0...
equality.h
/* Authors: Mayank Rathee Copyright: Copyright (c) 2020 Microsoft Research 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,...
helloworld.c
// Author: Fabio Rodrigues Pereira // E-mail: fabior@uio.no // compiling & running // clang -Xpreprocessor -fopenmp helloworld.c -lomp // ./a.out #include <stdlib.h> // rand, malloc, calloc and free. #include <stdio.h> // printf #include <math.h> #include <time.h> #include <omp.h> int main() { #pragma omp paralle...
affinity_display.1.c
// RUN: %libomp-compile // RUN: env OMP_DISPLAY_AFFINITY=TRUE OMP_NUM_THREADS=4 OMP_PLACES='{0,1},{2,3},{4,5},{6,7}' %libomp-run | %python %S/check.py -c 'CHECK' %s // REQUIRES: !abt // Affinity Display examples #include <stdio.h> #include <stdlib.h> // also null is in <stddef.h> #include <stddef.h> #include <omp.h> #...
omp_version.c
/****************************************************************************** * * FILE: omp_version.c * * DESCRIPTION: * * OMP VERSION - C/C++ Version * * AUTHOR: Victor Rodriguez * ******************************************************************************/ #include <omp.h> #include <stdio.h> #include ...
tissue.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "precision.h" #define ALVTOL REAL_EPSILON #define PTEQ(a,b) ((a)[0] == (b)[0] && (a)[1] == (b)[1] && (a)[2] == (b)[2]) typedef struct { real c, a, r; } material; /* Compute the wave number for dimensionless distances given the ...
fill_int2e.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <string.h> #include <math.h> #include "config.h" #include "cint.h" #define NCTRMAX 64 /* ************************************************* * 2e AO integrals in s4, s2ij, s2kl, s1 */ void GTOnr2e_fill_s1(int (*intor)(), int ...
firstlastprivate.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main() { int i, n = 7; int a[n], suma=0; for (i=0; i<n; i++) a[i] = i; #pragma omp parallel for firstprivate(suma) lastprivate(suma) for (i=0; i<n; i++) { suma = suma + a[i]; printf(" thread %d suma a[%d] suma=%d \n"...
pr27328.c
/* PR middle-end/27328 */ /* { dg-do compile } */ extern void baz (void) __attribute__((noreturn)); void foo (void) { #pragma omp parallel for (;;) ; } void bar (void) { #pragma omp parallel baz (); }
perturbation_fold.c
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef VRNA_WITH_GSL #include <gsl/gsl_multimin.h> #endif #include "ViennaRNA/eval.h" #include "ViennaRNA/fold_vars.h" #include "ViennaRNA/constraints/hard.h" #include "Vie...
conv3x3s1_winograd23_sse_AoA.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. // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in...
FillInLinearSystemImpl.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
conv1x1s2_pack4to1_neon.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 ...
Thermostat.h
/** * @file Thermostat.h * @author N. Fottner * @date 27/8/19 */ #pragma once #include <cstdlib> #include "autopas/AutoPas.h" #include "autopas/utils/ArrayMath.h" #include "autopas/utils/WrapOpenMP.h" /** * Thermostat to adjust the Temperature of the Simulation. */ namespace Thermostat { namespace { /** * Ad...
mm.c
/****************************************************************************** * FILE: mm.c * DESCRIPTION: * This program calculates the product of matrix a[nra][nca] and b[nca][ncb], * the result is stored in matrix c[nra][ncb]. * ***********************************************************************...
simple_prof_c.c
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, 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,...
kde_vq.h
// // Copyright (c) 2020 xinyan. All rights reserved. // Created on 2020/4/2. // #ifndef SSKDE_INCLUDE_KDE_VQ_H_ #define SSKDE_INCLUDE_KDE_VQ_H_ #include <progress_bar.h> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <tuple> #include <array> #include <unordered_map> #define Ks ...
elkan_par24.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <stdbool.h> #include <string.h> #include <omp.h> #include "csvparser.h" void vector_init(double *a, int length) { for (int i = 0; i < length; i++) { a[i] = 0; } } void vector_copy(double *dst, double *src, int length) { for...
lbfgsbsolver.h
// CppNumericalSolver // based on: // L-BFGS-B: A LIMITED MEMORY ALGORITHM FOR BOUND CONSTRAINED OPTIMIZATION // Richard H. Byrd, Peihuang Lu, Jorge Nocedal and Ciyou Zhu #include <iostream> #include <list> #include <Eigen/LU> #include "isolver.h" #include "../boundedproblem.h" #include "../linesearch/morethuente.h" #i...
nt.c
/*************************************************************************** * * (C) Copyright 2007 The Board of Trustees of the * University of Illinois * All Rights Reserved * * MRI-Q: Magnetic Resonance Imaging * Computes a matrix Q, represen...
ast-dump-openmp-begin-declare-variant_9.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s --check-prefix=C // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s --check-prefix=CXX // expected-no-diagnostics int also_before(void) { return 0; } #pragma omp beg...
blockchain.c
/********************************************************************* Homework 5 CS 110: Computer Architecture, Spring 2021 ShanghaiTech University * Last Modified: 03/28/2021 *********************************************************************/ #include "blockchain.h" #include <stdlib.h> #include <string.h> #inclu...
par_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322. * This file is part of AMG. See files READ...
1422.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...
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...
task_memory.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #define USE_PRIVATE_TOOL 1 #include "callback.h" #include <omp.h> int main() { int x; #pragma omp parallel num_threads(2) { #pragma omp master { #pragma omp task { x++; } #pragma omp task firstpriv...
Vec.h
/************************************************************************* * Copyright (c) 2014 Zhang Dongdong * 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 *...
pr30494.c
/* PR middle-end/30494 */ /* { dg-do compile } */ int foo (int n) { int i; #pragma omp for for (i = 0; i < 6; i++) { int v[n], w[n * 3 + i]; v[0] = 1; w[0] = 2; } return 0; } int bar (int n) { int i; #pragma parallel omp for for (i = 0; i < 6; i++) { int v[n], w[n * 3 + i...
shared.c
/* Copyright (c) 2013, 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 disclaimer. *...
master_taskloop_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 -triple x86_64-unknown-unknown %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 -triple x86_64-unknown-unknown %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -f...
bt-long.c
typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; typedef long long __int64_t; typedef unsigned long long __uint64_t; typedef long __darwin_intptr_t; typedef unsigned int __darwin_natural_t; ...