source
stringlengths
3
92
c
stringlengths
26
2.25M
test9.c
void foo (int a) { 0; if (1) { 2; #pragma omp barrier 3; } else { 4; foo(3); 5; } } int main() { #pragma omp parallel { 6; if (7) { 8; foo(9); 10; } else { 11; #pragma omp barrier 12; #pragma omp barrier 13; } 14; #pragma omp barrier 15; } }
kernel.cl.openmp.h
#include <brisbane/brisbane_openmp.h> static void saxpy0(float* Z, float A, float* X, BRISBANE_OPENMP_KERNEL_ARGS) { size_t _id; #pragma omp parallel for shared(Z, A, X) private(_id) BRISBANE_OPENMP_KERNEL_BEGIN Z[_id] = A * X[_id]; BRISBANE_OPENMP_KERNEL_END } static void saxpy1(float* Z, float* Y, BRISBANE_...
relu_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...
elementwise_add_arm_func.h
/* Copyright (c) 2018 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...
VolumetricAveragePooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricAveragePooling.c" #else static inline void THNN_(VolumetricAveragePooling_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, int kT, ...
sparselu.c
/* * This file belongs to the Galois project, a C++ library for exploiting parallelism. * The code is being released under the terms of the 3-Clause BSD License (a * copy is located in LICENSE.txt at the top-level directory). * * Copyright (C) 2018, The University of Texas at Austin. All rights reserved. * UNIVER...
GB_unop__asin_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
build.c
#ifndef BUILD_C #define BUILD_C #include <string.h> /* memcpy() */ #include <stdio.h> /* Printing to stdout/stderr */ #include <stdlib.h> /* malloc()/free() */ #include <complex.h> /* Complex numbers */ #include <errno.h> /* Errors from parsing user input */ #include "build.h" #include "utils.c" ...
test.c
#include <stdio.h> #include "../utilities/check.h" #define N 100 int test_aligned(){ int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; int *b = a; // offload #pragma omp target map(tofrom: b[0:100]) { #pragma omp teams #pragma omp distribute simd a...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
test_mkl.h
#include <iostream> #include <stdint.h> #include <mkl_vsl.h> void mkl_rng(double *ran, const int n, const int method, const int brng) { const double a = 0.0, b = 1.0; uint32_t iseed = 13579; int errcode; VSLStreamStatePtr stream; errcode = vslNewStream(&stream, brng, iseed); if (errcode != VSL...
deconvolution_pack4to1.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 ...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
layer_example_f32.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
target_teams_distribute_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}} #pragma omp target teams distribute // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams di...
hermv_c_bsr_u_hi.c
#include<string.h> #ifdef _OPENMP #include<omp.h> #endif #include"alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_Numb...
GB_binop__isne_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-...
SparseOperations_impl.h
// Copyright (c) 2004-2022 Tomáš Oberhuber et al. // // This file is part of TNL - Template Numerical Library (https://tnl-project.org/) // // SPDX-License-Identifier: MIT // Implemented by: Jakub Klinkovský #pragma once #include <type_traits> #include <stdexcept> #include <algorithm> #include <memory> // std::uniq...
composite_loop.c
/* SIMD loops without and with the simd schedule modifier The simd schedule modifier in func_2() guarantees that a preferred implementation-defined vector length is respected when distributing the loop. */ void func_1(float *a, float *b, int n) { #pragma omp for simd schedule(static, 5) for (int ...
hello.c
#include <stdio.h> int main(int argc, char *argv[]) { printf("Hello world!\n"); #pragma omp parallel { printf("X\n"); } return 0; }
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
omp_init_lock.c
// RUN: %libomp-compile-and-run #include "omp_testsuite.h" #include <stdio.h> // This should be slightly less than KMP_I_LOCK_CHUNK, which is 1024 #define LOCKS_PER_ITER 1000 #define ITERATIONS (REPETITIONS + 1) // This tests concurrently using locks on one thread while initializing new // ones on another thread. Th...
ast-dump-openmp-declare-variant-extensions-messages.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify %s -x c++ int dummy() { return 1; } #pragma omp declare variant(dummy) match(implementation={extension(match_any,match_all)}, device={kind(cpu, gpu)}) // expected-error {{only a sin...
convolution_3x3_pack8to1_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 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 ...
mxnet_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 ...
GB_binop__rdiv_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Main.c
#include "XSbench_header.h" #include "marker_stub.h" #ifdef MPI #include<mpi.h> #endif int main( int argc, char* argv[] ) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int...
sapH_fmt_plug.c
/* * this is a SAP-H plugin for john the ripper. * Copyright (c) 2014 JimF, 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. * * The internals of this algorithm were found on the hashcat ...
par_rap.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) **************************************...
simd-14.c
/* { dg-do run } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ int main () { int i, j, b, c = 0; i = 4; j = 4; b = 7; #pragma omp simd linear(b:2) reduction(+:c) for (i = 0; i < 64; i++) { c = c + (b != 7 + 2 * i); ...
task_early_fulfill.c
// RUN: %libomp-compile && env OMP_NUM_THREADS='3' \ // RUN: %libomp-run | %sort-threads | FileCheck %s // REQUIRES: ompt // Checked gcc 10.1 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10 // gcc 11 introduced detach clause, but gomp interfac...
convolutiondepthwise_3x3_int8.h
// SenseNets is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2018 SenseNets Technology Ltd. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of t...
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...
gather_nd_op_cpu_impl.h
/* Copyright 2016 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...
coordinate_common.h
/*! * Copyright 2018 by Contributors * \author Rory Mitchell */ #pragma once #include <algorithm> #include <string> #include <utility> #include <vector> #include <limits> #include "xgboost/data.h" #include "xgboost/parameter.h" #include "./param.h" #include "../gbm/gblinear_model.h" #include "../common/random.h" n...
nblist.c
#include <stdio.h> #include <stddef.h> #include <stdlib.h> #include "defreal.h" #if (defined(_OPENMP) || defined(SPEC_OPENMP)) && !defined(SPEC_SUPPRESS_OPENMP) && !defined(SPEC_AUTO_SUPPRESS_OPENMP) # undef OPENMP # define OPENMP #else # undef OPENMP #endif #ifdef OPENMP #include <omp.h> #endif #if defined(MPI) || ...
pkzip_fmt_plug.c
/* PKZIP patch for john to handle 'old' pkzip passwords (old 'native' format) * * Written by Jim Fougeron <jfoug at cox.net> in 2011. No copyright * is claimed, and the software is hereby placed in the public domain. * In case this attempt to disclaim copyright and place the software in the * public domain is dee...
blake2bp-ref.c
/* BLAKE2 reference source code package - reference C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is dist...
VariableSizeMatrix.h
// Copyright (c) 2017, Lawrence Livermore National Security, LLC and // UT-Battelle, LLC. // Produced at the Lawrence Livermore National Laboratory and the Oak Ridge // National Laboratory. // LLNL-CODE-743438 // All rights reserved. // This file is part of MGmol. For details, see https://github.com/llnl/mgmol. // Plea...
erotima_2b.c
#include <stdio.h> #include <math.h> #include <getopt.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> #include <string.h> #include <cblas.h> #define MIN_NUM_OF_NEURONS (1L) #define DEF_NUM_OF_NEURONS (1000L) #define MIN_NUM_OF_NEIGHBORS (0L) #define DEF_NUM_OF_NEIGHBORS (300L) #define DEF_DT ...
no_wait.c
#include<stdio.h> #include<omp.h> int main() { #pragma omp parallel { int tid = omp_get_thread_num(); #pragma omp for nowait for(int i=0; i<10; i++) { printf("Thread : %d | %d\n", tid, i); } printf("%d -> Hello\n", tid); } }
zgeswp.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
GB_binop__isne_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
convolution_sgemm_pack4to1.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 ...
simd4.c
#include <math.h> void main(int n,int m,float *a,float *b) { int i; #pragma omp simd if(simd:test) simdlen(8) safelen(8) { for (i = 1; i < n; i++) b[i] = ((a[i] + a[i - 1]) / 2.0); } }
pooling_2x2_pack16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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 ...
initialcondition.c
#include <string.h> #include <math.h> #include <mpi.h> #include <gsl/gsl_rng.h> #include <fastpm/libfastpm.h> #include <fastpm/logging.h> #include "pmpfft.h" /* The following functions fill the gaussian field*/ static void pmic_fill_gaussian_gadget(PM * pm, FastPMFloat * delta_k, int seed); static void pmic_fill_gau...
GB_binop__pair_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
common.c
#include "common.h" #include "linsys.h" #define MIN_SCALE (1e-3) #define MAX_SCALE (1e3) abip_int ABIP(copy_A_matrix) ( ABIPMatrix **dstp, const ABIPMatrix *src ) { abip_int Annz = src->p[src->n]; ABIPMatrix *A = (ABIPMatrix *)abip_calloc(1, sizeof(ABIPMatrix)); if (!A) { ...
uniform_grid_environment.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
feature.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
header.h
/*-------------------------------------------------------------------- c--------------------------------------------------------------------- c c header.h c c--------------------------------------------------------------------- c-------------------------------------------------------------------*/ /*---------------...
GB_to_nonhyper.c
//------------------------------------------------------------------------------ // GB_to_nonhyper: convert a matrix to non-hypersparse form //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesp...
md5.c
/* * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. * MD5 Message-Digest Algorithm (RFC 1321). * * Homepage: * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 * * Author: * Alexander Peslyak, better known as Solar Designer <solar at openwall.com> * * ...
GB_binop__plus_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
network.h
// == mojo ==================================================================== // // Copyright (c) gnawice@gnawice.com. All rights reserved. // See LICENSE in root folder // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation...
ex2.c
#include <stdlib.h> #include <omp.h> #include <stdio.h> #include <math.h> #define N 1000 #define CHUNKSIZE 4 int * scan(int * num, int len); int main(int argc, char *argv[]) { int i=0; int read; int k = 0; printf("Enter the number k to set the length of the array(len=2^k):\n"); scanf("%d", &read); k=read; printf("Ok, ...
nestedpar1.c
#include<omp.h> #include <stdio.h> void paroutput(char* s) { } int main(void) { #ifdef _OPENMP omp_set_nested(1); #endif #pragma omp parallel { #pragma omp parallel printf("before single.\n"); #pragma omp single { #pragma omp parallel printf("Inside single.\n"); } #pragma omp parallel pri...
libgomp.h
/* Copyright (C) 2005-2017 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
OscarIntegration.h
#pragma once #include <algorithm> #include <execution> #include <iostream> #include <mutex> #include <random> #include <unordered_map> #include <unordered_set> #include <thread> #include <path_finder/storage/CellIdStore.h> #include <path_finder/graphs/CHGraph.h> namespace pathFinder { inline namespace std_threads_va...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- 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 // //===---------------------------...
GB_unop__acosh_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
salted_sha1_fmt_plug.c
/* * generic salted-sha1 support for LDAP style password storage * * Copyright (c) 2003 Simon Marechal, salt length fixes (c) 2012 magnum * * Redistribution and use in source and binary forms, with or without * modification, are permitted. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_saltedsha; #elif FMT_REG...
activation.h
// Copyright 2018 Xiaomi, 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 applicab...
nsincompressible.h
//***************************************************************************** // Title : src/equation/nsincompressible.h // Author : Tanabe Yuta // Date : 2021/10/07 // Copyright : (C)2021 TanabeYuta //***************************************************************************** #prag...
dctz-comp-lib.c
/** * @file dctz-comp-lib.c * @author Seung Woo Son * @date July 2019 * @brief DCTZ compression library routine * (C) 2019 University of Massachuetts Lowell. See LICENSE in top-level directory. */ #include <stdlib.h> #include <memory.h> #include <string.h> #ifdef TIME_DEBUG #include <sys/time.h> #endif /* ...
Synchronization.h
//===- Synchronization.h - OpenMP synchronization utilities ------- 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 // //===---------------------------...
mandel-omp-task.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
pvmt-OpenMP.c
#include <stdlib.h> #include <stdio.h> #include<time.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif //#define PRINT_ALL //#define VECTOR_GLOBAL #define VECTOR_DYNAMIC #ifdef VECTOR_GLOBAL #define MAX 32768 //=2^10 double v[MAX], m[MAX][MAX], r[MAX]; #endif omp_sched_t charToSchedT...
GB_binop__lxor_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
com_qmp.c
/****************** com_qmp.c *****************************************/ /* Communications routines for the SU3 program MIMD version 7. This file is communications-scheme dependent. QMP version - allegedly machine independent */ /* Modifications 5/09/02 officially split from com_mpi.c and modified for Q...
GB_binop__lor_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-...
taskwait-depend.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // taskwait with depend clause was introduced with gcc-9 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 // icc does not yet support taskwait with depend clause // XFAIL: icc // support for taskwait with depend clause introduced in cl...
3d25pt.c
/* * Order-2, 3D 25 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)...
GB_subref_slice.c
//------------------------------------------------------------------------------ // GB_subref_slice: construct coarse/fine tasks for C = A(I,J) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suit...
SubmodularFunction.h
#ifndef EXEMCL_SUBM_FUNCTION_H #define EXEMCL_SUBM_FUNCTION_H #include <src/io/DataTypes.h> #include <thread> #include <utility> namespace exemcl { /** * Submodular functions represent a special kind of set function, which map subsets (usually denoted as \f$S\f$) of some ground set * (denoted by \f$V\f$...
test.c
#include <stdio.h> #include <omp.h> omp_lock_t my_lock; int main(int argc, char **argv) { int i, thread_id; int global_nloops, private_nloops; global_nloops = 0; #pragma omp parallel private(private_nloops, thread_id) { private_nloops = 0; thread_id = omp_get_thread_num(); #pragma omp...
GB_unaryop__lnot_fp32_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...
depend-1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ extern int a[][10], a2[][10]; int b[10], c[10][2], d[10], e[10], f[10]; int b2[10], c2[10][2], d2[10], e2[10], f2[10]; int k[10], l[10], m[10], n[10], o; int *p; void bar (void); int t[10]; #pragma omp threadprivate (t) void foo (int g[3][10], int h[4][8], int i...
fac_cf_coarsen.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
morn_image_transform.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; 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 to in wri...
opencl_krb5pa-sha1_fmt_plug.c
/* * Kerberos 5 "PA ENC TIMESTAMP" by magnum & Dhiru * * Pcap file -> input file: * 1. tshark -r capture.pcapng -T pdml > ~/capture.pdml * 2. krbng2john.py ~/capture.pdml > krb5.in * 3. Run john on krb5.in * * http://www.ietf.org/rfc/rfc4757.txt * http://www.securiteam.com/windowsntfocus/5BP0H0A6KM.html * *...
coating.h
#ifndef batoid_coating_h #define batoid_coating_h namespace batoid { #if defined(BATOID_GPU) #pragma omp declare target #endif class Coating { public: Coating(); virtual ~Coating(); virtual void getCoefs(double wavelength, double cosIncidenceAngle, double& reflect, do...
km_modmat.h
/* * * Header file of the KM-config algorithm (C++ version) * * * An algorithm for finding multiple core-periphery pairs in networks * * * Core-periphery structure requires something else in the network * Sadamori Kojaku and Naoki Masuda * Preprint arXiv:1710.07076 * * * Please do not distribute without contacting the...
pi_estimator.c
// Paul Valdez & Benjamin Hellwig // November 13th 2019 // CPTS 411 Introduction to Parallel Computing // #include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #include <math.h> #include <assert.h> int main(int argc, char *argv[]) { long long int i, loops; // loop {number of iterations} [number...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convolutiondepthwise_5x5.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2018 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 ...
CSRTile.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
reduction.c
// // From: https://github.com/OpenMP/Examples/blob/master/sources/Example_reduction.3.c #include <stdio.h> #define N 1000 #define SUM (N * (N-1)/2) int main (void) { int a, i; int error = 0; #pragma omp target parallel shared(a) private(i) map(tofrom: error) { #pragma omp master a = 0; #pragm...
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. // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in...
gemm.c
#include "gemm.h" #include "utils.h" #include "im2col.h" #include "dark_cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <float.h> #include <string.h> #include <stdint.h> #ifdef _WIN32 #include <intrin.h> #endif #if defined(_OPENMP) #include <omp.h> #endif #define TILE_M 4 // ...
depthwise_convolution_3x3_int4.c
/* * Copyright (C) 2016-2022 T-Head Semiconductor Co., Ltd. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * 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 * * www.apache....
tcbjac2.c
#include "cbjac2.h" #include "wnrme.h" #include "rnd.h" #include "timer.h" int main(int argc, char *argv[]) { if (4 != argc) { (void)fprintf(stderr, "%s filename 2^{batch_size} #batches\n", *argv); return EXIT_FAILURE; } const size_t n = ((size_t)1u << atoz(argv[2u])); if (n % VSL) { (void)fprintf...
GB_unaryop__ainv_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...
kernel_2mm.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)) void kernel_2mm(int ni, int nj, int nk, int nl, double alpha, double beta, double t...
detector.c
#include "darknet.h" #include <stdbool.h> #include "image.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; ...
cofold.c
/* * minimum free energy * RNA secondary structure prediction * * c Ivo Hofacker, Chrisoph Flamm * original implementation by * Walter Fontana * * Vienna RNA package */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #i...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fixed_size_vector.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...