source
stringlengths
3
92
c
stringlengths
26
2.25M
DMD5_fmt_plug.c
/* * DMD5_fmt.c * * DIGEST-MD5 authentication module for Solar Designer's John the Ripper * Uses Solar Designer's MD5 implementation. * * This software is Copyright 2006, regenrecht@o2.pl, and * Copyright 2011, 2013 magnum, and it is hereby released to the general * public under the following terms: Redistribu...
optimized.h
#include <structmember.h> #include <omp.h> #include <math.h> /* For a given class cls and an attribute attr, defines a variable attr_offset containing the offset of that attribute in the class's __slots__ data structure. */ #define DECLARE_SLOT_OFFSET(attr,cls) \ PyMemberDescrObject *attr ## _descr = (PyMember...
mpi_io.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "../splatt_mpi.h" #include "../io.h" #include "../timer.h" #include "../util.h" #include "../ccp/ccp.h" /******************************...
_CPULingo.c
/* C implementation of SIML LINGOs on CPUs #============================================================================================= # COPYRIGHT NOTICE # # Written by Imran S. Haque (ihaque@cs.stanford.edu) # # Copyright (c) 2009-2010 Stanford University. # All rights reserved. # # Redistribution and use in sou...
c-tree.h
/* Definitions for C parsing and type checking. Copyright (C) 1987-2014 Free Software Foundation, Inc. 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 the Free Software Foundation; either version 3, or (at yo...
phase.c
/* * Copyright (C) 2018 by Benedict Paten (benedictpaten@gmail.com) * * Released under the MIT license, see LICENSE.txt */ #include <getopt.h> #include <stdio.h> #include <ctype.h> #include <memory.h> #include <hashTableC.h> #include <unistd.h> #include <time.h> #include "marginVersion.h" #include "margin.h" #inc...
matrix.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "matrix.h" #include "util.h" #include "timer.h" #include "splatt_lapack.h" #include <math.h> /*********************...
pzgssvx.c
/*! \file Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) All rights reserved. The source code is distributed under BSD license, see the file License.txt at the top-level directory. ...
kt_sbucket.c
#include "kt_sbucket.h" void sbucket_update_edge( support_bucket_t * const sbucket, int64_t const edge_id, int32_t const support, int32_t const ktruss) { slist_s * const slist = sbucket->slist; /* no-op if edge has already been deleted or updated */ if(support < 0 || support == slist[edge_id]...
GB_unaryop__minv_fp32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
convolution_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_deserialize_from_blob.c
//------------------------------------------------------------------------------ // GB_deserialize_from_blob: uncompress a set of blocks from the blob //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_binop__isne_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-...
DRB054-inneronly2-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__isle_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
omp_task_shared.c
<ompts:test> <ompts:testdescription> Test to see if implied shared works correctly</ompts:testdescription> <ompts:ompversion>3.0</ompts:ompversion> <ompts:directive>omp task</ompts:directive> <ompts:dependences>omp single, omp task firstprivate</ompts:dependences> <ompts:testcode> #include <stdio.h> #include <math.h> #...
omp.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
GB_unaryop__abs_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...
krb5-18_fmt_plug.c
/* * KRB5 - Enctype 18 (aes256-cts-hmac-sha1-96) cracker patch for JtR * Created on August of 2012 by Mougey Camille (CEA/DAM) & Lalet Pierre (CEA/DAM) * * This format is one of formats saved in KDC database and used during the authentication part * * This software is Copyright (c) 2012, Mougey Camille (CEA/DAM) ...
edist.c
// Licensed under a 3-clause BSD style license - see LICENSE #include "common.h" #include "math.h" #include "gsl/gsl_math.h" #include "gsl/gsl_deriv.h" #include "stdio.h" double P_THRESH=1e-4; /*****************************************************************************/ // Plain electron distributions no normaliza...
Searching.202007271527.gather_top_m.subsearch.h
// // Created by Zhen Peng on 7/27/2020. // #ifndef BATCH_SEARCHING_SEARCHING_H #define BATCH_SEARCHING_SEARCHING_H #include <vector> #include <boost/dynamic_bitset.hpp> //#include <boost/sort/sort.hpp> #include <iostream> #include <fstream> #include <unordered_map> #include <immintrin.h> #include <cstring> #include ...
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...
GB_unop__bnot_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_unaryop__lnot_int8_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
_cutils.c
/* Generated by Cython 0.29.21 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-fopenmp" ], "extra_link_args": [ "-fopenmp" ], "name": "skbio.stats.ordination._cutils", "sources": [ "sk...
nco_s1d.c
/* $Header$ */ /* Purpose: NCO utilities for Sparse-1D (S1D) datasets */ /* Copyright (C) 2015--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO under the terms of the 3-Clause BSD License with exceptions described in the LIC...
bfs_csr_bsp.c
#include "graph_defs.h" #include "prefetcher.h" #include <limits.h> typedef struct bfs_metadata_st { char touched; volatile unsigned long queue_next; } bfs_metadata_t; static volatile unsigned long queue_head = ULONG_MAX; static volatile unsigned long vertex_position = 0; static bfs_metadata_t *metadata; static csr...
test.c
#include <stdio.h> #include "../utilities/check.h" #define N 100 int main() { check_offloading(); int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; // offload #pragma omp target map(tofrom: a[0:100]) { int k; #pragma omp simd safelen(2) for(k...
weightedNorm2.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 limitation t...
DRB100-task-reference-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...
dropout-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 ...
zboxloop.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...
spmv.h
#pragma once #include <thrust/functional.h> #include <cusp/detail/functional.h> //MW: add some OpenMP pragmas namespace cusp { namespace detail { namespace host { ////////////// // COO SpMV // ////////////// template <typename Matrix, typename Vector1, typename Vector2, typename UnaryFu...
memdbg.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2013. 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 deemed * null and void, then the software is Copyright (c) 20...
DetailedPlaceDB.h
/** * @file DetailedPlaceDB.h * @author Yibo Lin * @date Jan 2019 */ #ifndef _DREAMPLACE_UTILITY_DETAILEDPLACEDB_H #define _DREAMPLACE_UTILITY_DETAILEDPLACEDB_H #include "utility/src/Msg.h" #include "utility/src/Box.h" #include "legality_check/src/legality_check.h" #include "draw_place/src/draw_place.h" DREA...
GB_unaryop__abs_uint8_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
surrogate.h
/* Software SPAMS v2.4 - Copyright 2009-2013 Julien Mairal * * This file is part of SPAMS. * * SPAMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your optio...
snoop.c
/* * compute the duplex structure of two RNA strands, * allowing only inter-strand base pairs. * see cofold() for computing hybrid structures without * restriction. * * Ivo Hofacker * Vienna RNA package */ #if...
multi_bspline_create.c
///////////////////////////////////////////////////////////////////////////// // einspline: a library for creating and evaluating B-splines // // Copyright (C) 2007 Kenneth P. Esler, Jr. // // // // This...
GB_unop__identity_bool_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
zero_omp.c
/* * File: zero_omp.c * CVS: $Id: zero_omp.c,v 1.34 2009/09/10 20:19:49 terpstra Exp $ * Author: Philip Mucci * mucci@cs.utk.edu * Mods: Nils Smeds * smeds@pdc.kth.se * Anders Nilsson * anni@pdc.kth.se */ /* This file performs the following test: start, stop and timer fu...
model_2cxm_mex.c
/*========================================================== * model_2cxm_mex.c - STARDCE toolbox * * Implements the DCE 2-compartment exchange model * * The calling syntax is: * * C = model_2cxm_mex(time, VIF, vp, ve, kt, fp ); * * Compilation: * * mex -R2018a model_2cxm_mex.c * or: * 1) uncomment the...
nvector_openmp.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Carol S. Woodward @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen,...
decl2.c
/* Process declarations and variables for C++ compiler. Copyright (C) 1988-2020 Free Software Foundation, Inc. Hacked 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...
convolutiondepthwise_5x5_pack4_bf16s.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 ...
InsertionSort_OpenMP.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #define SIZE 2000 long array[SIZE]; double avg; void InsertionSort(int start, int end){ for (int i = start+1 ; i < end ; i++){ int temp = array[i]; int j = i; while (j > 0 && array[j-1] > temp){ array[j] = array[j...
utilityGraphPartitioner.h
// *********************************************************************** // // Grappolo: A C++ library for graph clustering // Mahantesh Halappanavar (hala@pnnl.gov) // Pacific Northwest National Laboratory // // *************************************************************...
ofmo-twoint-direct.c
/** * @file ofmo-twoint-direct.c * 各タイプの二電子積分を計算して2電子ハミルトン行列(G行列)を * 計算する * この関数では、積分計算とG行列計算の両方を行っている * */ /** * @defgroup integ-twoint-direct direct法によるG行列作成を行う関数群 * buffered direct SCF法において、バッファに保存出来なかった2電子積分を * 計算しながらG行列生成を行う関数群 * * 各関数は、同じ引数を持っているので、以下にその内容を記す。 * * @param[in] nworkers 計算に用いるワーカプロセス(スレッ...
DepthImageBasedGeometryApproximation.h
/// \ingroup base /// \class ttk::DepthImageBasedGeometryApproximation /// \author Jonas Lukasczyk <jl@jluk.de> /// \date 1.7.2018 /// /// \brief TTK %depthImageBasedGeometryApproximation processing package. /// /// %DepthImageBasedGeometryApproximation is a TTK processing package that approximates geomerty based on an...
dgetrs.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/zgetrs.c, normal z -> d, Fri Sep 28 17:38:06 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
GB_binop__ne_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-...
ten_tusscher_2004_epi_S1_13.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S1_13.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO...
fvmpor.h
#ifndef FVMPOR_H #define FVMPOR_H //#define USE_PRINT #ifdef USE_PRINT #define PRINT(fid,v) fid << #v << std::endl; \ for(int kkkk=0; kkkk<v.dim(); kkkk++ )\ fid << v[kkkk] << " ";\ fid << std::endl; #else #define PRINT(fid,v) ; #endif #include "definitions.h" #include "shape.h" #include <cublas.h> ...
GB_unop__identity_int16_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unaryop__minv_int8_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
dynmat.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
compiler_cgen.c
/* Generated by Nim Compiler v0.15.0 */ /* (c) 2016 Andreas Rumpf */ /* The generated code is subject to the original license. */ #define NIM_INTBITS 64 #include "nimbase.h" #include <string.h> typedef struct Tcgen529027 Tcgen529027; typedef struct TNimType TNimType; typedef struct TNimNode TNimNode; typedef struct ...
mpi_omp_hl.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <mpi.h> #include <omp.h> #include "papi.h" #include "papi_test.h" #include "do_loops.h" int main( int argc, char **argv ) { int retval, i; int quiet = 0; char* region_name; int world_size, world_rank; /* Set TESTS_QUIET variable */ qu...
ast-dump-openmp-target-parallel-for-simd.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp target parallel for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target parallel for simd f...
zoom.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...
GB_unaryop__lnot_uint32_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...
thread_thread_scheduling.c
// RUN: %libomp-compile && env KMP_ABT_NUM_ESS=4 %libomp-run // REQUIRES: abt #include "omp_testsuite.h" #include "bolt_scheduling_util.h" int test_thread_thread_scheduling(int num_threads) { int i, vals[num_threads * num_threads]; memset(vals, 0, sizeof(int) * num_threads * num_threads); omp_set_max_active_leve...
rawSHA512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2010 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. * * Rewritten Spring 2013, JimF. SSE code added and released with the following terms: * No copyright is claimed, and the software is hereby placed in t...
GB_binop__lt_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...
GB_unop__expm1_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
pwsafe_fmt_plug.c
/* Password Safe and Password Gorilla cracker patch for JtR. Hacked together * during May of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * Optimization patch during January of 2013 by Brian Wallace <brian.wallace9809 at gmail.com>. * * This software is Copyright (c) 2012-2013 * Dhiru Kholia <dhiru.kholia ...
GB_binop__second_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
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...
host_varfn_function.c
#include <stdio.h> #include <omp.h> #include <hostrpc.h> // This user variable function returns a uint so declare function // as hostrpc_varfn_uint_t . hostrpc_varfn_uint_t my3argfn; hostrpc_varfn_double_t mydoublefn; // This is an arbitrary 3 arg function uint my3argfn(void * fnptr, ...) { va_list args; va_st...
GB_unaryop__abs_int32_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
l7_dev_setup.c
/* * Copyright (c) 2011-2019, Triad National Security, LLC. * All rights Reserved. * * CLAMR -- LA-CC-11-094 * * Copyright 2011-2019. Triad National Security, LLC. This software was produced * under U.S. Government contract 89233218CNA000001 for Los Alamos National * Laboratory (LANL), which is operated...
static_elasticity2D.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdint.h> #include <stdbool.h> #include <math.h> #include "nb/memory_bot.h" #include "nb/math_bot.h" #include "nb/solver_bot.h" #include "nb/container_bot.h" #include "nb/graph_bot.h" #include "nb/geometric_bot.h" #include "nb/pde_bot/material.h" #in...
utils.c
// Copyright (c) 2015, UChicago Argonne, LLC. All rights reserved. // Copyright 2015. UChicago Argonne, LLC. This software was produced // under U.S. Government contract DE-AC02-06CH11357 for Argonne National // Laboratory (ANL), which is operated by UChicago Argonne, LLC for the // U.S. Department of Energy. The U.S....
kmp_detach_tasks_t3.c
// RUN: %libomp-compile && env OMP_NUM_THREADS='3' %libomp-run // RUN: %libomp-compile && env OMP_NUM_THREADS='1' %libomp-run // The runtime currently does not get dependency information from GCC. // UNSUPPORTED: gcc #include <stdio.h> #include <omp.h> #include "omp_my_sleep.h" // detached untied #define PTASK_FLAG_D...
dataracetest1.c
int main() { double a[10]; #pragma omp parallel for for(int i=1;i<4;i++) { a[i]=a[i+1]; } return 0; }
scoping.c
int bar() { int x = 10; { int y = 19 + x; int z = 11; for (;;) { z++; { int x = 11; x++; } z = x - 1; } } } int foo() { int a = 10 + bar(); while (1) { a = 10; { int a; a = 15; } a--; break; } } int main() { int x = 10; int y = 5; int q = 11; l1: l2: { int z = 10 ...
5-32t.c
#include <stdio.h> #include <omp.h> int main() { int i; int sum=0; omp_set_num_threads(32); #pragma omp parallel for for (i=0; i<COUNT; i++) { sum = sum + i; printf("Thread number: %d Iteration: %d Local Sum: %d \n", omp_get_thread_num(), i, sum); } printf("...
tinyexr.h
/* Copyright (c) 2014 - 2018, Syoyo Fujita All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and t...
struct_axpy.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...
a.34.1.c
/* { dg-do compile } */ void work (int i, int j) { } void good_nesting (int n) { int i, j; #pragma omp parallel default(shared) { #pragma omp for for (i = 0; i < n; i++) { #pragma omp parallel shared(i, n) { #pragma omp for for (j = 0; j < n; j++) work (i, j); } } } }
residualbased_simple_steady_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Michael Andre, https://github.com/msandre // #i...
qla_bench.c
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <sys/time.h> #include <math.h> #include <qla.h> #ifdef _OPENMP # include <omp.h> # define __USE_GNU # include <sched.h> #endif #if QLA_Precision == 'F' #define REALBYTES 4 #else #define REALBYTES 8 #endif #define NC QLA_Nc #define myalloc(type, n) (typ...
pi-v16.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...
GB_unop__identity_int32_int16.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...
intruder.c
/* ============================================================================= * * intruder.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "cuda.h" #include <stdio.h> #include <stdlib.h> #include <string.h> pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { char *path; FILE *file = fopen(filename, "r"); if(!file) file_error(filename); list...
locks_example.c
//===-- locks_example.c - Example for lock usage ------------------*- 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 // //===---------------------------...
box3d2r.c
#define BENCH_DIM 3 #define BENCH_FPP 249 #define BENCH_RAD 2 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize][dimsize] = (SB_TYPE (*)[dimsize]...
DepositCircuit.h
#ifndef _DEPOSITCIRCUIT_H_ #define _DEPOSITCIRCUIT_H_ #include "Circuit.h" #include "../Utils/Constants.h" #include "../Utils/Data.h" #include "../ThirdParty/BigIntHeader.hpp" #include "ethsnarks.hpp" #include "utils.hpp" #include "gadgets/sha256_many.hpp" using namespace ethsnarks; namespace Loopring { class Depo...
GB_binop__isgt_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
DRB058-jacobikernel-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...
two_flip_move_generator.h
/*****************************************************************************/ // Copyright (c) 2020-2021 Yuji KOGUMA // Released under the MIT license // https://opensource.org/licenses/mit-license.php /*****************************************************************************/ #ifndef PRINTEMPS_NEIGHBORHOOD_TWO_F...
dtrmm.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "dtrmm.fatbin.c" static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; } static inline CUresult cuMemcpyHtoD2DAsync(CUdevic...
libvoodoo.c
#include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <omp.h> #include <math.h> __attribute__((target(mic))) void voodoo(double* a, double* b, double* c, int nelem, int device, int offload) { int mthreads; #pragma offload target(mic:device) if(offload) { mthreads = omp_get_max_thre...
GPUCommonMath.h
//**************************************************************************\ //* This file is property of and copyright by the ALICE Project *\ //* ALICE Experiment at CERN, All rights reserved. *\ //* *\ //* Prim...
atomic_messages.c
// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s int foo() { L1: foo(); #pragma omp atomic // expected-error@+1 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value exp...
7_data-env1.c
#include <stdio.h> #include <omp.h> #include <stdlib.h> int main(int argc, char** argv) { int x = 100; omp_set_num_threads(20); #pragma omp parallel { printf("Sou a thread %d, meu valor de x é %d\n", omp_get_thread_num(), x); } return 0; }
nowait-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
bitset.h
/* * Copyright (c) 2016 drali. All rights reserved. * * This software is provided 'as-is', without any express or implied warranty. * In no event will the author be held liable for any damages arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, including c...