source
stringlengths
3
92
c
stringlengths
26
2.25M
DRB055-jacobi2d-parallel-no.c
/** * jacobi-2d-imper.c: This file is part of the PolyBench/C 3.2 test suite. * Jacobi with array copying, no reduction. * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #include <unistd.h> #include <st...
omp3.c
// note not doing O0 below as to ensure we get tbaa // RUN: if [ %llvmver -ge 9 ]; then %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out; fi // RUN: if [ %llvmver -ge 9 ]; then %clang ...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
linalg.c
/* -*- mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: sw=4 ts=8 et tw=80 */ /* linalg.c * * This file contain some simple accelerated array processing * routines. Like means and medians and dot products and stuff. * */ #include "pyactpol.h" #include "myassert.h" #include <st...
GB_unop__identity_fp64_int8.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...
omp2.c
// note not doing O0 below as to ensure we get tbaa // TODO: %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out // TODO: if [ %llvmver -ge 9 ]; then %clang -fopenmp -std=c11 -fno-vectori...
polynomialSurface.h
#ifndef batoid_PolynomialSurface_h #define batoid_PolynomialSurface_h #include "surface.h" namespace batoid { #if defined(BATOID_GPU) #pragma omp declare target #endif class PolynomialSurface : public Surface { public: PolynomialSurface( const double* coefs, const double*...
p2_a.c
#include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <omp.h> using namespace std; #define THREAD_NUM 10 #define PI 3.1415926535 struct Vector { double x, y, z; Vector(double _x, double _y, double _z) { x = _x; y = _y; z = _z; } }; double** ...
atomic-6.c
/* PR middle-end/36106 */ /* { dg-additional-options "-mieee" { target alpha*-*-* } } */ /* { dg-additional-options "-march=i586" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ #ifdef __i386__ # include "cpuid.h" #endif extern void abort (void); union { unsigned long long l; double d; } u = { .l = 0x7ff00000000...
timestep_opt1.c
#include <math.h> #include "timestep.h" #define REAL_CELL 1 double timestep(int ncells, double g, double sigma, int* celltype, double* H, double* U, double* V, double* dx, double* dy){ double wavespeed, xspeed, yspeed, dt; double mymindt = 1.0e20; #pragma omp simd reduction(min:mymindt) for (i...
matrixmultiply.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #define N 1000 #define M 1000 #define K 1000 int i,j,k; double a[N][M],b[M][K],c[N][K]; int mmm() { //#pragma omp parallel for private(i,j,k) shared(a,b,c) for (i = 0; i < N; i++) for (j = 0; j < M; j++) for (k = 0; k < K; k++) c[i][j]= c[i][j]+a[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_unaryop__abs_uint32_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
logger.h
/* * logger.h * * Created on: 2011/04/11 * Author: shu */ #ifndef LOGGER_H_ #define LOGGER_H_ #include <iostream> #include <ostream> #include <string> class Logger { public: static Logger* GetInstance() { static Logger instance; return &instance; } void ErrorLog(std::string message) { //#pr...
hybrid.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> #ifdef USE_MPI #include <mpi.h> #endif /* USE_MPI */ #ifdef _OPENMP #include <omp.h> #endif /* _OPENMP */ #include <sim_api.h> int read_slab_info() { /* This should read info from a file or something, but we fake it */ return 16;...
RandomGenerator.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Ken Esler...
odd-even-merge-sort_omp_beta.c
#include<stdio.h> #include<stdlib.h> #include<time.h> #include<limits.h> #include<omp.h> #define MAX(a,b) ((a<b)?b:a) #define MIN(a,b) ((a>=b)?b:a) #define ODD(A,n,i) A[n+2*i] #define EVEN(A,n,i) A[n+2*i+1] void print_array(int *A,int l,int r) { printf("\n"); for(int i=l;i<r;i++) printf("%3d ",i); p...
omp_for_bigbounds.c
// RUN: %libomp-compile -DMY_SCHEDULE=static && %libomp-run // RUN: %libomp-compile -DMY_SCHEDULE=dynamic && %libomp-run // RUN: %libomp-compile -DMY_SCHEDULE=guided && %libomp-run // XFAIL: * /* * Test that large bounds are handled properly and calculations of * loop iterations don't accidently overflow */ #include...
test8.c
void foo (int a) { 0; if (1) { 2; #pragma omp barrier 3; } else { 4; foo(); 5; } } int main() { #pragma omp parallel { 6; if (7) { 8; foo(9); 10; } else { 11; #pragma omp barrier 12; #pragma omp barrier 13; } 14; } }
lrthresh.c
/* Copyright 2015. The Regents of the University of California. * Copyright 2015. Tao Zhang and Joseph Cheng. * Copyright 2016-2018. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2014-2015 Frank Ong <frank...
9095.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...
blake2bp-ref.c
/* BLAKE2 reference source code package - reference C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is dist...
residualbased_incrementalupdate_static_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_RESIDUALBA...
kinFoodWeb_kry_omp.c
/* ----------------------------------------------------------------- * Programmer(s): Ting Yan @ SMU * Based on kinFoodWeb_kry.c and parallelized with OpenMP * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2021, Lawrence Livermore National Se...
GB_unaryop__abs_uint8_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...
vq_learn_par.c
#include <omp.h> static void learn_par(const char *codebook_class_name, int P, char *prefix, int num_raas, long tot_vecs, sample_t **allVectors, sample_t eps, void* callback_target, ...
convolution_3x3_pack8to4_int8.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 ...
dot_product_1.c
#include "testing_utils.h" // dot product of two matrices with block optimization void dotProductBlockOptimized(float ** __restrict__ c, float ** __restrict__ a, float ** __restrict__ b, int n){ omp_set_num_threads(24); for(int j_block = 0; j_block < n; j_block += BLOCK_SIZE) for(int k_block = 0;...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mask.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) 2011, Javier Sánchez Pérez <jsan...
6-im.c
/* The Computer Language Benchmarks Game * https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ * * contributed by Miles * optimization with 4x4 kernel + intrinsics */ #include <emmintrin.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <x86intrin.h> // compute values of A 4 at a time...
cryptsha256_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * based on rawSHA256_fmt.c code and Drepper's spec at * http://www.akkadia.org/drepper/SHA-crypt.txt * * This software is Copyright (c) 2012 magnum, and it is hereby released to the * general public under the following terms: Redistribution and use in ...
dd_dtw_openmp.c
/*! @file dtw_openmp.c @brief DTAIDistance.dtw @author Wannes Meert @copyright Copyright © 2020 Wannes Meert. Apache License, Version 2.0, see LICENSE for details. */ #include "dd_dtw_openmp.h" bool is_openmp_supported() { #if defined(_OPENMP) return true; #else return false; #endif } /** Check the argum...
lis_matrix_bsr.c
/* Copyright (C) 2002-2012 The SSI Project. 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, this list of condition...
matmul_c_core.c
/******************************************************************** * BenchIT - Performance Measurement for Scientific Applications * Contact: developer@benchit.org * * $Id: matmul_c_core.c 1 2009-09-11 12:26:19Z william $ * $URL: svn+ssh://william@rupert.zih.tu-dresden.de/svn-base/benchit-root/BenchITv6/kernel/...
main.c
#include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <ctype.h> #include <assert.h> #include <math.h> //#include "ocl-kernel-gen.h" #include "parse-args.h" #include "sgtype.h" #include "sgbuf.h" #include "sgtime.h" #include "trace-util.h" #include "sp_alloc.h" #if defined( USE_OPENCL ...
leader_elect_lcr.c
#include <stdio.h> #include <omp.h> #include <string.h> #include <stdlib.h> #include "ompdist/election.h" #include "ompdist/utils.h" #include "ompdist/msr.h" #include "config.h" /** * receive_leaders - Sets the next process' received leader to be the current * process' candidate. * * @processes: the list of proce...
gt.gtfcount.c
/* * PROJECT: GEM-Tools library * FILE: gt.gtfcount.c * DATE: 10/07/2013 * AUTHOR(S): Thasso Griebel <thasso.griebel@gmail.com> * DESCRIPTION: Annotation map a file against a reference annotation */ #include <getopt.h> #include <omp.h> #include "gem_tools.h" #define GT_GTFCOUNT_HEAD(output,title) fprintf(outpu...
alcanceDatosII.c
#include <stdio.h> #include <stdlib.h> #define TAM 4 void init(float *a, float value){ for(int i=0;i<TAM;++i) *(a+i)=1.0f; } int main() { int memsize = sizeof(float)*TAM; float *a = (float *) malloc(memsize); float *b = (float *) malloc(memsize); float *c = (float *) malloc(memsize); float cons=2.0f; init...
format_phi.h
#ifndef FORMAT_PHI_H #define FORMAT_PHI_H #include "common_phi.h" #include "utils_phi.h" template<typename iT, typename uiT> __attribute__ ((target(mic))) void generate_partition_pointer_s1_kernel(const iT *d_row_pointer, uiT *d_partition_pointer, ...
readbuf.h
#ifndef __READBUF #define __READBUF #include <vector> #include <iostream> #include <fstream> #include <exception> #include <stdexcept> #include <omp.h> using namespace std; class ReadBuf { public: ReadBuf(const char *fileName, size_t capacity) : capacity(capacity), buff(capacity), fin(fileName), ...
GB_binop__eq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
core_stsmlq.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/core_blas/core_ztsmlq.c, normal z -> s, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
prog.h
#pragma once #include <chrono> #include <cmath> #include <iostream> namespace prog { class Progress { public: inline Progress(); inline Progress(int step_count); inline Progress(int step_count, int percentage_increment); inline Progress(int step_count, int percentage_increment, bool enable); inli...
csr_elementwise.h
/* * Copyright 2008-2009 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
raytracer.h
#pragma once #include "resource.h" #include <iostream> #include <linalg.h> #include <memory> #include <omp.h> #include <random> #include <time.h> using namespace linalg::aliases; namespace cg::renderer { struct ray { ray(float3 position, float3 direction) : position(position), direction(direction) { } ...
addscaledmat.c
/* Add a matrix plus a multiple of a second matrix and put the result in a third matrix. C=A+scale*B */ #include <stdlib.h> #include <stdio.h> #include "declarations.h" void addscaledmat(A,scale,B,C) struct blockmatrix A; double scale; struct blockmatrix B; struct blockmatrix C; { in...
GB_binop__rdiv_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...
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 ...
jlinearfilter.h
#ifndef JFILTER_H #define JFILTER_H //Header for this file // //C System-Headers // //C++ System headers #include <mutex> //OpenCL Headers // //Boost Headers // //OpenMP Headers #include<omp.h> //Project specific headers #include "../jTypeTraits/jtypetraits.h" #include "../JASPL/jVector/jvector.h" namespace jaspl { ...
c-typeck.c
/* Build expressions with type checking for C compiler. Copyright (C) 1987-2020 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, o...
vecnn.h
#ifndef _nnvec_h #define _nnvec_h #include "allegro_emu.h" #include <float.h> #include "nn.h" /* ------------------------------------------------------------------------- Randomized NN algorithm, on vector input (patches, SIFT descriptors, etc) --------------------------------------------------------...
tree-vectorizer.h
/* Vectorizer Copyright (C) 2003-2015 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...
program_evaluator.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2010, 2011, 2012 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // ...
hill_climbing.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
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...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
target-5.c
#include <omp.h> #include <stdlib.h> int main () { int d_o = omp_get_dynamic (); int n_o = omp_get_nested (); omp_sched_t s_o; int c_o; omp_get_schedule (&s_o, &c_o); int m_o = omp_get_max_threads (); omp_set_dynamic (1); omp_set_nested (1); omp_set_schedule (omp_sched_static, 2); omp_set_num_threa...
move_particle_utility_pfem2.h
/* ============================================================================== KratosIncompressibleFluidApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRACC_OMP_020_Counter_wrong_lock_simd_Inter_yes.c
/* Concurrent access on a counter with the wrong lock, by utilising OpenMP Lock Routines and simd. Atomicity Violation. Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams. Although they are able to interrupt eachother leading to a wrong result. Inter Region. ...
2-2t.c
#include <stdio.h> #include <omp.h> int main() { omp_set_num_threads(2); #pragma omp parallel { printf(" Hello "); } printf("\n\n GoodBye – Team Destroyed – Exiting Program \n\n"); }
integrate.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <sys/time.h> const double eps = 1E-24; const double threshold = 0.05; const double pi_real = 3.141592653589793238462643; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec + (double)t.tv_usec...
hello.c
#include "pnm-image.h" #include "testcase.h" #include "track.h" #include "dynamic-setup.h" #include "space.h" #include "point.h" #include "xfrm.h" #include "cx/syscx.h" #include "cx/alphatab.h" #include <assert.h> #include <stdio.h> #include <string.h> #include <math.h> #ifdef __APPLE__ #include <OpenCL/opencl.h> #e...
GB_binop__div_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-...
GB_binop__isle_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
partial.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) **************************************...
sptensor.c
/* This file is part of ParTI!. ParTI! 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 Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
chap_fmt_plug.c
/* iSCSI CHAP authentication cracker. Hacked together during September of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in s...
fft.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
tree.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/dataset.h> #include <LightGBM/meta.h> #include <string> #include <map> #includ...
GB_unop__identity_fc64_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://...
GB_binop__isne_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
intersectionFunctor.h
// Copyright 2014 Nicolas Mellado // // 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 i...
JeeIOrbitalSoA.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Ye Luo, y...
StereoSGM.h
// Copyright � Robert Spangenberg, 2014. // See license.txt for more details #pragma once #include <vector> #include <list> #include <string.h> #include <fstream> #include <algorithm> class StereoSGMParams_t { public: uint16 P1; // +/-1 discontinuity penalty uint16 InvalidDispCost; // init val...
sol1.c
/** * \file * \brief [Problem 401](https://projecteuler.net/problem=401) solution - * Sum of squares of divisors * \author [Krishna Vedala](https://github.com/kvedala) */ #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define __STDC_FORMAT_MACROS #include <inttypes.h> #ifdef _OPENMP #...
target_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized //...
par_interp.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) **************************************...
overflow.c
void find_satellites(int icen, void *kd) { int j, k, ii, neighbor[100000], i, cnt; float dx, dy, dz, theta, prob_ang, vol_corr, prob_rad, grp_lum, p0, range; float cenDist, bprob, mtot, nsat; void *set; int *pch; double cen[3]; double sat[3]; // check if this galaxy has already been given to a group ...
GB_unaryop__ainv_bool_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
snmp_fmt_plug.c
/* Cracker for SNMPv3 USM hashes, https://tools.ietf.org/html/rfc3414. * * This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without * modification...
txinvr.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB SP code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
packet-inl.h
/*! * Copyright (c) 2014 by Contributors * \file packet-inl.h * \brief Generic packet vectorization code */ #ifndef MSHADOW_PACKET_INL_H_ #define MSHADOW_PACKET_INL_H_ #ifdef __APPLE__ #include <stdlib.h> #else #include <malloc.h> #endif #include "./base.h" #include "./tensor.h" #include "./expression.h" namesp...
knn.h
/* Copyright (c) 2020, Intel Corporation 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 the following disclaimer. * ...
ImageDeformation.h
/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, development version * * (c) 2006-2017 INRIA, USTL, UJF, CNRS, MGH * * * ...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <rabit/rabit.h> #include <xgboost/base.h> #include <xgboost/span.h> #include <xgboos...
test.c
#include <omp.h> #include <stdio.h> #define N 1024 #define EXPLICIT_TARGET_TASK 0 int A[N]; int B[N]; int C[N]; int D[N]; int Z[N+1]; #if EXPLICIT_TARGET_TASK #define LOMP_TASK_DEP_40 1 #define LOMP_TARGET_40 1 #define LOMP_PROC_BIND_40 1 #define LOMP_OS_LINUX 1 #define LOMP_CANCEL_40 1 #include "/gsa/...
GB_unop__minv_uint16_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...
RadixSortTypes.c
#include "RadixSortTypes.h" void radixSortShort(short *array, int size) { int i; uint32_t *histA = (uint32_t *) calloc(NUM_THREADS << 16, sizeof(uint32_t)); uint16_t *temp = (uint16_t *) malloc(size * sizeof(uint16_t)); if (!histA || !temp) { if (histA) free(histA); if (temp) free(temp); return; } uint16_...
Layer_Im2Mat.h
/* * Layers.h * rl * * Created by Guido Novati on 11.02.16. * Copyright 2016 ETH Zurich. All rights reserved. * */ #pragma once #include "Layers.h" // Im2MatLayer gets as input an image of sizes InX * InY * InC // and prepares the output for convolution with a filter of size KnY * KnX * KnC // and output a...
GB_unop__identity_int32_bool.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...
heat_equation.c
#include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <mpi.h> #include <bp_util.h> inline double innerloop(const double* grid, double* T, int width, int i) { int a = i * width; const double *up = &grid[a+1]; const double *left = &grid[a+width]; const double *right ...
libimagequant.c
/* pngquant.c - quantize the colors in an alphamap down to a specified number ** ** Copyright (C) 1989, 1991 by Jef Poskanzer. ** Copyright (C) 1997, 2000, 2002 by Greg Roelofs; based on an idea by ** Stefan Schneider. ** © 2009-2013 by Kornel Lesinski. ** ** Permission to use, copy, modi...
GB_binop__eq_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
msquare.c
/* * this is stupid and ugly. * * i'm not clever and have no idea about how to play the order-4 magic square * game, so i just brute-force-attack the problem, and am too lazy to check * the "replicated" ones: burn the CPU, and play no trick. * * to use OpenMP to take advantage of all your cores, compile with `...
linked_omp3_tasks.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #ifndef N #define N 5 #endif #ifndef FS #define FS 38 #endif struct node { int data; int fibdata; struct node* next; }; struct node* init_list(struct node* p); void processwork(struct node* p); int fib(int n); int fib(int n) ...
encode_file.c
#include <ristretto_elgamal.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> /* * A user uploads Ristretto encoded points to the server. */ size_t ristretto_elgamal_return_point_num(size_t filesize) { size_t num_of_58_ciphertext_group = ceil(filesize / 1827.0); /* * Return 59 Ristretto...
GB_binop__rdiv_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...