source
stringlengths
3
92
c
stringlengths
26
2.25M
looptc.c
void deinterleave(char *page, char *transposed, const int ntabs, const int nchannels, const int ntimes, const int padded_size) { int tab; for (tab = 0; tab < ntabs; tab++) { int time; #pragma omp parallel for for (time = 0; time < ntimes; time++) { int channel; for (channel = 0; channel < ncha...
numerics_simpson.c
//****************************************************************************** // MIT License // // Copyright (c) 2022 Tomonobu Inayama // // 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...
intruder.c
/* ============================================================================= * * intruder.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
GB_unop__expm1_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
convolution_sgemm_pack8to1_int8.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 ...
Example_task_dep.6.c
/* * @@name: task_depend.6.c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #include<stdio.h> void foo() { int x = 0, y = 2; #pragma omp task depend(inout: x) shared(x) x++; // 1st child task #pragma omp task share...
GB_binop__lxor_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
eavlCombinedTopologyPackedMapOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_COMBINED_TOPOLOGY_PACKED_MAP_OP_H #define EAVL_COMBINED_TOPOLOGY_PACKED_MAP_OP_H #include "eavlCUDA.h" #include "eavlCellSet.h" #include "eavlCellSetExplicit.h" #include "eavlCellSetAllStructured.h" #include "eavlDataSet.h" #i...
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...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <rabit/rabit.h> #include <xgboost/base.h> #include <xgboost/span.h> #include <xgboos...
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;...
matmul.c
//===-- matmul.c - Different implementations of matrix multiplies -*- C -*-===// // // Part of the LOMP 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 // //===---------------------------...
main_medium_morus.c
#include "main_medium_morus.h" inline void copy_word(state_words* to, const state_words* from) { *to = *from; } inline void save_state(state* state_saved, state state, int i) { copy_word(&state_saved[i][0], &state[0]); copy_word(&state_saved[i][1], &state[1]); copy_word(&state_saved[i][2], &state[2]); copy_...
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...
thermodynamics.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* In this file, algebraic conversions and calculations of thermodynamic quantities of a moist atmosphere are collected. indices as usual: d: d...
CALPHADFreeEnergyFunctionsBinary3Ph2Sl.h
#ifndef included_CALPHADFreeEnergyFunctionsBinary3Ph2Sl #define included_CALPHADFreeEnergyFunctionsBinary3Ph2Sl #include "CALPHADSpeciesPhaseGibbsEnergy.h" #include "InterpolationType.h" #include "Phases.h" #include "datatypes.h" #include "functions.h" #include <boost/property_tree/ptree.hpp> #include <cassert> #inc...
QLA_D3_c1_veq_V_dot_V.c
/**************** QLA_D3_c_veq_V_dot_V.c ********************/ #include <stdio.h> #include <qla_config.h> #include <qla_types.h> #include <qla_random.h> #include <qla_cmath.h> #include <qla_d3.h> #include <math.h> static void start_slice(){ __asm__ __volatile__ (""); } static void end_slice(){ __asm__ __volatile...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
lock-unrelated.c
/* * lock-unrelated.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception /...
omp_dr.h
/* * OpenMP + dag_recorder */ /* this file provides macros with which users can easily turn on/off dag recorder for your OpenMP task parallel programs. provided macros are: (i) pragma_omp_task(option, statement) (ii) pragma_omp_taskc(option, callable) (iii) pragma_omp_taskwait they are r...
DRB092-threadprivatemissing2-orig-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
linked_omp3_tasks.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #ifndef N #define N 5 #endif #ifndef FS #define FS 38 #endif struct node { int data; int fibdata; struct node* next; }; struct node* init_list(struct node* p); void processwork(struct node* p); int fib(int n); int fib(int n) { ...
boundary.c
#include <stdio.h> #include <string.h> #include "datadef.h" #include "tiles.h" #define max(x,y) ((x)>(y)?(x):(y)) #define min(x,y) ((x)<(y)?(x):(y)) /* Given the boundary conditions defined by the flag matrix, update * the u and v velocities. Also enforce the boundary conditions at the * edges of the matrix. */ vo...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
OMPIRBuilder.h
//===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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 // //===---------------------------...
generator.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef GENERATOR_H_ #define GENERATOR_H_ #include <algorithm> //#include <cinttypes> #include <random> #include "graph.h" #include "pvector.h" #include "misc.h" /* GAP Benchmark Suite Class: Genera...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
tvl1flow_lib.c
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2011, Javier Sánchez Pérez <jsa...
join.c
/* Copyright 2013-2015. The Regents of the University of California. * Copyright 2015. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2013, 2015 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2015 J...
omp_atomic.h
/* //@HEADER // ***************************************************************************** // // omp_atomic.h // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC // (NTESS). Under the terms of Cont...
tree_reduce.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc #include "callback.h" #include <omp.h> #ifdef NOWAIT #define FOR_CLAUSE nowait #else #define FOR_CLAUSE #endif int main() { int sum = 0; int i; #pragma omp parallel num_threads(5) #pragma omp for reduction(+ : sum...
8.norace6.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 200 int main() { int A[N], x = 0; #pragma omp parallel for linear(x : 2) for (int i = 0; i < N; i++) A[i] = x; } // CHECK: Region is Data Race Free. // END
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 // //===---------------------------...
Cone.h
#ifndef CONE_HEADER #define CONE_HEADER #ifdef DOPARALLEL #include <omp.h> #endif #include "basic.h" #include "PointCloud.h" #include <GfxTL/HyperplaneCoordinateSystem.h> #include <stdexcept> #include <ostream> #include <istream> #include <stdio.h> #if !defined(_WIN32) && !defined(WIN32) #include <unistd.h> #endif #inc...
cq_fmt_plug.c
/* * This software is Copyright (c) Peter Kasza <peter.kasza at itinsight.hu>, * 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. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_cq; #elif...
heat.c
#define _GNU_SOURCE #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <omp.h> #include "colormap.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" // Simulation parameters static const unsigned int N = 500; static const float S...
GB_unop__identity_int32_uint64.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...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (1024*3) #define M (16*32) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) double A[M][N], B[M][N], C[N], D[N], E[N]; double S[M]; d...
GB_binop__pair_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-...
opencl_gpg_fmt_plug.c
/* * Modified by Dhiru Kholia <dhiru at openwall.com> for GPG 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, are per...
omp_in_parallel.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" /* * Checks that false is returned when called from serial region * and true is returned when called within parallel region. */ int test_omp_in_parallel() { int serial; int isparallel; serial = 1; isparallel = 0; serial = omp_i...
nl_matrix.c
/* * Copyright (c) 2004-2010, Bruno Levy * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this l...
machinedeps.c
/* Copyright © INRIA 2009-2014. Authors: Matthijs Douze & Herve Jegou Contact: matthijs.douze@inria.fr herve.jegou@inria.fr This file is part of Yael. Yael 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 Founda...
simple_mortar_mapper_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
omt_solver.h
#pragma once // std #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> #include <list> #include <set> #include <unistd.h> // sleep // eigen #include <Eigen/Dense> // other headers #include "global.h" #include "data_engine.h" // todo: remove. #include "geodesic/Xin_Wang.h" // cluster struct...
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...
GB_binop__lxor_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
par_2s_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) **************************************...
ssha512_fmt_plug.c
/* * ssha512 support for LDAP style password storage * * This software is Copyright (c) 2013 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. */ #if FMT_EXTERNS_H extern struct f...
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...
kmp_sch_simd_guided.c
// RUN: %libomp-compile-and-run /* Test for the 'schedule(simd:guided)' clause. Compiler needs to generate a dynamic dispatching and pass the schedule value 46 to the OpenMP RTL. Test uses numerous loop parameter combinations. */ #include <stdio.h> #include <omp.h> #include "omp_testsuite.h" #if defined(WIN32) |...
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...
utils.h
#ifdef HAVE_CONFIG_H #include <config.h> #endif #include <assert.h> #include "pixman-private.h" /* For 'inline' definition */ #include "utils-prng.h" #if defined(_MSC_VER) #define snprintf _snprintf #define strcasecmp _stricmp #endif #define ARRAY_LENGTH(A) ((int) (sizeof (A) / sizeof ((A) [0]))) /* A primitive pse...
actionAngleStaeckel.c
/* C code for Binney (2012)'s Staeckel approximation code */ #ifdef _WIN32 #include <Python.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <gsl/gsl_math.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_roots.h> #include <gsl/gsl_min.h> #include <gsl/gsl_integration.h> ...
relu-ring.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,...
GB_assign_zombie5.c
//------------------------------------------------------------------------------ // GB_assign_zombie5: delete entries in C for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License...
Cycle.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * 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,...
GB_binop__land_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-...
trmv_x_dia_n_hi_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA* A, const ALPHA_Number* x, ...
pi_omp_loop_8.c
/* This program will numerically compute the integral of 4/(1+x*x) from 0 to 1. The value of this integral is pi -- which is great since it gives us an easy way to check the answer. The is the original sequential program. It uses the timer from the OpenMP runtime library History: Writte...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
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 // //===---------------------------...
callback.h
#ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif #include <stdio.h> #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <inttypes.h> #include <omp.h> #include <omp-tools.h> #include "ompt-signal.h" // Used to detect architecture #include "../.....
wino_multiply.h
/******************************************************************************* * Copyright (c) Malith Jayaweera - All rights reserved. * * This file is part of the MARLIN library. * * ...
wave3d_b.c
/* Generated by TAPENADE (INRIA, Ecuador team) Tapenade 3.14 (r7079) - 5 Oct 2018 09:55 */ #include <adBuffer.h> /* Differentiation of wave3d in reverse (adjoint) mode: gradient of useful results: ***u ***u_1 ***u_2 with respect to varying inputs: ***u ***u_1 ***u_2 RW status of diff var...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fixed_version.c
#include<stdio.h> #include <stdlib.h> int main(){ int T[10]; srand (1); // initializing array T for (int i = 0; i < 10; i ++) { T[i] = i; } // running the loop 10 times using openmp // increase all element in array T by 1 each iteraion #pragma omp parallel for shared (T) for ( int i = 0; i...
EppsteinSubGraph.h
#pragma once #ifndef BRONKERBOSCHEPPSTEINDEVSUBPAR_H #define BRONKERBOSCHEPPSTEINDEVSUBPAR_H #include "../general.h" #include <gms/algorithms/preprocessing/preprocessing.h> /* PARALLELIZED Eppstein using SubGraphs:*/ namespace BkEppsteinSubGraph { template <class SGraph, class Set> NodeId findPivot(const Set &cand,...
quadric.h
#ifndef batoid_quadric_h #define batoid_quadric_h #include "surface.h" namespace batoid { #if defined(BATOID_GPU) #pragma omp declare target #endif class Quadric : public Surface { public: Quadric(double R, double conic); ~Quadric(); virtual const Surface* getDevPtr(...
task-dependency.c
/* * task-dependency.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ...
py-cky.h
// py-cky.h // // (c) Mark Johnson, 27th January 2006, last modified 2nd May, 2013 #ifndef PY_CKY_H #define PY_CKY_H #include <algorithm> #include <cassert> #include <cmath> #include <cstdlib> // #include <ext/hash_map> #include <iostream> #include <map> #include <set> #include <sstream> #include <utility> #include <...
goertzel.c
#include "ltfat.h" #include "ltfat/types.h" #include "ltfat/macros.h" #include "ltfat/thirdparty/fftw3.h" #ifndef GGA_UNROLL # define GGA_UNROLL 8 #endif struct LTFAT_NAME(gga_plan_struct) { LTFAT_REAL* cos_term; LTFAT_COMPLEX* cc_term; LTFAT_COMPLEX* cc2_term; ltfat_int M; ltfat_int L; }; str...
primes.c
/* * primes.c: Example of prime numbers counting in OpenMP. * * (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com> */ #include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> const int a = 1; const int b = 10000000; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (dou...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
atomic_write_codegen.c
// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -target-cpu core2 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -include-pch %t ...
GB_transpose_bucket.c
//------------------------------------------------------------------------------ // GB_transpose_bucket: transpose and optionally typecast and/or apply operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserve...
GB_binop__isge_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...
yolov2.h
#ifndef YOLOV2_H #define YOLOV2_H #include <stdio.h> #include <stdlib.h> #include <iostream> #include <math.h> #include <fcntl.h> #include <string.h> #include <assert.h> #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" #include "cnn.h" #defin...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
scm.h
#ifndef CELL_MAPPING_CPP_SCM_H #define CELL_MAPPING_CPP_SCM_H #include "css.h" #include "system.h" #include "coloring.h" #include <stdio.h> #include <jpeg-9a/jpeglib.h> #include <iostream> namespace cm { template <class CellType, class IDType, class StateVectorType> class SCM { private: SCMUnifo...
GB_reduce_each_vector.c
//------------------------------------------------------------------------------ // GB_reduce_each_vector: Tx(j)=reduce(A(:,j)), reduce a matrix to a vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. /...
laplace_mp.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> // grid size #define GRIDY 8192 #define GRIDX 8192 #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) // smallest permitted change in temperature #define MAX_TEMP_ERROR 0.02 double T_new[GRIDX+2][GRIDY+2]; // temperature gr...
DRB009-lastprivatemissing-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...
SxSpectrum.h
// --------------------------------------------------------------------------- // // The ab-initio based multiscale library // // S / P H I / n X // // Copyright: Max-Planck-Institute for Iron Research // 40237 Duesseldorf, Germany // // Contact: https://sxlib.mpie.d...
GB_unop__ainv_uint16_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
common.h
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h> #include <cstdio> #include <string> #include <vector> #include <sstream> #include <cstdint> #include <algorithm> #include <cmath> #include <functional> #include <memory>...
omp_task_linkedlist.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <omp.h> #define LIST_ITERATION 20 typedef struct lnklist LNKLIST; struct lnklist { int num; LNKLIST *next; } *ll_head, *ll_tail; void make_lnklist(); LNKLIST *append_lnklist(LNKLIST *l); void walk_lnklist(); int main() { make_lnklist(); #pragm...
SE1P_direct_rsrc.c
#include "mex.h" #include "SE_direct.h" #define IDX prhs[0] #define X prhs[1] // Source locations #define Q prhs[2] // Source strengths #define OPT prhs[3] // Parameters #define PHI plhs[0] // Output #ifndef VERBOSE #define VERBOSE 0 #endif /* common option-unpacking */ void unpack_opt(ewald_opts* opt, const m...
middle6r.c
/* * Date: 11 December 2015 * Contact: Thomas Peyrin - thomas.peyrin@gmail.com */ /* * Simulation of boomerang analysis for Skinny * Date: March 21, 2020 * Author: Hosein Hadipour * Contact: hsn.hadipour@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #in...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
vsite.c
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, * check out http://www.gromacs.org for more information. * Copyright (c) 2012,2013, by the GROMACS development team, l...
empty.c
/* { dg-do compile } */ /* { dg-options "-O -fopenmp -fdump-tree-ompexp" } */ int main() { #pragma omp parallel {;} } /* There should not be a GOMP_parallel_start call. */ /* { dg-final { scan-tree-dump-times "GOMP_parallel_start" 0 "ompexp"} } */
ab-totient-omp-6.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...
GB_Global.c
//------------------------------------------------------------------------------ // GB_Global: global values in GraphBLAS //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier: Apache-2...
par_multi_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) **************************************...
recombine.c
#include "recombine.h" #include "grid.h" #include <stdlib.h> #include <assert.h> #include <math.h> #include <time.h> #include <omp.h> #include <sys/stat.h> double *generate_Fb(int yN_size, int yB_size, double *pswf) { double *Fb = (double *)malloc(sizeof(double) * yB_size); int i; for (i = 0; i <= yB_siz...
lds-prob2.c
#include <stdio.h> #include <omp.h> int main() { int N = 100000; int a[N]; int b[N]; int i; for (i=0; i<N; i++){ a[i]=0; b[i]=i; } #pragma omp target teams distribute parallel for map(from: a[0:N]) map(to: b[0:N]) { for (int j = 0; j< N; j++) a[j]=b[j]; } int rc = 0; for (i=0; i<N; i++) if (a[i] != b...
triMeshAcceleratorBVH.h
#pragma once #ifndef _TRIMESH_ACCELERATOR_BVH_H_ #define _TRIMESH_ACCELERATOR_BVH_H_ namespace ml { template <class FloatType> struct TriangleBVHNode { TriangleBVHNode() : rChild(0), lChild(0), leafTri(0) {} ~TriangleBVHNode() { SAFE_DELETE(rChild); SAFE_DELETE(lChild); } //wait for vs 2013 ...
omp-1.c
#define _XOPEN_SOURCE 700 #include <stdio.h> #include <string.h> #include <openssl/evp.h> #include <fcntl.h> #include <unistd.h> #include <omp.h> #define ASCII_SPACE 32 #define ASCII_ZERO 48 #define BLOCK_SIZE 8 #define IV_LENGTH 8 #define KEY_LENGTH 16 #define CANT_KEYS 100000000 #define NUM_THREADS 2 static unsign...
scale_channels_layer.c
#include "scale_channels_layer.h" #include "dark_cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_scale_channels_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2) { fprintf(stderr,"scale Layer: %d\n", index); layer l = { (LAYER_TYPE)0 }; l.type = SCALE_CHAN...