source
stringlengths
3
92
c
stringlengths
26
2.25M
shortpe.h
#ifndef SHORTPE_H #define SHORTPE_H #include <iostream> #include <fstream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graphviz.hpp> #include <boost/graph/connected_components.hpp> #include <boost/container/flat_set.hpp> #include <boost/unordered_map.hpp> #include <boost/program_options/cmdline.h...
VolumetricDilatedMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricDilatedMaxPooling.c" #else static inline void THNN_(VolumetricDilatedMaxPooling_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, TH...
diagmm_x_csc_n_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSC *mat, const ALPHA_Number *x, const ALPHA_INT c...
trmv_x_sky_u_lo_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, ...
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
load_state.c
/* * (C) Copyright 1988- ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an interg...
GB_unaryop__minv_int16_fp32.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__le_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...
GenericKwsEvalTool.h
#ifndef TOOLS_GENERICKWSEVALTOOL_H_ #define TOOLS_GENERICKWSEVALTOOL_H_ #include <iostream> #include <fstream> #include <string> #include <unordered_map> #include <vector> #ifdef WITH_GLOG #include <glog/logging.h> #endif #include "cmd/Parser.h" #include "core/Assessment.h" #include "core/Bootstrapping.h" #include "...
sections_serialized.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { #pragma omp parallel sections num_threads(1) { #pragma omp section { // implicit task info print_ids(0); // initial task info print_ids(1); } } //...
GB_unaryop__minv_fp64_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_unaryop__identity_uint16_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
coordinate_transformation_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // // #ifndef KRATOS_COORDINATE_TRANSFORMATION_UTI...
pi-v18.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
net_sha1_fmt_plug.c
/* Cracker for "Keyed SHA1" network authentication hashes. * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>, * 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 permit...
dpapimk_fmt_plug.c
/* DPAPI masterkey file version 1 and 2 cracker by * Fist0urs <jean-christophe.delaunay at synacktiv.com> * * This software is Copyright (c) 2017 * Fist0urs <jean-christophe.delaunay at synacktiv.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and use in sour...
patchmodel.h
#ifndef CMT_PATCHMODEL_H #define CMT_PATCHMODEL_H #include <vector> #include <algorithm> #include <iostream> #include <cmath> #include "Eigen/Core" #include "utils.h" #include "distribution.h" #include "exception.h" #include "conditionaldistribution.h" #include "pcapreconditioner.h" #include "trainable.h" #include "to...
GB_unaryop__ainv_uint8_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
trace3_c.c
#include <stdio.h> #include <string.h> #include "shadow_bind_c.h" #ifdef __OPENMP #include <omp.h> #endif int count_lines ( FILE *f ) { char ch = '\0'; int c = 0; while ( ch!=EOF ) { ch=fgetc ( f ); if ( ch=='\n' ) c++; } return c; } void inputManager ( int argc, char** argv, int *trc, in...
DRB061-matrixvector1-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_unaryop__lnot_uint8_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...
relramp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *relramp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *relramp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyArray...
blake2bp.c
/* BLAKE2 reference source code package - optimized 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...
displacement_residual_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
net_md5_fmt_plug.c
/* Cracker for RIPv2 MD5 authentication hashes. * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>, * 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. * * ...
GB_unaryop__ainv_uint16_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...
CombinedOtherStartIndexNNeighboursWorklet.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
simple_fft.h
/****************************************************************************** * Simple FFT (Cooley Tukey Radix-4) * * Copyright (c) 2015 OK Ojisan(Takuya OKAHISA) * Released under the MIT license * http://opensource.org/licenses/mit-license.php *********************************************************************...
nest_lock.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { //need to use an OpenMP construct so that OMPT will be initialized #pragma omp parallel num_threads(1) print_ids(0); omp_nest_lock_t nest_lock; printf("%" PRIu64 ": &nest_lock: %" PRIu64 "\...
core_zttmlq.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <omp.h> /********************...
parallelForConstruct.c
int main() { int x = 10; int a; #pragma omp parallel for private(a) for(x = 0; x < 10; x++) { a -= 10; } x = 20; }
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_assign_zombie1.c
//------------------------------------------------------------------------------ // GB_assign_zombie1: delete all entries in C(:,j) for GB_assign //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lice...
bicubic_interpolation_uchar.c
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2012, Javier Sánchez Pérez <jsan...
mediancut.c
/* ** © 2009-2018 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ #include <stdlib.h> #include <stddef.h> #include "libimagequant.h" #include "pam.h" #include "mediancut.h" #defi...
GB_unaryop__identity_fp64_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
aix_ssha_fmt_plug.c
/* AIX ssha cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com> and magnum. * * Thanks to atom (of hashcat project) and philsmd for discovering and * publishing the details of various AIX hashing algorithms. * * This software is Copyright (c) 2013 Dhiru Kholia <dh...
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 // //===---------------------------...
intruder.c
/* ============================================================================= * * intruder.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
shared-clauseModificado.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main() { int i, n = 7; int a[n]; for (i=0; i<n; i++) a[i] = i+1; #pragma omp parallel for default(none) shared(a,n) for (i=0; i<n; i++) a[i] += i; printf("Después de parallel for:\n"); for (i=0; i<n; i++) printf("a[%d] = %d\n...
t002.c
#include<stdint.h> #include<stdlib.h> #include<stdio.h> #include<omp.h> typedef struct {int64_t nteam; int64_t nthread; int64_t team_n; int64_t thread_n;} tinfo; int main(int argc, char **argv) { const int64_t narr = 1 << 10; tinfo tinit = {-1, -1, -1, -1}; tinfo *t = aligned_alloc(1 << 22, sizeof(tinfo)*narr); fo...
pointing.c
/* -*- mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: sw=4 ts=8 et tw=80 */ #include "pyactpol.h" #include "myassert.h" #include <actpol/actpol.h> #ifndef LIBACTPOL_API #define LIBACTPOL_API 20130101 #warning "LIBACTPOL_API was not defined." #endif #if LIBACTPOL_API <= 20180101 #d...
lsh_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
GB_unaryop__abs_int32_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...
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 // //===---------------------------...
glarea-app-window.c
#include "glarea-app-window.h" #include "glarea-error.h" #include <epoxy/gl.h> #include <math.h> enum { X_AXIS, Y_AXIS, Z_AXIS, N_AXES }; struct _GlareaAppWindow { GtkApplicationWindow parent_instance; /* the adjustments we use to control the rotation angles */ GtkAdjustment *x_adjustment; GtkAdjustment *y_a...
parallel.c
#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 thread; if(argc<2){ fprintf(stderr,"\nFalta nºde thread\n"); exit(-1); } thread= atoi(argv[1]); #pragma omp parallel { if(omp_get_th...
pdzamax.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_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "plasma_types.h" #in...
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...
strMdata.c
// // strMdata.c // pstock // // Created by takayoshi on 2016/01/24. // Copyright © 2016年 pgostation. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent.h> #include <sys/stat.h> #include <libiomp/omp.h> #include "main.h" #include "strMdata.h" #include "strMdataBinar...
omp-expand.c
/* Expansion pass for OMP directives. Outlines regions of certain OMP directives to separate functions, converts others into explicit calls to the runtime library (libgomp) and so forth Copyright (C) 2005-2020 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute ...
6665.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
range.h
#pragma once #include <functional> #include "dist_map.h" namespace hpmr { template <class T> class Range { public: Range(const T start, const T end, const T step = 1) : start(start), end(end), step(step) {} template <class K, class V, class H = std::hash<K>> DistMap<K, V, H> mapreduce( const std::functi...
callback.h
#ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #define _DEFAULT_SOURCE #include <stdio.h> #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <inttypes.h> #include <omp.h> #include <omp-tools.h> #include "ompt-signal.h" // Used to detect architecture #include "../../src/kmp_platform.h" static co...
BEIntegratorLaplace.h
/*! * @file BEIntegratorLaplace.h * @author Michal Merta * @author Jan Zapletal * @date July 10, 2013 * @brief Header file for class BEIntegratorLaplace * */ #ifndef BEINTEGRATORLAPLACE_H #define BEINTEGRATORLAPLACE_H #include "BEIntegrator.h" //#include "BESpace.h" namespace bem4i { /*! * concre...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
program_evaluator.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2015 Google Inc. All rights reserved. // http://ceres-solver.org/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of so...
convolution_pack1to4.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 ...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
graph.c
/* Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk) This file is part of Velvet. Velvet 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 2 of the License, or (at your opt...
fusedCopyDfloatToPfloat.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 limitatio...
pmv-OpenMP-reduction.c
#include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se encuentra la función printf() #ifdef _OPENMP #include <omp.h> #else #define omp_set_dynamic(0); #define omp_set_num_threads(4); #endif int main(int argc, char ** argv){ int **M; int *v1, *v2; in...
blake2sp.c
/* BLAKE2 reference source code package - optimized 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 ...
GB_unop__identity_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
fill_grids_int2c.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 ...
copyprivate-clauseModificado.c
#include <stdio.h> #include <omp.h> int main() { int n = 9, i, b[n]; for (i=0; i<n; i++) b[i] = -1; #pragma omp parallel { int a; #pragma omp single { printf("\nIntroduce valor de inicialización a: "); scanf("%d", &a ); printf("\nSingle ejecutada por el thread %d\n",omp_get_thread_n...
inplace_binary_operation.h
/* Copyright 2021 NVIDIA Corporation * * 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...
OutputHandler.h
#ifndef INTARNA_OUTPUTHANDLER_H_ #define INTARNA_OUTPUTHANDLER_H_ #include "IntaRNA/general.h" #include "IntaRNA/Interaction.h" #include "IntaRNA/InteractionRange.h" #include "IntaRNA/OutputConstraint.h" #include <string> namespace IntaRNA { /** * Defines an output and storage interface to enable different output ...
mafillvcompmain.c
/* CalculiX - A 3-dimensional finite element program */ /* Copyright (C) 1998-2015 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* pub...
mg_single_adaptive.c
/* * Liao 5/17/2013 * Separated the top level parallel region into smaller regions so we can control how many threads to be used at each level * */ /*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - MG This benchmark is an OpenMP C version o...
mem-consistency-openmp3x.c
/************************************************************************ OpenMP-3.0 Example Codes Beta-v1.0 File : mem-consistency-openmp3x.c Date : Aug 2011 Description : Simple example program to demonstrates the importance to maintain the memory con...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
private-clauseModificado.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void main(){ int i, n=7; int a[n], suma; for(i=0;i<n;i++){ a[i]=i; } suma=1; #pragma omp parallel private(suma) { //suma=80; #pragma omp for for(i=0;i<n;i++){ suma = suma + a[i]; printf("\nthread %d suma a[%d] / ", omp_get_thread_num(),...
proximal.c
/* ------------------------------------------------------------- */ /* proximal.c -- not slow implementations of proximal operators */ /* by N. Parikh, E. Chu, S. Boyd */ /* */ /* For performance reasons, these methods do no...
FirstDerivativeFourthOrder.c
/*! @file FirstDerivativeFourthOrder.c @author Debojyoti Ghosh @brief Fourth order finite-difference approximation to the first derivative */ #include <stdio.h> #include <stdlib.h> #include <basic.h> #include <arrayfunctions.h> #include <firstderivative.h> #include <mpivars.h> #include <hypar.h> typedef MPIVa...
sort_test.c
// gcc -O4 sort_test.c -fopenmp -lgomp #include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #define THREADS 4 int cmpfunc (const void * a, const void * b) { return ( *(int *) a - *(int *) b ); } void print_arr(int * arr, int num_elem) { for ( int i = 0; i < num_elem; i++ ) { printf("...
GB_unaryop__identity_bool_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
activation_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...
dewpt.c
/* * Saturation function over ice and water */ #include <stdio.h> #include <math.h> #include <errno.h> #include <omp.h> #include "envphys.h" #include "envphys_c.h" extern int errno; void dewpt( int ngrid, /* number of grid points */ double *ea, /* vapor pressure */ int nthreads, /* number of threads for pa...
arm_functions_fp32.h
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // 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,...
f1-wrapper.h
#ifndef _F1_WRAPPER_H #define _F1_WRAPPER_H #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <sys/types.h> #include <stdbool.h> #include <assert.h> #include <string.h> #include "../common/util.h" #include "../common/sw-vector.h" #include "../common/sw-gapless.h" #undef EXTERN #undef STATIC #ifd...
ExecutionPolicy.h
//////////////////////////////////////////////////////////////////////////////// // // // File Name: CSVector.h // // ...
HDAA_fmt_plug.c
/* HTTP Digest access authentication patch for john * * Written by Romain Raboin. OMP and intrinsics support by magnum * * This software is Copyright (c) 2008 Romain Raboin - romain.raboin at * gmail.com, and Copyright (c) 2012 magnum and it is hereby released to * the general public under the following terms: ...
integrate.c
/* * integrate.c: Example of numerical integration in OpenMP. * * (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com> */ #include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> const double PI = 3.14159265358979323846; const double a = -4.0; const double b = 4.0; const int nsteps = 40000000; doub...
omp_trap3.c
/* File: omp_trap3.c * Purpose: Estimate definite integral (or area under curve) using the * trapezoidal rule. This version uses a parallel for directive * * Notes: * 1. The function f(x) is hardwired. * 2. In this version, it's not necessary for n to be * evenly divisible by thread_c...
ccsd_grad.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...
gbdt.h
/*! * Original work Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Modified work Copyright (c) 2020 Fabio Sigrist. All rights reserved. * Licensed under the Apache License Version 2.0 See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGB...
update_ops_named_SWAP.c
#include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif //void SWAP_gate_old_single(UINT target_qubit_index_0, UINT target_qubit_index_1, CTYPE *state, ITYPE dim); //void SWAP_gate_old_parallel(U...
GB_nvec_nonempty.c
//------------------------------------------------------------------------------ // GB_nvec_nonempty: count the number of non-empty vectors //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitespa...
lotus5_fmt_plug.c
//original work by Jeff Fay //some optimisations by bartavelle at bandecon.com /* OpenMP support and further optimizations (including some code rewrites) * by Solar Designer */ #if FMT_EXTERNS_H extern struct fmt_main fmt_lotus5; #elif FMT_REGISTERS_H john_register_one(&fmt_lotus5); #else #include <stdio.h> #include...
required.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include<math.h> //Functions void backsubstitution_p(int *A, int *b, double *x, int n); void backsubstitution_s(int *A, int *b, double *x, int n); void conjugategradient_p(int *A, int *b, double *x, int n); void conjugategradient_s(int *A, int...
a.21.3.c
/* { dg-do compile } */ void work (int); void a21_good (int n) { int i; #pragma omp for ordered for (i = 0; i < n; i++) { if (i <= 10) { #pragma omp ordered work (i); } if (i > 10) { #pragma omp ordered work (i + 1); } } }
main.c
#include <stdio.h> #include<omp.h> #include <stdlib.h> #include<math.h> int main() { double pi = 3.1416; // Define the domain double x_len = 2.0 * pi; int x_points = 1001; double del_x = x_len/(x_points-1); double x[x_points]; #pragma omp parallel for for (int i = 0; i...
bubble_omp.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int SIZE =100; int A[SIZE]; omp_set_num_threads(2); for(int i=0;i<SIZE;i++) { A[i]=rand()%SIZE; } int N = SIZE; int i; int first,temp; double start,end; start=omp_get_wtime(); #pragma omp parallel for default...
repeat_base.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
icmpspt.c
#include <stdio.h> #include <stdlib.h> #include "math.h" #define MAX(I,J) ((I) > (J) ? (I) : (J)) #define MIN(I,J) ((I) < (J) ? (I) : (J)) void unpackE3(char* file, char* fout, int norb) { FILE *f = fopen(file, "rb"); size_t norb2 = norb*norb; // 6-fold symmetry size_t e3slicesize = (nor...
kmp_taskloop.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> #include "omp_my_sleep.h" #define N 4 #define GRAIN 10 #define STRIDE 3 // globals int th_counter[N]; int counter; // Compiler-generated code (emulation) typedef struct ident { void* dummy; } ident_t; typedef struct shar { int(*pth_counter...
omp.c
/* { dg-do compile } */ /* { dg-options "-fgnu-tm -fopenmp" } */ /* { dg-require-effective-target pthread } */ __attribute__ ((transaction_pure)) unsigned long rdtsc(); typedef struct ENTER_EXIT_TIMES { unsigned long enter; } times_t; void ParClassify() { void * Parent; #pragma omp parallel private(Parent) { ...
genome.c
/* ============================================================================= * * genome.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =========================================...
main.c
/* Copyright (C) 2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...