source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_add_template.c
//------------------------------------------------------------------------------ // GB_add_template: phase1 and phase2 for C=A+B, C<M>=A+B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitespa...
GB_unop__carg_fp32_fc32.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...
2.norace1.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp simd for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i][j - 1]; } // CHECK: Region is Data Race Free. // END
p99.h
/* This may look like nonsense, but it really is -*- mode: C -*- */ /* */ /* Except for parts copied from previous work and as explicitly stated below, */ /* the authors and copyright holders for this work are as follows: ...
viterbi_decode_op.h
/* Copyright (c) 2021 PaddlePaddle 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 applicable law or agreed...
mod.c
#include <math.h> #include <stddef.h> #include "../sailfish.h" // ============================ COMPAT ======================================== // ============================================================================ #ifdef __ROCM__ #include <hip/hip_runtime.h> #endif #if !defined(__NVCC__) && !defined(__ROCM_...
requantize_leakyrelu_pack8.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 ...
hist_util.h
/*! * Copyright 2017 by Contributors * \file hist_util.h * \brief Utility for fast histogram aggregation * \author Philip Cho, Tianqi Chen */ #ifndef XGBOOST_COMMON_HIST_UTIL_H_ #define XGBOOST_COMMON_HIST_UTIL_H_ #include <xgboost/data.h> #include <xgboost/generic_parameters.h> #include <limits> #include <vector...
pipe.c
// Using the following command to compile your-c-file.c : // pgCC -mp -o pi04 your-c-file.c /************************************************************************* Parallelizing an inner loop with dependences Forward dependency (pipeline) for (iter=0; iter<numiter; iter++) { for (i=0; i<size-1; ...
Example_tasking.4.c
/* * @@name: tasking.4c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_3.0 */ int fib(int n) { int i, j; if (n<2) return n; else { #pragma omp task shared(i) i=fib(n-1); #pragma omp task shared(j) ...
GB_binop__plus_uint16.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_unop__log1p_fp32_fp32.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...
Merge_sort.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include "omp.h" #define max 1000 void generate_list(int *x,int n) { for(int i=0;i<n;i++) x[i]=rand()%n; } void print_list(int *x,int n) { for(int i=0;i<n;i++) printf("%d\t",x[i]); } void merge(int *x,int n,int *temp) { int i=0; int...
example-omp.c
// PWR009: Use OpenMP teams to offload work to GPU // https://www.appentra.com/knowledge/checks/pwr009 void example(double (*A)[100], double (*B)[100], double (*C)[100]) { #pragma omp target map(to: A[0:100][0:100], B[0:100][0:100]) map(tofrom: C[0:100][0:100]) { #pragma omp parallel default(none) shared(A, B, C...
cpu.c
/** * @file main.c * @brief This file contains the source code of the application to parallelise. * @details This application is a classic heat spread simulation. * @author Ludovic Capelli **/ #include <stdio.h> #include <stdlib.h> #include <mpi.h> #include <omp.h> #include <inttypes.h> #include <math.h> #include...
targc-272328.c
struct test_type { int *p1; } tt; #include "stdlib.h" #include "stdio.h" int C[10]; int main() { int i; int *p; tt.p1 = (int*) malloc(10*sizeof(int)); p=tt.p1; for (i=0; i<10; i++) { tt.p1[i] = i+100; C[i] = 0; } #pragma omp target map(tofrom: C) map(to: tt,...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
serial_tree_learner.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/dataset.h> #include <Ligh...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
shape.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
stribog_fmt_plug.c
/* * GOST R 34.11-2012 cracker patch for JtR. Hacked together during * the Hash Runner 2015 contest by Dhiru Kholia and Aleksey Cherepanov. * * Based on https://www.streebog.net/ and https://github.com/sjinks/php-stribog * code. See "LICENSE.gost" for licensing details of the original code. */ #include "arch.h" ...
GB_binop__rminus_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
helpers.h
#ifndef POWANNIER_HELPERS_H #define POWANNIER_HELPERS_H #include <complex> #include <vector> #include "aliases.h" namespace POWannier { #pragma omp declare reduction \ (compadd:arma::cx_double:omp_out=omp_out+omp_in) \ initializer(omp_priv=0) /** * @brief * Convenience function returning 0 for ...
GB_unop__acos_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
DistanceTableData.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeremy Mc...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ast-dump-openmp-begin-declare-variant_nested.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s // expected-no-diagnostics int also_before(void) { return 1; } #pragma omp begin declare variant match(user = {con...
hessian.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
task_dep2.c
#define NT 512 void spotrf(float); void ssyrk (float , float); void strsm(float , float); void sgemm(float , float, float); void blocked_cholesky( int NB, float A[NB][NB] ) { int i, j, k; for (k=0; k<NB; k++) { #pragma omp task depend(inout:A[k][k]) spotrf (A[k][k]) ; for (i=k+1; i<NT; i++) #pragma omp ...
RansacFitter.h
#ifndef SPECTAVI_RANSACFITTER_H #define SPECTAVI_RANSACFITTER_H #include "Camera.h" #include "DltTriangulator.h" #include "EigenDefinitions.h" #include "FundamentalMatrixFitter.h" #include <random> #include <iostream> #include <unordered_set> #ifdef ENABLE_OPENMP #include <omp.h> #endif namespace spectavi { #defin...
vector.h
#ifndef INCLUDED_VECTOR_H #define INCLUDED_VECTOR_H //!< Prevent multiple inclusion #include<vector> #include<assert.h> #include<config.h> /*!\file \brief Declaration/definition of Vector and Matrix classes. Also declarations of functions that perform operations on complex vectors. */ #include <str...
GB_unop__one_uint32_uint32.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__abs_int32_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ast-dump-openmp-section.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() { #pragma omp sections { #pragma omp section ; } } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{....
gbdt.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_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
test31.c
#include<stdio.h> #include<omp.h> int main () { int x = 0; #pragma omp parallel { int i; for (i = 0; i < 4; i++) { #pragma omp critical { printf("Iteration %d by Thread %d\n", i, omp_get_thread_num()); } #pragma omp task { printf("Single of iteration %d executed by %d\n", i, omp_get_thread_num())...
GB_unop__identity_uint64_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...
openmp-ex22.c
#include <stdio.h> #include <unistd.h> int main(void) { #pragma omp parallel { int i; char wait[BUFSIZ] = {'\0'}; /* Again, there is implicit synchronization at the end of a for directive */ #pragma omp for for (i = 0; i < 4; i++) { int j; for (j = 0; j < 4 * i; j++) wait[j] = ' '; ...
mvt.c
/** * mvt.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic....
GB_resize.c
//------------------------------------------------------------------------------ // GB_resize: change the size of a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-...
stepper.c
#include "stepper.h" #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <stdbool.h> #include <stdio.h> //ldoc on /** * ## Implementation * * ### Structure allocation */ central2d_t* central2d_init(float w, float h, int nx, int ny, int nfield, fl...
_spmv_G_NROWS_32000_G_NCOLS_32000_B_NROWS_4_B_NCOLS_MIN_12_B_NCOLS_MAX_20_B_NCOLS_STRIDE_4.c
/*@ begin PerfTuning ( def build { arg build_command = 'icc -O3 -openmp -lm -I/disks/fast/papi/include -L/disks/fast/papi/lib -lpapi'; } def performance_counter { arg repetitions = 100; } def performance_params { param UNROLL_FAC_OUT[] = [4]; param UNROLL_FAC_IN[] = [1,2,3,4,5,6,7,8]; param N_T...
convolution_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
conv_func_helper.h
/* Copyright (c) 2018 Anakin Authors, Inc. 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 app...
simde-diagnostic.h
/* SPDX-License-Identifier: MIT * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, ...
atomic-6.c
/* PR middle-end/36106 */ /* { dg-additional-options "-mieee" { target alpha*-*-* } } */ /* { dg-additional-options "-march=i586" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #ifdef __i386__ # include "cpuid.h" #endif extern void abort (void); union { unsigned long long l; double d; } u = { .l = 0x7ff00000000...
sample_sections_barrier.c
/* Andre Augusto Giannotti Scota (https://sites.google.com/view/a2gs/) */ #include <stdio.h> #include <stdlib.h> #include <omp.h> #include "openmp_util.h" int main(int argc, char *argv[]) { /* #pragma omp parallel num_threads(3) */ /* omp_set_num_threads(2); */ dumpEnviroment(); printf("Starting...\n\n"); #p...
elemwise_binary_op.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 ...
squeeze_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...
GB_unaryop__abs_uint32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__iseq_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-...
pt.c
/* Handle parameterized types (templates) for GNU -*- C++ -*-. Copyright (C) 1992-2018 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 ...
libsais64.c
/*-- This file is a part of libsais, a library for linear time suffix array and burrows wheeler transform construction. Copyright (c) 2021-2022 Ilya Grebnov <ilya.grebnov@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Licens...
dualize.h
/* Copyright 2013 IST Austria Contributed by: Ulrich Bauer, Michael Kerber, Jan Reininghaus This file is part of PHAT. PHAT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either vers...
cancel_taskgroup.c
// RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: clang-3, clang-4.0.0 // Current GOMP interface implementation does not support cancellation; icc 16 has a bug // XFAIL: gcc, icc-16 #include "callback.h" #include <unistd.h> #include <st...
GB_unaryop__identity_uint32_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
matrix.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ninvr.c
//-------------------------------------------------------------------------// // // // 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...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
run_network.c
#include "const.def" #include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> #include "sds_lib.h" #include "run_network.h" #include "hw_convs.h" #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define MIN(x, y) (((x) < (y)) ? (x) : (y)) bits_t integer_bits_per_act_layer[] = { 8, /...
GB_binop__islt_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...
GB_unaryop__abs_int32_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
IJMatrix_parcsr.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) **************************************...
c-parser.c
/* Parser for C and Objective-C. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat influenced by and fragments based on the C++ parser. This file...
matMul.c
/* * File: saxpy.c * Author: Malcolm Davis * Course: Computer Architecture II * Created on Feb 24, 2018 * Simple matrix multiplication with OpenMP * * Ussage: * ./argv[0] for default parameters and random vectors or; * ./argv[0] <m matrix 1 size> <n matrix 1 size> <m matrix 2 size> <n matrix 2 size> */ ...
kinFoodWeb_kry_omp.c
/* ----------------------------------------------------------------- * Programmer(s): Ting Yan @ SMU * Based on kinFoodWeb_kry.c and parallelized with OpenMP * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2020, Lawrence Livermore National Se...
GB_unaryop__identity_int8_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unaryop__lnot_bool_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
omp_for_lastprivate_nothreadprivate.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" int test_omp_for_lastprivate() { int sum = 0; int known_sum; int i0; i0 = -1; #pragma omp parallel { int sum0 = 0; { /* Begin of orphaned block */ int i; #pragma omp for schedule(static,7)...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
hmacSHA224_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 */ #if FMT_EXTERNS_H extern struct fmt_main fmt_hmac...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ast-dump-openmp-taskloop.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 taskloop for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp taskloop for (int i = 0; i < x; i++) f...
getEnv.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid, procs, maxt, inpar, dynamic, nested; /* Start parallel region */ #pragma omp parallel private(nthreads, tid) { /* Obtain thread number */ tid = omp_get_thread_num(); /* Only master thread does thi...
keyring_fmt_plug.c
/* GNOME Keyring cracker patch for JtR. Hacked together during Monsoon of * 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in s...
problem.c
/*! @copyright (c) 2017 King Abdullah University of Science and * Technology (KAUST). All rights reserved. * * STARS-H is a software package, provided by King Abdullah * University of Science and Technology (KAUST) * * @file src/control/problem.c * @version 0.3.0 * @author Aleks...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determineFileType ( std::vector<std::string> argv, int nextErrorCode, SgProject* project ); #else SgFile...
TriOP.h
#ifndef TRIOP_H_ #define TRIOP_H_ /* * TriOP.h: * a simple feed forward neural operation, triple input. * * Created on: June 11, 2017 * Author: mszhang */ #include "Param.h" #include "MyLib.h" #include "Node.h" #include "Graph.h" class TriParams { public: Param W1; Param W2; Param W3; Param ...
timestep_opt2.c
#include <math.h> #include "timestep.h" #define REAL_CELL 1 double timestep(int ncells, double g, double sigma, int* celltype, double* H, double* U, double* V, double* dx, double* dy){ double wavespeed, xspeed, yspeed, dt; double mymindt = 1.0e20; #pragma omp simd private(wavespeed, xspeed, yspee...
DRB038-truedepseconddimension-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...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
GB_unaryop__minv_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
jacobi-task.c
#include "hclib.h" #ifdef __cplusplus #include "hclib_cpp.h" #include "hclib_system.h" #ifdef __CUDACC__ #include "hclib_cuda.h" #endif #endif # include "poisson.h" /* #pragma omp task/taskwait version of SWEEP. */ typedef struct _pragma21_omp_task { int i; int (*it_ptr); int j; int (*nx_ptr); int ...
core_dtslqt.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_ztslqt.c, normal z -> d, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
HierarchyOptimizationHelper.h
/* This file is part of the implementation for the technical paper Field-Aligned Online Surface Reconstruction Nico Schertler, Marco Tarini, Wenzel Jakob, Misha Kazhdan, Stefan Gumhold, Daniele Panozzo ACM TOG 36, 4, July 2017 (Proceedings of SIGGRAPH 2017) Use of this source code is granted via a BSD-style l...
fc_compute.h
/* Copyright (c) 2016 PaddlePaddle 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 applicable law or...
test.c
#include <papi.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <pthread.h> #define N 16777216 unsigned long wrap_gettid( void ){ return (unsigned long) omp_get_thread_num(); } int main(){ int retval; unsigned long int tid; int *array; retval = PAPI_library_init(PAPI_VER_CURRENT); a...
linalg.h
/* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal * * This file is part of SPAMS. * * SPAMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your optio...
helloMP.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main (int argc, char **argv) { //number of parallel threads that OpenMP should use int NumThreads = 10; //tell OpenMP to use NumThreads threads omp_set_num_threads(NumThreads); float *val = (float*) malloc(NumThreads*sizeof(float)); int winner = 0; ...
_phonopy.c
/* Copyright (C) 2011 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
target_parallel_for_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 parallel for simd'}} #pragma omp target parallel for simd // expected-error@+1 {{unexpected OpenMP dire...
openmp_error.c
#include <stdio.h> #include <omp.h> #define N 10000 int main (int argc, char **argv) { int a[N]; int j = N; // [...] initialisiere array #pragma omp parallel for for (int i = 0; i < N - 2; i++) { #pragma omp critical a[i] = a[i] + a[j]; j--; } }
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...
single.c
#include <stdio.h> #include <omp.h> int main() { int n = 9, i, a, b[n]; for (i=0; i<n; i++) b[i] = -1; #pragma omp parallel { #pragma omp single { printf("Introduce valor de inicialización a: "); scanf("%d", &a ); printf("Single ejecutada por el thread %d\n", omp_g...
testMatrixMultiply_OpenMp.c
#include "mex.h" #include <omp.h> #include <stdio.h> #include <stdlib.h> #define A_IN prhs[0] /* (M * P) */ #define B_IN prhs[1] /* (P * N) */ #define C_OUT plhs[0] /* (M * N) */ void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { double *pA, *pB, *pC; int i, j, k; mwSiz...
teams-2.c
/* { dg-do run } */ #include <stdlib.h> #define EPS 0.0001 #define N 1024*1024 void init (float B[], float C[], int n) { int i; for (i = 0; i < n; i++) { B[i] = 0.1 * i; C[i] = 0.01 * i * i; } } float dotprod_ref (float B[], float C[], int n) { int i; float sum = 0.0; for (i = 0; i < ...
conv_kernel_fp16_arm82.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...
pr79431.c
/* PR c/79431 */ void foo (void) { int a; #pragma omp declare target (a) }