source
stringlengths
3
92
c
stringlengths
26
2.25M
hello.c
// OpenMP program to print Hello World // using C language // OpenMP header #include <omp.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { // Beginning of parallel region #pragma omp parallel { printf("Hello World... from thread = %d\n", omp_get_...
YAKL_mem_transfers.h
#pragma once template <class T1, class T2, typename std::enable_if< std::is_same< typename std::remove_cv<T1>::type , typename std::remove_cv<T2>::type >::value , int >::type = 0> inline void memcpy_host_to_host(T1 *dst , T2 *src , index_t ele...
assemble.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "common.h" #include "string_graph.h" #ifdef __OPENMP__ #include <omp.h> #endif #ifdef __TIMING__ #include <time.h> #include <sys/time.h> #endif // TODO: clean the memory inline void destroy_node (node_t * node) { if (node->path_q->path != NULL)...
bml_threshold_dense_typed.c
#ifdef BML_USE_MAGMA #include "magma_v2.h" #include "../bml_export.h" #include "bml_export_dense.h" #endif #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_threshold.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_allocate_dense.h" #include "bml_threshold_dense.h" #include...
GB_unaryop__lnot_int32_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
direct_task.c
//===-- direct_task.c - Task example with code outlining shown ----*- 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 // //===---------------------------...
engine.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/) * * 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 Lic...
ZQ_CNN_MTCNN.h
#ifndef _ZQ_CNN_MTCNN_H_ #define _ZQ_CNN_MTCNN_H_ #pragma once #include "ZQ_CNN_Net.h" #include "ZQ_CNN_BBoxUtils.h" #include <omp.h> namespace ZQ { class ZQ_CNN_MTCNN { public: using string = std::string; ZQ_CNN_MTCNN() { min_size = 60; thresh[0] = 0.6; thresh[1] = 0.7; thresh[2] = 0.7; nms_thr...
stream_malloc.c
// Copyright 2009-2021 NTESS. Under the terms // of Contract DE-NA0003525 with NTESS, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2021, NTESS // All rights reserved. // // Portions are copyright of other developers: // See the file CONTRIBUTORS.TXT in the top level directory...
GB_unaryop__abs_fp64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ZMQComm.h
/*! @brief Flag for checking if this header has already been included. */ #ifndef YGGZMQCOMM_H_ #define YGGZMQCOMM_H_ #include <CommBase.h> #include "../datatypes/datatypes.h" #ifdef ZMQINSTALLED #include <czmq.h> #endif #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ extern "C" { #endif #ifdef ZM...
GB_binop__bxor_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
extract_image_patches.h
/* Copyright 2018 The Blueoil 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 agre...
first.c
int main() { const int N = 10; int i; #pragma omp parallel for for(i = 0; i < N; i++) { printf("I am counter %d\n", i); } }
sse.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, ...
GB_dense_subassign_21.c
//------------------------------------------------------------------------------ // GB_dense_subassign_21: C(:,:) = x where x is a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Iden...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__band_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
main.c
/* #define _XOPEN_SOURCE 500 */ #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <inttypes.h> #include <limits.h> #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif #ifdef _OPENMP #include <omp.h> #endif /* for ope...
GB_unaryop__abs_uint8_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...
move_shallow_water_particle_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // ...
kernel.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double section0; } ; int Kernel(const float dt, const float h...
pr38676.c
/* PR middle-end/38676 */ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ int main () { int bar, foo = 1; #pragma omp parallel for shared(foo) for (bar = 0; bar < 3; bar++) { switch (foo) { case 1: break; } } return 0; }
implicit_task_data.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // This test checks that values stored in task_data in a barrier_begin event // are still present in the corresponding barrier_end event. // Therefore, callback implementations different from the ones in callback.h are neccessary. // This...
GB_binop__minus_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
generated-funcs-regex.c
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck %s void __test_offloading_42_abcdef_bar_l123(void); void use(int); void foo(int a) { #pragma omp target use(a); __test_offloading_42_abcdef_bar_l123(); int somevar_abc123_; }
yescrypt-simd.c
/*- * Copyright 2009 Colin Percival * Copyright 2012-2014 Alexander Peslyak * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the ab...
omptest.c
#include <stdio.h> #include <omp.h> int main(){ printf("Hello World\n"); int num_threads; int my_num; #pragma omp parallel private(num_threads, my_num) { my_num = omp_get_thread_num(); num_threads = omp_get_num_threads(); printf("I am %2d of %d\n", my_num+1, num_t...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__identity_fp64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
QuadNode.h
/* * QuadNode.h * * Created on: 21.05.2014 * Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu) */ #ifndef QUADNODE_H_ #define QUADNODE_H_ #include <vector> #include <algorithm> #include <functional> #include <assert.h> #include "../../auxiliary/Log.h" #include "../../auxiliary/Parallel.h" #include ".....
sectorbuilder.impl.h
#include "./sectorbuilder.h" #include "../matslise.h" #include "./heap.h" #include <algorithm> #include <vector> #include <tuple> using namespace matslise; template<typename Scalar, typename Problem> static typename Problem::Sector * refineSector(const typename Problem::Sector &sector, const Problem *problem, const ...
for_ordered.c
#include <stdio.h> #include <math.h> #include "omp_testsuite.h" static int last_i = 0; /* Utility function to check that i is increasing monotonically with each call */ static int check_i_islarger (int i) { int islarger; islarger = (i > last_i); last_i = i; return (islarger); } int check_for_ordered (FILE...
image-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % IIIII M M AAA GGGG EEEEE ...
core_cunmqr.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_zunmqr.c, normal z -> c, Fri Sep 28 17:38:25 2018 * **/ #include <plasma_core_blas.h> #include "pla...
mm.c
#include "util.h" #include "mm.h" /* Threads shared variables */ int **A; int **B; int **C; int size = SIZE; int threads = 0; /* Sequential dummy code */ void start_seq() { TIME() for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { for (int k = 0; k < size; k++) { C[i][j] += A[i][k] * B[k][j]...
Rasterizer.h
/* MIT License Copyright (c) 2017 trenki2 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, distri...
openmp_mandelbrot.c
/* c program: -------------------------------- 1. draws Mandelbrot set for Fc(z)=z*z +c using Mandelbrot algorithm ( boolean escape time ) ------------------------------- 2. technique of creating ppm file is based on the code of Claudio Rocchini http://en.wikipedia.org/wiki/Image:Color_complex_plot.j...
LAGraph_dense_relabel.c
//------------------------------------------------------------------------------ // LAGraph_dense_relabel: dense relabeling of ids to matrix indices //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Id...
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 // //===---------------------------...
softmax-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
fill_ints_sr.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
GB_binop__ldexp_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-...
GB_hyper_prune.c
//------------------------------------------------------------------------------ // GB_hyper_prune: remove empty vectors from a hypersparse Ap, Ah list //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
lap.h
#include <cassert> #include <cstdio> #include <limits> #include <memory> #include <immintrin.h> #ifdef __GNUC__ #define always_inline __attribute__((always_inline)) inline #define restrict __restrict__ #elif _WIN32 #define always_inline __forceinline #define restrict __restrict #else #define always_inline inline #de...
build.c
/** * @file * @author Ryan Moore * @brief I contain the build function for ONF. */ #include <assert.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <rya_file.h> #include <rya_format.h> #include "build.h" #include "array.h" #include "const.h" #include "file.h" #include ...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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 // //===---------------------------...
fisher.c
/** @file fisher.c ** @brief Fisher - Declaration ** @author David Novotny **/ /* Copyright (C) 2013 David Novotny and Andrea Vedaldi. All rights reserved. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). */ /** <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~...
GB_unaryop__lnot_uint16_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...
mpm_search_element_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Bodhinanda Chandra // #ifndef KRATOS_MPM_SEARC...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
bml_copy_csr_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_logger.h" #include "../bml_allocate.h" #include "bml_allocate_csr.h" #include "../bml_copy.h" #include "../bml_types.h" #include "bml_copy_csr.h" #include "bml_types_csr.h" #include <complex.h> #include <stdlib.h> #include <string.h> #include <assert....
GB_unaryop__identity_int8_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
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...
interpolate_v2_op.h
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. 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...
ExplicitGeometry.h
/* * MIT License * * Copyright (c) 2018-2019 Benjamin Köhler * * 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, c...
matrix.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "pix.h" void *vdup(void *v, int vlen) { void *r; if (v == NULL || vlen == 0) return NULL; if ((r = malloc(vlen)) == NULL) pstop("!!! vdup: not enough memory.\n"); memcpy(r, v, vlen); return r; } void vadd_s(int vlen, int op, s...
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) **************************************...
main.c
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> #include "twoway_msd.h" #include "textbook_msd.h" #include "result_control.h" #include <time.h> #define max_width 5 #define n_repeat 10 //int main(int argc, char *argv[]) int main() { printf("\n\t**********************************\n"); dou...
maskedraster.h
#pragma once #include "cpupredicates-private.h" #include "eigeniterationsupport-private.h" #include "gdx/cell.h" #include "gdx/exception.h" #include "gdx/maskedrasteriterator.h" #include "gdx/rasterchecks.h" #include "gdx/rastermetadata.h" #include "infra/cast.h" #include "infra/span.h" #include <Eigen/Core> #include...
RNAdos.c
/* * Compute the density of states * * c Gregor Entzian, Ronny Lorenz * Vienna RNA package */ #include <stdlib.h> #include "ViennaRNA/utils/basic.h" #include "ViennaRNA/utils/structures.h" #include "ViennaRNA/params/io.h" #include "ViennaRNA/datastructures/basic.h" #i...
paradis.h
#pragma once #include <omp.h> #include <algorithm> #include <cassert> #include <chrono> #include <climits> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <random> #include <sstream> #include <thread> #include <vector> namespace paradis { static const size_t RADIX_BITS = 8; st...
hydro_funcs.c
/* A simple 2D hydro code (C) Romain Teyssier : CEA/IRFU -- original F90 code (C) Pierre-Francois Lavallee : IDRIS -- original F90 code (C) Guillaume Colin de Verdiere : CEA/DAM -- for the C version */ /* This software is governed by the CeCILL license under French law and abiding by the rules o...
target_data-1.c
/* { dg-do run } */ #include <stdlib.h> const int MAX = 1800; void check (long long *a, long long *b, int N) { int i; for (i = 0; i < N; i++) if (a[i] != b[i]) abort (); } void init (long long *a1, long long *a2, int N) { long long s = -1; int i; for (i = 0; i < N; i++) { a1[i] = s; ...
GB_unop__identity_fp64_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_convert_sparse_to_hyper.c
//------------------------------------------------------------------------------ // GB_convert_sparse_to_hyper: convert a matrix from sparse to hyperspasre //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. //...
GB_binop__isge_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...
taskwait.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 // XFAIL: powerpc64le, ppc64le #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { #pragma omp master { #pragma omp task ...
scheduleg-clause.c
/* * sheduleg-clause.c * * Created on: 28/04/2014 * Author: Carlos de la Torre */ #include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n = 20, chunk, hebras = 1, a[n], suma = 0; if (argc < 4) { if (a...
NDArray.h
#ifndef NDARRAY_H #define NDARRAY_H #include <initializer_list> #include <functional> #include <shape.h> #include "NativeOpExcutioner.h" #include <memory/Workspace.h> #include <indexing/NDIndex.h> #include <indexing/IndicesList.h> #include <graph/Intervals.h> #include <array/DataType.h> #include <stdint.h> #include <a...
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...
test.c
#include <stdio.h> #include <omp.h> #include <string.h> int main(int argc, char * argv[]) { printf("there are %d arguments found\n", argc); for(int i = 0; i < argc; i++) { printf("%s\n", argv[i]); } char strArr[1][1000] = {'\0'}; // char arr[1][255] = {"./tools/programmingTools/c_tools/...
openmp_array1.c
///TAFFO_TEST_ARGS -Xvra -propagate-all -fopenmp #include <stdio.h> #define MAX_N (100) int main(int argc, char *argv[]) { float array[MAX_N] __attribute__((annotate("target('array') scalar(range(0,100) final)"))); int i = 0; #pragma omp parallel for for (i = 0; i < MAX_N; i++) { array[i] = i * 1.0; ...
GB_binop__bor_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-...
dormlq.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/compute/zunmlq.c, normal z -> d, Fri Sep 28 17:38:04 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
GB_binop__bget_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
nested.c
// RUN: %compile-run-and-check #include <omp.h> #include <stdio.h> const int MaxThreads = 1024; const int NumThreads = 64; const int NumThreads1 = 1; int main(int argc, char *argv[]) { int inParallel = -1, numThreads = -1, threadNum = -1; int check1[MaxThreads]; int check2[MaxThreads]; for (int i = 0; i < Ma...
mkl_util.h
/* Copyright 2017 The TensorFlow 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 a...
cpd_hicoo.c
/* This file is part of ParTI!. ParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
GB_unaryop__lnot_uint8_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...
convolution_sgemm_pack1to4_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 ...
rose_v1_firstprivate.c
#include <omp.h> int g; void foo() { int i; int x; int y = 1; int a[100]; int b[100]; #pragma omp parallel for private (y,i) firstprivate (x) for (i = 0; i <= 99; i += 1) { y = x + 1 + g; b[i] = x + 1 + g; // x=... // ... =x } x = g; } int a[100]; void foo2() { int i; int tmp; tmp = ...
hyantes_run.c
/** * @file hyantes_run.c * @brief definition of processing functions * @author Sebastien Martinez and Serge Guelton * @date 2011-06-01 * * This file is part of hyantes. * * hyantes is free software; you can redistribute it and/or modify * it under the terms of the CeCILL-C License * * You should have received a copy o...
cpu_ctc.h
#pragma once #include <tuple> #include <cmath> #include <limits> #include <algorithm> #include <numeric> #if !defined(CTC_DISABLE_OMP) && !defined(__APPLE__) #include <omp.h> #endif #include "ctc_helper.h" template<typename ProbT> class CpuCTC { public: // Noncopyable CpuCTC(int alphabet_size, int minibatc...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2018 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
transform.h
/*! * Copyright 2018 XGBoost contributors */ #ifndef XGBOOST_COMMON_TRANSFORM_H_ #define XGBOOST_COMMON_TRANSFORM_H_ #include <dmlc/omp.h> #include <xgboost/data.h> #include <vector> #include <type_traits> // enable_if #include "host_device_vector.h" #include "common.h" #include "span.h" #if defined (__CUDACC__) ...
restriction.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
a.35.1.c
/* { dg-do compile } */ void work (int i, int j) { } void wrong1 (int n) { #pragma omp parallel default(shared) { int i, j; #pragma omp for for (i = 0; i < n; i++) { /* incorrect nesting of loop regions */ #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < n; j++) wor...
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...
GB_unop__identity_uint8_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
tinyexr.h
#ifndef TINYEXR_H_ #define TINYEXR_H_ /* Copyright (c) 2014 - 2020, Syoyo Fujita and many contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain th...
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...
sse-bnd-dag0.h
#include <util/omp_wrapper.h> void wilson_dslash_bnd_dag0( IFloat *chi_p_f, IFloat *u_p_f, IFloat *psi_p_f, int cb, Wilson *wilson_p) { int lx, ly, lz, lt; int cbn; int vol; lx = wilson_p->ptr[0]; ly = wilson_p->ptr[1]; lz = wilson_p->ptr[2]; lt = wilson_p->ptr[3...
GB_unaryop__lnot_uint8_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...
GB_binop__gt_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
compute_density_3d_test.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <sys/time.h> #include <inttypes.h> #include <omp.h> #include <gsl/gsl_math.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <gsl/gsl_heapsort.h> #include "sph_data_types.h" #include "sph_linked_list.h" #include "sph...
fprintf-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_binop__eq_int8.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__ainv_uint8_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...