source
stringlengths
3
92
c
stringlengths
26
2.25M
quicksort.c
/* * quicksort.c: Example of QucikSort in OpenMP. * * (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com> */ #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <sys/time.h> enum { N = 2 * 1024 * 1024 }; const int threshold = 1000; double wtime() { struct timeval t; gettimeofday(&t, NULL...
str.h
/* * $Id: str.h,v 1.2 1998/08/01 12:34:56 jpr Exp $ * * $Log: str.h,v $ * Revision 1.2 1998/08/01 12:34:56 jpr * * Added Id, started Log. * * */ #define STR_MAXVALS 32 #define STR_MAXLEN 512 #ifdef MODULE_MATC double str_p[STR_MAXVALS]; char str_pstr[STR_MAXLEN]; #pragma omp threadprivate(str_p, str_...
FG_PersistentHomology_template.h
#define FG_PERSISTENTHOMOLOGY_TEMPLATE_H #include "FG_PersistentHomology.h" using namespace std; using namespace ttk; template <class dataType> void ttk::FG_PersistentHomology::computeIndexing(double& maxF, double& minF){ dataType* field = (dataType*)inputData_; maxF = 0; minF = double(field[0]); ...
parallel.c
/* Copyright (C) 2005-2020 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...
symmetry.c
/* symmetry.c */ /* Copyright (C) 2008 Atsushi Togo */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include "cell.h" #include "lattice.h" #include "mathfunc.h" #include "pointgroup.h" #include "primitive.h" #include "symmetry.h" #include "debug.h" #define NUM_ATOMS_CRITERION_FOR_OPENMP 1000 #define REDU...
Lyra2.c
/** * Implementation of the Lyra2 Password Hashing Scheme (PHS). * * Author: The Lyra PHC team (http://www.lyra2.net/) -- 2014. * * This software is hereby placed in the public domain. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ...
ast-dump-openmp-section.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test() { #pragma omp sections { #pragma omp section ; } } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{....
sirius.h
// Copyright (c) 2013-2019 Anton Kozhevnikov, Thomas Schulthess // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that // the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, ...
OpenMP_galaxyproblem.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <sys/time.h> float *real_rasc, *real_decl, *rand_rasc, *rand_decl; float pif; long int MemoryAllocatedCPU = 0L; int main(int argc, char* argv[]) { int parseargs_readinput(int argc, char *argv[]); struct timeval _ttime; struct timezone...
GB_unaryop__ainv_bool_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...
fpRerFBase.h
#ifndef fpRerFBase_h #define fpRerFBase_h #include "../../../baseFunctions/fpForestBase.h" #include <vector> #include <stdio.h> #include <ctime> #include <chrono> #include <cstdlib> #include "rerfTree.h" #include <map> #include <limits> namespace fp { template <typename T> class fpRerFBase : public fpForestBase<T...
flush-1.c
/* { dg-additional-options "-fdump-tree-gimple" } */ /* { dg-final { scan-tree-dump "foo \\(4\\);\[\n\r]* __atomic_thread_fence \\(4\\);\[\n\r]* foo \\(4\\);" "gimple" } } */ /* { dg-final { scan-tree-dump "foo \\(3\\);\[\n\r]* __atomic_thread_fence \\(3\\);\[\n\r]* foo \\(3\\);" "gimple" } } */ /* { dg-final { sca...
DRB022-reductionmissing-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
convolution_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 ...
combined-1.c
/* { dg-do compile } */ /* { dg-options "-O1 -fopenmp -fdump-tree-optimized" } */ int a[10]; void foo (void) { int i; #pragma omp parallel for schedule(runtime) for (i = 0; i < 10; i++) a[i] = i; #pragma omp parallel #pragma omp for schedule(runtime) for (i = 0; i < 10; i++) a[i] = 10 - i; #pra...
9883.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
SpatialReplicationPadding.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialReplicationPadding.c" #else static void THNN_(SpatialReplicationPadding_updateOutput_frame)( real *input_p, real *output_p, long nslices, long iwidth, long iheight, long owidth, long oheight, int pad_l, int pad_r, int pad_t, int pad_b) { int...
bml_norm_dense_typed.c
#ifdef BML_USE_MAGMA #include "magma_v2.h" #include "../bml_allocate.h" #endif #include "../../macros.h" #include "../../typed.h" #include "../blas.h" #include "../bml_norm.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_norm_dense.h" #include "bml_types_dense.h" #include <complex.h> #include ...
layer.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...
main.c
# include <stdio.h> # include <omp.h> # include "sim.h" # include "ga.h" # include "gradient.h" # include "utils.h" #include <omp.h> /* * Just for statistic purposes. */ void save_population(Genome * population, int individuals, const char * filename) { FILE *fp; if ((fp = fopen(filename, "w")) != 0) printf("Co...
dSchCompUdt-cuda.c
/*! @file * \brief This file contains the main loop of pdgstrf which involves * rank k update of the Schur complement. * Uses CUDA GPU. * * <pre> * -- Distributed SuperLU routine (version 4.0) -- * Lawrence Berkeley National Lab, Univ. of California Berkeley. * October 1, 2014 * */ #define S...
relic_core.c
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (C) 2007-2017 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute...
omp_for_schedule_auto.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include <math.h> #include "omp_testsuite.h" int sum1; #pragma omp threadprivate(sum1) int test_omp_for_auto() { int j; int sum; int sum0; int known_sum; int threadsnum; sum = 0; sum0 = 12345; // array which keeps track of which ...
copyDfloatToPfloat.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...
parallel.c
//Potential Solution #include <stdlib.h> #include <stdio.h> #include <omp.h> #include <time.h> #include "utils.h" double work_it_par(long* old, long* new, long* super, long* simple, long* fibonacci) { int i, j, k; int u; int ton = 0; long compute_it, moving_average; double pi, pi2, x, y, sum, step = 0.0; ...
rawSHA256_ng_fmt_plug.c
/* * Copyright 2013, epixoip. * AVX2 support, Copyright (c) 2015 magnum * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that redistribution of source * retains the above copyright. */ #include "arch.h" #if SIMD_COEF_32 && ARCH_LITTLE_ENDIAN==1 #if F...
opi.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> int main(int argc, char **argv) { double start = omp_get_wtime(); //seed random number generator // Q2b: get the number of threads to run with from agrv and // add OpenMP API code to set number of threads here int Nthreads = atoi(argv[1...
task_unitied_thread_threadid.c
// RUN: %libomp-compile-and-run // REQUIRES: abt #include "omp_testsuite.h" #include <string.h> #include <stdio.h> int test_task_untied_thread_threadid(int num_threads) { int vals[num_threads]; memset(vals, 0, sizeof(int) * num_threads); omp_set_max_active_levels(2); #pragma omp parallel num_threads(num_threa...
rawSHA1_fmt_plug.c
/* * This software is Copyright (c) 2004 bartavelle, <simon at banquise.net>, and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without modification, are permitted. * * Optimised set_key() and reduced binary size by magnum, 2012 ...
reduction.c
/* 3.13 Многопоточная программа редукции элементов * массива Реализовать параллельную программу выполнения * коллективной операции редукции для заданной * ассоциативной операции. На вход программы подаётся * операция и случайно сформированный массив a. * Выходные данные программы –результат выполнения редукц...
GB_binop__iseq_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...
mixed_tentusscher_myo_epi_2004_S1_19.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S1_19.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode...
draw.c
#include "image.h" #include <assert.h> #include <stdlib.h> void heman_draw_points(heman_image* target, heman_points* pts, HEMAN_FLOAT val) { HEMAN_FLOAT* src = pts->data; for (int k = 0; k < pts->width; k++) { HEMAN_FLOAT x = src[0]; HEMAN_FLOAT y = src[1]; src += pts->nbands; i...
divsufsort.c
/* * divsufsort.c for libdivsufsort-lite * Copyright (c) 2003-2008 Yuta Mori 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 wit...
move.h
#pragma once #include "core.h" #include "energy.h" #include "average.h" //#include "analysis.h" #include "potentials.h" #include "mpi.h" namespace Faunus { namespace Move { class Movebase { private: virtual void _move(Change&)=0; //!< Perform move and modify change object ...
convolution_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 ...
DiclensMainLoop_mex.c
// compile: mex -largeArrayDims OPTIMFLAGS="/openmp $OPTIMFLAGS" majorityVoting_mex.c #include "mex.h" #include "stdlib.h" #include "time.h" #define RANDOM_BREAK_TIES 1 /* Random number on range 1..n */ static int rand_int(int n) { int limit = RAND_MAX - RAND_MAX % n; int rnd; do { rnd = rand(); } while...
residual_based_pseudo_static_displacement_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_RESIDUAL_PSEUDO_STATIC_DISPLACEMENT_SCHEME ) #de...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
reduction2.c
/* Test multiple reduction clauses with different reduction operations */ #include <stdio.h> #include <omp.h> #define NUM_THREADS 4 int main () { int i,total=1000000, yy=10000,zz=10000; double res=0.0; omp_set_num_threads(NUM_THREADS); #pragma omp parallel for reduction(+:res) reduction(*:yy,zz) for (i=0; i<=...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
p2.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> int main (int argc, char *argv[]) { int i, n; float a[1000000], b[1000000], sum; /* Some initializations */ n = 1000000; omp_set_num_threads(4); #pragma omp parallel for for (i=0; i < n; i++) a[i] = b[i] = i * ...
trmv_x_sky_u_lo_trans.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, ...
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...
error.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB BT code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
NETNTLMv2_fmt_plug.c
/* * NETNTLMv2_fmt.c -- NTLMv2 Challenge/Response * * Written by JoMo-Kun <jmk at foofus.net> in 2009 * and placed in the public domain. * * Modified for performance, OMP and utf-8 support by magnum 2010-2011 * * This algorithm is designed for performing brute-force cracking of the NTLMv2 * challenge/response ...
libmsr_write_test.c
/** * @author Asim YarKhan (updated) * @author Vince Weaver (original version) */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "papi.h" #include "msr/msr_core.h" #include "msr/msr_rapl.h" #define MAX_EVENTS 128 char events[MAX_EVENTS][BUFSIZ]; char filenames[MAX_EVENTS...
gimple.h
/* Gimple IR definitions. Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.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 the Free Software...
tree-vectorizer.h
/* Vectorizer Copyright (C) 2003-2018 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.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 the Free Software Foundation; either ve...
nanort.h
// // NanoRT, single header only modern ray tracing kernel. // // // Notes : The number of primitives are up to 2G. If you want to render large // data, please split data into chunks(~ 2G prims) and use NanoSG scene graph // library(`${nanort}/examples/nanosg`). // /* The MIT License (MIT) Copyright (c) 2015 - 2019 ...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * 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) >...
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 ...
ft_ao.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 ...
myFunc.h
//#define __declspec(x) // Rob Farber #include <stdlib.h> #include <string.h> #include <stdint.h> #include <malloc.h> #include <math.h> #include <omp.h> #define MIC_DEV 0 #define ALLOC alloc_if(1) free_if(0) #define FREE alloc_if(0) free_if(1) #define REUSE alloc_if(0) free_if(0) // Use a struct to pass and get data...
GB_unaryop__ainv_uint8_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
a.20.1.c
/* { dg-do compile } */ void a20_wrong () { int a = 1; #pragma omp parallel { if (a != 0) #pragma omp flush(a) /* { dg-error "'#pragma omp flush' may only" } */ /* incorrect as flush cannot be immediate substatement of if statement */ if (a != 0) #pragma omp barrier /* { dg-error "'#pragma omp barrie...
GB_unaryop__identity_uint64_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...
stepper.c
#include "stepper.h" #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <stdbool.h> #include <omp.h> //ldoc on /** * ## Implementation * * ### Structure allocation */ central2d_t* central2d_init(float w, float h, int nx, int ny, int nfield, flux_t f...
oi.c
/* This source file is part of GAME-DA, which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME-DA */ /* optimum interpolation */ #include "game-da.h" #include "enum.h" #include <stdlib.h> #include <stdio.h> #include "geos95.h" int oi(double obs_error_cov[], double obs_op_jacobian...
sum_secondStrategy.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> int main() { /*t0, t1, t_tot: they are variable to take the time.*/ int i, quantity, threads, localQuantity, rest, id, step; float sumtot, sum, *container, t0, t1, t_tot; sumtot = 0; printf("How many numbers do you want to s...
stradd.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/ztradd.c, normal z -> s, Fri Sep 28 17:38:03 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
openmp_matmul.c
/* * Sample program to test runtime of simple matrix multiply * with and without OpenMP on gcc-4.3.3-tdm1 (mingw) * * (c) 2009, Rajorshi Biswas */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <assert.h> #include <omp.h> int main(int argc, char **argv) { int i,j,k; int n; double ...
helloworld.c
/* PMSIS includes */ #include "pmsis.h" #include "omp.h" /* Cluster main entry, executed by core 0. */ void cluster_delegate(void *arg) { printf("Cluster delegate\n"); #pragma omp parallel num_threads(4) { printf("[%d %d] Hello world!\n", pi_cluster_id(), omp_get_thread_num() ); } printf(...
GB_unop__trunc_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
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...
line_search_contact_strategy.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_...
omp_for_dynamic_large_chunk.c
// RUN: %libomp-compile // RUN: env OMP_WAIT_POLICY=passive OMP_NUM_THREADS=32 %libomp-run 0 134217728 1 134217728 // // This test makes sure that large chunks sizes are handled correctly // including internal runtime calculations which incorporate the chunk size // Only one thread should execute all iterations. #inclu...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__bget_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_unop__identity_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
ParFriends.h
/****************************************************************/ /* Parallel Combinatorial BLAS Library (for Graph Computations) */ /* version 1.6 -------------------------------------------------*/ /* date: 6/15/2017 ---------------------------------------------*/ /* authors: Ariful Azad, Aydin Buluc --------------...
kpoint.c
/* kpoint.c */ /* Copyright (C) 2008 Atsushi Togo */ #include <stdio.h> #include <stdlib.h> #include "mathfunc.h" #include "symmetry.h" #include "kpoint.h" #include "debug.h" /* #define GRID_ORDER_XYZ */ /* The addressing order of mesh grid is defined as running left */ /* element first. But when GRID_ORDER_XYZ is d...
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 ...
SingletonHolder.h
/** * Copyright (C) 2007-2011 YU Zhi. All rights reserved. * $Id$ * @file singleton_holder.h * * created on: 2008-04-16 * Author: salmon */ #ifndef INCLUDE_SINGLETON_HOLDER_H_ #define INCLUDE_SINGLETON_HOLDER_H_ namespace simpla { /** @ingroup design_pattern * * @addtogroup singleton Singleton * @{ *...
pjs.c
#include "pjs.h" #include "jstrat.h" unsigned *pjs(const long id, const unsigned n, unsigned stp[static restrict 1]) { jstrat_common js; (void)memset(&js, 0, sizeof(js)); unsigned *st = (unsigned*)NULL; integer *arr = (integer*)NULL; *stp = 0u; if (n <= 1u) goto theEnd; switch (id) { case PJS_ME...
app_main.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "bmp_interface.h" #include <omp.h> extern int __htc_get_unit_count(); extern int global_radius; int app_main(int argc, char **argv) { uint32_t bufsize = 1000; // Allocate target temp buffer. extern void *stencil_cp_alloc(size_t); u...
krb5_asrep_fmt_plug.c
/* * This software is * Copyright (c) 2015 Michael Kramer <michael.kramer@uni-konstanz.de>, * Copyright (c) 2015 magnum, * Copyright (c) 2016 Fist0urs <eddy.maaalou@gmail.com>, * Copyright (c) 2017 @harmj0y, * Copyright (c) 2017 Dhiru Kholia <dhiru [at] openwall.com> * * and it is hereby released to the general...
conservar.c
/* A simple 2D hydro code (C) Romain Teyssier : CEA/IRFU -- original F90 code (C) Pierre-Francois Lavallee : IDRIS -- original F90 code (C) Guillaume Colin de Verdiere : CEA/DAM -- for the C version */ /* This software is governed by the CeCILL license under French law and abiding by the rul...
gemver.c
/** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /* gemver.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #inclu...
mandel-omp.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. ...
pairwise_util.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
SegmentationUtil.h
/** * spaint: SegmentationUtil.h * Copyright (c) Torr Vision Group, University of Oxford, 2016. All rights reserved. */ #ifndef H_SPAINT_SEGMENTATIONUTIL #define H_SPAINT_SEGMENTATIONUTIL #include <boost/mpl/identity.hpp> #include <orx/base/ORImagePtrTypes.h> namespace spaint { /** * \brief This class provides...
MultiwayMerge.h
#include "CombBLAS.h" namespace combblas { /*************************************************************************** * Find indices of column splitters in a list of tuple in parallel. * Inputs: * tuples: an array of SpTuples each tuple is (rowid, colid, val) * nsplits: number of splits requested * ...
convolution_1x1_pack4.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 ...
gpm.h
/******************************************************************************* * gpm.h - generalized patch match algorithm ******************************************************************************* * Add license here... *******************************/ #ifndef GPM_H #define GPM_H #include <boost/shared_ptr...
GB_unaryop__ainv_int16_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...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ast-dump-openmp-taskloop.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp taskloop for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp taskloop for (int i = 0; i < x; i++) f...
mis.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "ompdist/graph.h" #include "ompdist/graph_gen.h" #include "ompdist/utils.h" #include "ompdist/msr.h" #include "config.h" typedef struct { int present; int in_mis; double r; } payload; double randnum() { return ((double) rand()) / ((doub...
normalize_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...
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...
GB_split_sparse_template.c
//------------------------------------------------------------------------------ // GB_split_sparse_template: split a single tile from a sparse matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_binop__first_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-...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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 // //===---------------------------...
residualbased_block_builder_and_solver_with_lagrange_multiplier.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix // // #if !de...
9087.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
saxpy.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> /* The saxpy problem is calculated as follows: R[i] = (alpha * A * b) + (a * beta) where: -A is a matrix NxM, -b is a vector of dimension M, -a is a vector of dimension N, -alpha and beta are two scalars, -R is a vector that will contain the "...
efs_fmt_plug.c
/* EFS cracker. Hacked together during 2013 monsoons by Dhiru Kholia * <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms,...
SpatialSubSampling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialSubSampling.c" #else static inline void THNN_(SpatialSubSampling_shapeCheck)( THTensor *input, THTensor *gradOutput, THTensor *weight, int kW, int kH) { ...