source
stringlengths
3
92
c
stringlengths
26
2.25M
taskwait-depend-1.c
void foo (int *p) { #pragma omp taskwait depend(iterator(i = 0:16) , in : p[i]) depend(out : p[32]) } void bar (int *p) { #pragma omp taskwait depend(mutexinoutset : p[0]) /* { dg-error "'mutexinoutset' kind in 'depend' clause on a 'taskwait' construct" } */ }
ZQ_CNN_MTCNN.h
#ifndef _ZQ_CNN_MTCNN_H_ #define _ZQ_CNN_MTCNN_H_ #pragma once #include "ZQ_CNN_Net.h" #include "ZQ_CNN_BBoxUtils.h" #include <omp.h> namespace ZQ { class ZQ_CNN_MTCNN { public: using string = std::string; ZQ_CNN_MTCNN() { min_size = 60; thresh[0] = 0.6; thresh[1] = 0.7; thresh[2] = 0.7; nms_thr...
omp_bug5fix.c
/****************************************************************************** * FILE: omp_bug5fix.c * DESCRIPTION: * The problem in omp_bug5.c is that the first thread acquires locka and then * tries to get lockb before releasing locka. Meanwhile, the second thread * has acquired lockb and then tries to get loc...
network.h
// == mojo ==================================================================== // // Copyright (c) gnawice@gnawice.com. All rights reserved. // See LICENSE in root folder // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation...
dmg_fmt_plug.c
/* * DMG cracker patch for JtR. Hacked together during August of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com> * * This software is * Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * Copyright (c) 2015, magnum * and is based on "dmg.c" from * * hashkill - a hash cracking tool * Copyright (C...
csr_matop.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
matrix_multiply.c
#include<stdio.h> #include<omp.h> #include<stdlib.h> int multiply_parallel(int m, int n, int p, int a[][5], int b[][5], int c[][5]) { int i,j,k,sum; #pragma omp parallel shared(a,b,c) private(i,j,k) { printf("Before Barrier construct - thread no = %d\n", omp_get_thread_num()); for (i=0; i<...
DeclOpenMP.h
//===- DeclOpenMP.h - Classes for representing OpenMP directives -*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------------...
GB_binop__second_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-...
pimonte_VSL_omp.c
#include <stdio.h> #include <stdlib.h> #include <time.h> //VSL Variables #include "mkl_vsl.h" #define BRNG VSL_BRNG_MCG31 #define METHOD 0 #define BLOCK_SIZE 500 int main(){ unsigned int iter=200000000; int i,j; double x, y; double dUnderCurve=0.0; double pi=0.0; VSLStreamStatePtr stream; //You n...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "dark_cuda.h" #include "box.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #define NUMCHARS 37 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { char *path; FILE *file = fopen(filename, "r"); ...
strgrp.c
/* Group similar strings Copyright (C) 2014 Andrew Jeffery <andrew@aj.id.au> This program 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 opti...
PReLU.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/PReLU.c" #else void THNN_(PReLU_updateOutput)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THIndex_t nOutputPlane) { THTensor_(resizeAs)(output, input); if (nOutputPlane == 0) { ...
sieve.c
/* * Adapted from: http://w...content-available-to-author-only...s.org/sieve-of-eratosthenes */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <math.h> int sieveOfEratosthenes(int n) { // Create a boolean array "prime[0..n]" and initialize // all entries it as...
GB_binop__bset_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
declare_variant_construct_codegen_1.c
// expected-no-diagnostics #ifndef HEADER #define HEADER // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -verify -fopenmp -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s --check-prefix=CK1 // RUN: %clang_cc1 -no-opaque-pointers -DCK1 -fopenmp -x c -triple x86_64-unknown-linux -emit-pch -o %t -fopenmp-vers...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
estimate_time_step.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // // Main authors: Kazem Kamran // Jordi Rubio // #if !defined(KRATOS_ESTIMATE_TIME_ST...
par_relax_more.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
vednnConvolutionBackwardFilter.c
#include "vednnConvolutionBackwardFilter.h" #include <stdint.h> #ifdef VEDNN_USE_OPENMP #include <omp.h> extern int __vednn_omp_num_threads ; #endif static inline vednnError_t vednnConvolutionBackwardFilter_wrapper( vednnConvBackwardFilter_t pFunc, const vednnTensorParam_t * restrict pParamIn, const vo...
masked.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // GCC generates code that does not call the runtime for the master construct // XFAIL: gcc #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { #pragma omp master { print_fuzzy_address(1); ...
Par-07-ParallelOmpForNestedOmpParallelFor.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {0, 0, 0, 0}; #pragma omp parallel { #pragma omp for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; #pragma omp parallel for for (int j = 0; j < 4; ++j) { b[j] = b[j] + a[i]; } } } return 0; }
hillclimb.c
#define _POSIX_C_SOURCE 200112L #define WIN32_LEAN_AND_MEAN #include <math.h> #include <ctype.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #define HASHN 3 // number of multiplies in hash #define SHIFT_RANGE 1 // radius of shift search #define CONST_RANGE 2 // radius ...
convolutiondepthwise_5x5_packn_fp16s.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 ...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file...
flowinfo_metadata.c
/* * Copyright 2014-2017 Nippon Telegraph and Telephone 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 requi...
6623.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...
time_dgemm.c
/** * * @generated d Tue Jan 7 11:45:23 2014 * **/ #define _TYPE double #define _PREC double #define _LAMCH LAPACKE_dlamch_work #define _NAME "PLASMA_dgemm" /* See Lawn 41 page 120 */ #define _FMULS FMULS_GEMM(M, N, K) #define _FADDS FADDS_GEMM(M, N, K) #include "./timing.c" static int RunTest(int *iparam, d...
generator_spgemm_csc_bsparse.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
taskdep_tied_threadid.c
// RUN: %libomp-compile-and-run // REQUIRES: abt #include "omp_testsuite.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int calc_seq(int n) { int i, j, *buffer = (int *)malloc(sizeof(int) * n * n); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { if (i == 0 && j == 0) { buffer[i...
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...
Psatd.h
#pragma once #include "Constants.h" #include "FieldSolver.h" #include "Grid.h" #include "Vectors.h" #include "PmlPsatd.h" //#include <chrono> #include <omp.h> namespace pfc { template <bool ifPoisson> class PSATDTimeStraggeredT : public SpectralFieldSolver<PSATDTimeStraggeredGridType> { public: ...
implicit_task_data.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // This test checks that values stored in task_data in a barrier_begin event // are still present in the corresponding barrier_end event. // Therefore, callback implementations different from the ones in callback.h are neccessary. // This...
matrix.h
/* Copyright 2016 Waizung Taam 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 to in writing, software di...
axpy_itlmic_kernel.c
// // Created by Yonghong Yan on 1/7/16. // #ifdef __cplusplus extern "C" { #endif #include "axpy.h" #include <offload.h> #include <homp.h> #ifdef USE_INTEL_MKL #include <mkl.h> #endif void axpy_itlmic_wrapper(omp_offloading_t *off, long start_n, long length_n,REAL a,REAL *x,REAL *y) { int sysid = off->dev->sys...
comms.h
/* //@HEADER // ***************************************************************************** // // XtraPuLP: Xtreme-Scale Graph Partitioning using Label Propagation // Copyright (2016) Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government r...
master_taskloop_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized void xxx(int argc) { int x; // expected-note {{initialize the variable 'x' to silence this warning}} #pragma om...
Par-15-ParConsecutiveNoWaitFor.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {0, 0, 0, 0}; #pragma omp parallel { #pragma omp for nowait for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; } #pragma omp for for (int j = 0; j < 4; ++j) { b[j] = a[j]; } } return 0; }
imginputfileconn.h
/** * DeepDetect * Copyright (c) 2014 Emmanuel Benazera * Author: Emmanuel Benazera <beniz@droidnik.fr> * * This file is part of deepdetect. * * deepdetect is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software F...
veccopy-ompt-target-disallow-both.c
#include <stdio.h> #include <omp.h> #include "callbacks.h" int main() { int N = 100000; int a[N]; int b[N]; int i; for (i=0; i<N; i++) a[i]=0; for (i=0; i<N; i++) b[i]=i; #pragma omp target parallel for { for (int j = 0; j< N; j++) a[j]=b[j]; } #pragma omp target teams distribu...
CALPHADFreeEnergyFunctionsTernary.h
#ifndef included_CALPHADFreeEnergyFunctionsTernary #define included_CALPHADFreeEnergyFunctionsTernary #include "CALPHADSpeciesPhaseGibbsEnergy.h" #include "InterpolationType.h" #include "Phases.h" #include "datatypes.h" #include "functions.h" #include <boost/property_tree/ptree.hpp> #include <fstream> #include <iost...
HYPRE_IJMatrix.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
distributiongenerator.h
// @file distributiongenerator.h This code provides basic structure for // distribution generators. This should be inherited by all other distribution // generators. // @author TPOC: contact@palisade-crypto.org // // @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) // All rights reserved. // Red...
omp-parallel-for-task.c
#include <omp.h> #include <stdio.h> #include <unistd.h> #define THREADS 2 #define LEN 7 int main(void) { int num[LEN] = {0}, k=0; omp_set_num_threads(THREADS); #pragma omp parallel for for (k=0; k<LEN; k++) { #pragma omp task { num[k] = omp_get_thread_num(); ...
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) >...
fftw.h
#ifndef __FFTW_H__ #define __FFTW_H__ #include <omp.h> #include <cassert> #include <iostream> #include "types.h" #include "index.h" #include <fftw3.h> namespace Impl { struct FFT { int nx1_, nx2_, nb_batches_; int nx1h_, nx2h_; fftw_plan forward_c2c_plan_, forward_r2c_plan_; fftw_plan backward_c2c_p...
integrate_c.c
#include "integrate_c.h" /* just to assure that declarations match */ #include <stdio.h> #include <stdlib.h> double f(double x) { return x*x; } double lib_integrate_c(double a, double b, int N) { double s = 0.0; double dx = (b-a)/N; int i; if(dx == 0.0) { fprintf(stderr, "dx == 0!\n"); return 0.0; } fo...
icv-2.c
/* { dg-do run { target *-*-linux* *-*-gnu* *-*-freebsd* } } */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <pthread.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> pthread_barrier_t bar; void *tf (void *p) { int l; if (p) omp_set_num_threads (3); pthread_barrier_wait (&bar); if ...
kthvalue_op.h
/* Copyright (c) 2021 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...
declare-variant-8.c
/* { dg-do compile { target c } } */ /* { dg-additional-options "-fdump-tree-gimple" } */ void f01 (void); #pragma omp declare variant (f01) match (user={condition(6 == 7)},implementation={vendor(gnu)}) void f02 (void); void f03 (void); #pragma omp declare variant (f03) match (user={condition(6 == 6)},implementation={...
SliceableArrays.h
/* * MIT License * * Copyright (c) 2017 Daniel Politte * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files(the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, mo...
caesar_encode.c
#include <unistd.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <strings.h> #include <time.h> #include <omp.h> #include "mpi.h" #define CHARS 100000 // caesar encode paralelizado int main(int argc, char * argv[]) { // variables para MPI int myid, numprocs; char hos...
sections.c
#include<stdio.h> #include<omp.h> void section_a(int id){ printf("Section A %d\n", id); } void section_b(int id){ printf("Section B %d\n", id); } void section_c(int id){ printf("Section C %d\n", id); } int main(){ int id; #pragma omp parallel { #pragma omp sections { #pragma omp section section_a(om...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
network.h
// == mojo ==================================================================== // // Copyright (c) gnawice@gnawice.com. All rights reserved. // See LICENSE in root folder // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation...
sdfgen.c
#include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #ifdef _WIN32 #include <fcntl.h> #include <io.h> #endif #include "df.h" #define STB_IMAGE_IMPLEMENTATION #include "stb/stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "...
r_direct_o1.c
/* * */ #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include <complex.h> //#include <omp.h> #include "config.h" #include "cint.h" #include "optimizer.h" #include "nr_direct.h" #include "time_rev.h" static void transpose01324(double complex * __restrict__ a, ...
cmapLapParaSimilarity.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and software framework */ /* CMAP-LAP --- Configurable Massively Parallel Solver for Lattice Problems */ ...
Diffus4th_order_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC * * Copyright 2017 Daniil Kazantsev * Copyright 2017 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (the "License")...
is.c
/************************************************************************* * * * N A S P A R A L L E L B E N C H M A R K S 3.0 * * * * ...
GB_unop__identity_uint32_uint16.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_unop__identity_int32_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
binarytrees3.c
// The Computer Language Benchmarks Game // https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ // // Contributed by Jeremy Zerfas // Based on the C++ program from Jon Harrop, Alex Mizrahi, and Bruno Coutinho. // *reset* // This controls the width of lines that are output by this program. #define MAXIMUM_LINE...
mg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG This benchmark is an OpenMP C version of the NPB MG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
contact_residualbased_elimination_builder_and_solver_with_constraints.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/...
omptest-ori.c
#include <nautilus/nautilus.h> #include <nautilus/shell.h> #include <nautilus/libccompat.h> #include <nautilus/random.h> //#include <nautilus/scheduler.h> #ifndef NAUT_CONFIG_DEBUG_GPUDEV #undef DEBUG_PRINT #define DEBUG_PRINT(fmt, args...) #endif #define ERROR(fmt, args...) ERROR_PRINT("omptest: " fmt, ##args) #defi...
fastmap.h
#ifndef FASTMAP_FASTMAP_ #define FASTMAP_FASTMAP_ #include "safeomp.h" static inline int sample(const int min, const int max) { return min + (int) ((double)(max-min + 1) * unif_rand()); } struct CustomMax { double value; int index; }; #ifdef OMP_VER_4 #pragma omp declare reduction(maximum : struct CustomM...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
combined_barrier.c
/* * COMBINED OPENMP-MPI BARRIER * OpenMP: Centralized sense reversal * MPI: Tournament * To show correct functionality of barrier: Uncomment line 182 * To compile: mpicc -o combined_barrier combined_barrier.c -lm -fopenmp * To run: mpiexec combined_barrier [num_threads num_barriers] */ #include <omp.h> #inclu...
DRB084-threadprivatemissing-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...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
openmp_closest_bygraph.c
/* Bag of Tasks OpenMP implementation to find the closest pairs of waypoints in each of a set of METAL TMG graph files. The tasks to complete are to find the closest pair of points in METAL TMG files given as command-line parameters in argv[2] through argv[argc-1]. The tasks are distributed in an order ba...
GB_bitmap_assign_IxJ_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_IxJ_template: iterate over all of C(I,J) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-...
phostname.c
#include <stdlib.h> #include <stdio.h> #include <strings.h> #include <string.h> #include <omp.h> #include <ctype.h> #include <mpi.h> #include <math.h> void NODE_COLOR(); char *trim ( char *s ); void dohelp(); void dohelp() { /************************************************************ * This is a glorified hello wor...
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, int64_t nslices, int64_t iwidth, int64_t iheight, int64_t owidth, int64_t oheight, int pad_l, int pad_r, int pad_t, int...
scrypt_fmt.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2013 by Solar Designer * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUTELY NO WARRANTY, express or implied. */ #include <stdio.h> #include <string.h> #ifdef _OPE...
GB_unaryop__ainv_uint32_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...
Main.c
#include "XSbench_header.h" #ifdef MPI #include<mpi.h> #endif int main( int argc, char* argv[] ) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int version = 19; int mype ...
GB_unaryop__abs_bool_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...
GB_export.c
//------------------------------------------------------------------------------ // GB_export: export a matrix or vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier: Apache-2....
GB_binop__bor_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-...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "functions.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p; za = (2 * za...
compute.c
#include <stdlib.h> #include <omp.h> #include "compute.h" tsp_solution_t* compute(tsp_search_t* global_search, int ncores) { /** * Expand the global_search list if the are too few nodes. * This will only happen for small values of N. * I don't think this will become the bottleneck. */ while (global_search->l...
schedule.c
#include <stdio.h> #include <omp.h> #include <math.h> int prime(int n) { int i = 2; for (i; i <= sqrt(n); i++) { if (n%i == 0) { return 0; } } return 1; } int main() { double t1,t2,time; int i=0; omp_set_num_threads(5); t1=omp_get_wtime(); #pragma omp parallel private(i) default(shared) #pragma o...
struct_matrix.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...
SuperArc.h
/// \ingroup base // /// \class ttk::FTMTree_MT /// \author Charles Gueunet <charles.gueunet@lip6.fr> /// \date June 2016. /// ///\brief TTK classe representing a SuperArc of a tree, /// containing regular vertices. /// ///\param dataType Data type of the input scalar field (char, float, /// etc.). #ifndef SUPERARC_H ...
GeometryConverter.h
/* -*-c++-*- IfcQuery www.ifcquery.com * MIT License Copyright (c) 2017 Fabian Gerold 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 ...
GB_unop__identity_int16_bool.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...
owl_ndarray_conv_impl.h
/* * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2019 Liang Wang <liang.wang@cl.cam.ac.uk> */ #ifndef OWL_CORE_CONV_IMPL #define OWL_CORE_CONV_IMPL /* * Calculate the block sizes for convolution operations. * Code heavily inspired by Eigen (http://eigen.tuxfamily.org/). */ #define IM2...
par_coarsen.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
rose_jacobi_sve.c
#include "rex_kmp.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #include <arm_sve.h> #include <arm_sve.h> #define REAL float static double read_timer_ms() { struct timeb tm; ftime(&tm); return ((double )tm . time) * 1000.0 + ((double )tm . millitm); } /...
H2Pack_matvec.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <math.h> #include <omp.h> #include "H2Pack_config.h" #include "H2Pack_typedef.h" #include "H2Pack_aux_structs.h" #include "H2Pack_matvec.h" #include "H2Pack_utils.h" #include "utils.h" // Calculate GEMV A * x0 and A^...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
packedstream_inl.h
/* * nvbio * Copyright (c) 2011-2014, NVIDIA CORPORATION. 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,...
GB_binop__isgt_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...
residualbased_incrementalupdate_static_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_RESIDUALBA...
GB_AxB_dot3_phase1_template.c
//------------------------------------------------------------------------------ // GB_AxB_dot3_phase1_template: analysis phase for dot3; C<M> = A'*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
Data.h
/***************************************************************************** * * Copyright (c) 2003-2018 by The University of Queensland * http://www.uq.edu.au * * Primary Business: Queensland, Australia * Licensed under the Apache License, version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Development unt...
GB_helper.c
//------------------------------------------------------------------------------ // GB_helper.c: helper functions for @GrB interface //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifie...
equation_of_state.c
/* A simple 2D hydro code (C) Romain Teyssier : CEA/IRFU -- original F90 code (C) Pierre-Francois Lavallee : IDRIS -- original F90 code (C) Guillaume Colin de Verdiere : CEA/DAM -- for the C version */ /* This software is governed by the CeCILL license under French law and abiding by the rules o...