source
stringlengths
3
92
c
stringlengths
26
2.25M
csr_matvec.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) **************************************...
GB_binop__isgt_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
BRKGA.h
/** * BRKGA.h * * This template class encapsulates a Biased Random-key Genetic Algorithm for minimization problems * with K independent Populations stored in two vectors of Population, current and previous. * It supports multi-threading via OpenMP, and implements the following key methods: * * - BRKGA() constru...
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...
analyze.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % AAA N N AAA L Y Y ZZZZZ EEEEE ...
convolution-2d.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...
histogram.h
#pragma once #include <sstream> #include "util/pretty_print.h" template<typename T> vector<int32_t> core_val_histogram(int n, T &core, bool is_print = false) { Timer histogram_timer; // core-value histogram int max_core_val = 0; vector<int32_t> histogram; #pragma omp parallel { #pragma omp for re...
pr4.c
//Write an OpenMP program to find the number of processes, number of threads, etc (the environment information). #include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid, procs, maxt, inpar, dynamic, nested; /* Start parallel region */ #pragma omp parallel priv...
elemwise_binary_op.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
GB_unaryop__minv_uint8_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...
spi.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> int main(int argc, char **argv) { //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 = argv(atoi); struct drand48_data *dra...
build_tree.c
/******************************************************************************* * 2pt/build_tree.c: this file is part of the FCFC program. * FCFC: Fast Correlation Function Calculator. * Github repository: https://github.com/cheng-zhao/FCFC * Copyright (c) 2020 -- 2021 Cheng Zhao <zhaocheng03@gmail.com> [M...
mxnet_op.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
gol.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> // Custom includes #include "gol.h" /** * Initialize all variables and structures required by GoL evolution. */ void initialize(life_t *life) { // 1. Initialize the random seed srand(life->seed); // 2. Check if an input file was specified in ...
convolution_winograd_transform_pack4.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 ...
Simulation.c
#include "XSbench_header.h" //////////////////////////////////////////////////////////////////////////////////// // BASELINE FUNCTIONS //////////////////////////////////////////////////////////////////////////////////// // All "baseline" code is at the top of this file. The baseline code is a simple // implementation ...
GB_unaryop__ainv_int8_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRB023-sections1-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...
serial_tree_learner.h
/*! * Original work Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Modified work Copyright (c) 2020 Fabio Sigrist. All rights reserved. * Licensed under the Apache License Version 2.0 See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_...
Trainer.h
/* * Copyright 2016 [See AUTHORS file for list of authors] * * 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 require...
irbuilder_unroll_partial_factor.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics #ifnd...
GB_unaryop__ainv_uint8_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...
GB_binop__bxnor_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:...
gvflib.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "idl_export.h" double double_max(double, double); int gvf_natural( long *iterations_ptr, short *x_max_ptr, short *y_max_ptr, double *dt_ptr, double *u_idl, double *v_idl, double *fx, double *fy, double *g, double *h, d...
luo_rudy_1991.c
#include "luo_rudy_1991.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_equations = NEQ; } SET_ODE_INITIAL_CONDITIONS_CPU(set_model_initial_conditions_cpu) { sv[0] = -84.380111f; //V millivolt ...
GB_unop__sqrt_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
eliminate.c
#include "heads.h" void eliminate(int base, int target, int col) { double base_num = matrix[base][col]; double multi = (double)matrix[target][col] / base_num; // start from col to reduce time complexity.(item before col is already become 0) if(multi != 0){ for (int i = col; i < SIZE; i++) { ...
kpoint.c
/* kpoint.c */ /* Copyright (C) 2008 Atsushi Togo */ #include <stdio.h> #include <stdlib.h> #include "mathfunc.h" #include "kpoint.h" const int kpt_bz_search_space[KPT_NUM_BZ_SEARCH_SPACE][3] = { { 0, 0, 0}, { 0, 0, 1}, { 0, 0, 2}, { 0, 0, -2}, { 0, 0, -1}, { 0, 1, 0}, { 0, 1, 1}, { 0, 1,...
declare6.c
/* Example of the ref and uval modifiers in the linear clause The ref modifier declares that the address of x is linear. The uval modifier declares that the address of c is uniform, and its value is linear. */ #pragma omp declare simd linear(ref(x)) linear(uval(c)) void increment(int& x, int& c) { x +...
max_reduction.c
#include <float.h> double array_max(double* restrict var, int ncells) { double xmax = DBL_MIN; #pragma omp parallel for reduction(max:xmax) for (int i = 0; i < ncells; i++){ if (var[i] > xmax) xmax = var[i]; } }
GB_binop__min_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
round_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...
cafe_tree.c
/*! \page Tree Tree * \code{.sh} # tree NEWICK-formatted tree * \endcode * * \code{.sh} # tree -i treefile * \endcode * A NEWICK-formatted tree containing branch lengths and taxon names as they are specified in the \ref Load "input file". Branch lengths should be integer units and the tree should be ultrametric (all ...
GB_unop__identity_int32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__pow_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-...
GB_unaryop__minv_bool_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_AxB_dot2.c
//------------------------------------------------------------------------------ // GB_AxB_dot2: compute C=A'*B or C<!M>=A'*B in parallel, in-place //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
lenet.c
#include "lenet.h" #include <memory.h> #include <time.h> #include <stdlib.h> #include <math.h> #define GETLENGTH(array) (sizeof(array)/sizeof(*(array))) #define GETCOUNT(array) (sizeof(array)/sizeof(double)) #define FOREACH(i,count) for (int i = 0; i < count; ++i) #define CONVOLUTE_VALID(input,output,w...
spheres_ini.c
/* For generation of the initial particle distribution consisting of two colliding spheres for the SPH codes miluph and miluphcuda. * * Both spheres can in general consist of a core, a mantle and a shell of different materials. * Alternatively they can also be set up following some given radial profiles. * * A r...
DRB110-ordered-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
broadcast_reduce-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
core_ctrtri.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_ztrtri.c, normal z -> c, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
fista.h
/* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal * * This file is part of SPAMS. * * SPAMS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opti...
GB_unaryop__identity_uint64_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...
mkl_util.h
/* Copyright 2017 The TensorFlow 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 a...
workshare.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define CHUNKSIZE 10 #define N 100 // Dynamical scheduling of work among a group of threads, // each given a CHUNKSIZE of work repeatedly // until the job is done int main (int argc, char *argv[]) { int nthreads, tid, i, chunk; double a[N], b[N]; fo...
GB_binop__lxor_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-...
Lorentz_system_calculation.c
#include <stdio.h> #include <omp.h> #include <unistd.h> #include <math.h> #include <gmp.h> #include <stdlib.h> //#define N 200000 // ////int N =2;ßß //#define Tn 5 //actually N+1 //#define K 10 // order of precision for the use with GMP int main(int argc, char *argv[]){ int N=400; int Tn=1200; doub...
raytracing.c
#include <stdio.h> #include <stdlib.h> #include "math-toolkit.h" #include "primitives.h" #include "raytracing.h" #include "idx_stack.h" #define MAX_REFLECTION_BOUNCES 3 #define MAX_DISTANCE 1000000000000.0 #define MIN_DISTANCE 0.00001 #define SAMPLES 4 #define SQUARE(x) (x * x) #define MAX(a, b) (a > b ? a : b) /* ...
GB_unaryop__minv_uint64_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...
common.h
#ifndef __COMMOM_H__ #define __COMMOM_H__ #include <stdint.h> #include <string.h> #include "gap_common.h" #include "gap_cluster.h" #include "gap_dmamchan.h" performance_t perf; #define l2malloc malloc #define l2free free #define l1malloc L1_Malloc #define l1free L1_Free #define ANSI_COLOR_RED "\x1b[1m\x1b[...
GB_bitmap_add_template.c
//------------------------------------------------------------------------------ // GB_bitmap_add_template: C = A+B, C<M>=A+B, and C<!M>=A+B, C bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
ripemd_fmt_plug.c
/* ripemd cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary...
kpoint.c
/* kpoint.c */ /* Copyright (C) 2008 Atsushi Togo */ #include <stdio.h> #include <stdlib.h> #include "mathfunc.h" #include "kpoint.h" #include "debug.h" static int search_space[][3] = { {0, 0, 0}, {0, 0, 1}, {0, 1, -1}, {0, 1, 0}, {0, 1, 1}, {1, -1, -1}, {1, -1, 0}, {1, -1, 1}, {1, 0, -1}, {1, 0,...
gemm.c
#include "gemm.h" #include "utils.h" #include "opencl.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <assert.h> void gemm_bin(int M, int N, int K, float ALPHA, char *A, int lda, float *B, int ldb, float *C, int ldc) { int i,j,k; for(i = 0; i < M; ++i){ ...
dsymm.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/zsymm.c, normal z -> d, Fri Sep 28 17:38:02 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
GB_binop__min_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unop__ainv_fp64_fp64.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...
LADMM.h
#ifndef LADMM_H #define LADMM_H #include "Matrix.h" #include <string> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <stdio.h> /* printf */ #include <time.h> #include <fstream> #include <algorithm> #include <iomanip> #include <ctime> #include <sstream> #include <omp.h> //#include "cmd_line.h" ...
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 ...
stream.c
/*-----------------------------------------------------------------------*/ /* Program: Stream */ /* Revision: $Id: stream.c,v 5.9 2009/04/11 16:35:00 mccalpin Exp $ */ /* Original code developed by John D. McCalpin */ /* Programmers: John ...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
atomic.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...
GB_binop__lt_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...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convolution_1x1_pack4to16.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 ...
Lamg.h
/* * Lamg.h * * Created on: Oct 20, 2015 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef NETWORKIT_CPP_NUMERICS_LAMG_LAMG_H_ #define NETWORKIT_CPP_NUMERICS_LAMG_LAMG_H_ #include <vector> #include "../LinearSolver.h" #include "MultiLevelSetup.h" #include "SolverLamg.h" #include "../Gau...
CartesianMPIHDF.h
// File : CartesianMPIHDF.h // Created : Wed Jan 29 2020 10:25:26 AM (+0100) // Author : Fabian Wermelinger // Description: HDF IO routines for Cartesian MPI grid types // Copyright 2020 ETH Zurich. All Rights Reserved. #ifndef CARTESIANMPIHDF_H_S5X4YWDT #define CARTESIANMPIHDF_H_S5X4YWDT #include "Cubism...
GB_binop__rminus_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
ZQ_FaceDatabaseMaker.h
#ifndef _ZQ_FACE_DATABASE_MAKER_H_ #define _ZQ_FACE_DATABASE_MAKER_H_ #pragma once #include <sstream> #include <direct.h> #include <windows.h> #include <io.h> #include <omp.h> #include <opencv2\opencv.hpp> #include "ZQ_FaceDetector.h" #include "ZQ_FaceRecognizer.h" #include "ZQ_FaceDatabase.h" #include "ZQ_FaceDatabase...
GB_binop__fmod_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
openmp4.c
#include <math.h> #include <omp.h> void cholesky(double *A, double *L, int n) { for (int i = 0; i < n; i++) { double s = 0; for (int k = 0; k < i; k++) { s += L[k * n + i] * L[k * n + i]; } L[i * n + i] = sqrt(A[i * n + i] - s); #pragma omp parallel for for (int j = i + 1; j < n; j++) { double s = 0; ...
convolution_3x3_pack1to4_int8.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 ...
parallel.h
/* This file is adapted from the CMU Problem-Based Benchmark Suite, * https://github.com/cmuparlay/pbbslib */ #pragma once #include <iostream> static std::string scheduler_name(); static int num_workers(); static int worker_id(); // parallel loop from start (inclusive) to end (exclusive) running // function f. /...
singlenode_spgemm.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "opencl.h" #include <stdio.h> #include <stdlib.h> #include <string.h> pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { if (filename) filename[strcspn(filename, "\n\r")] = 0; char *pos; if ((pos=strchr(filena...
GB_unaryop__identity_uint8_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRB038-truedepseconddimension-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...
GB_binop__bor_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unop__ceil_fp64_fp64.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...
ark_heat1D_omp.c
/*--------------------------------------------------------------- * Programmer(s): Shelby Lockhart @ LLNL *--------------------------------------------------------------- * Based on the serial code ark_heat1D.c developed by * Daniel R. Reynolds @ SMU and parallelized with OpenMP *----------------------------------...
mat-sum_gpu.c
/* This program performs matrix sum on the GPU with dynamically allocated matrices. Author: Gleison Souza Diniz Mendonça Date: 04-01-2015 version 2.0 Run: ipmacc mat-sum_gpu.c -o mat ./mat matrix-size */ #include "BenchmarksUtil.h" #include <assert.h> #include <math.h> #include <stdio.h...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
core_slacpy.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_zlacpy.c, normal z -> s, Fri Sep 28 17:38:19 2018 * **/ #include <plasma_core_blas.h> #include "pla...
GB_AxB_saxpy_parallel.c
//------------------------------------------------------------------------------ // GB_AxB_saxpy_parallel: C<M>=A*B, C=A*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See Gra...
exercise2.c
/* * BSD 2-Clause License * * Copyright (c) 2020, Alessandro Capotondi * 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 copyri...
oracle12c_fmt_plug.c
/* * This software is Copyright (c) 2015, 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, with or without modification, * are permitted. * * https://www.trustwave.com/Resources/SpiderLabs-Bl...
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 <memory> #include <numeric> #inc...
attention.c
#include "darknet.h" #include <sys/time.h> #include <assert.h> void extend_data_truth(data *d, int n, float val) { int i, j; for(i = 0; i < d->y.rows; ++i){ d->y.vals[i] = realloc(d->y.vals[i], (d->y.cols+n)*sizeof(float)); for(j = 0; j < n; ++j){ d->y.vals[i][d->y.cols ...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
extra_data.c
// // Created by sachetto on 01/10/17. // #include <unistd.h> #include "../config/extra_data_config.h" #include "../config_helpers/config_helpers.h" #include "../libraries_common/common_data_structures.h" #include "../utils/file_utils.h" real* set_commom_schemia_data(struct config *config, uint32_t num_cells, int n...
clik_parametric_addon.c
#include "clik_parametric.h" #include "clik_helper.h" #include "clik_parametric_addon.h" typedef struct { parametric *p_model; double *rq,*wrq; int nell,nbins,m; double unit; int *ell; double *bins,*wl; double *wbins; int *bi,*bo; int bn; double *A; int ismul; } parametric_smica; void comp_par...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
3921.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...
pragma_example.c
/* To compile this program on Linux, try: make CFLAGS='-std=c99 -Wall' pragma_example To run: ./pragma_example; echo $? It should print 0 if OK. You can even compile it to run on multicore SMP for free with make CFLAGS='-std=c99 -fopenmp -Wall' pragma_example To verify there are really some cl...
GB_binop__eq_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-...
DRB072-taskdep1-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
zSchCompUdt-2Ddynamic.c
/*! @file * \brief THis file contains the main loop of pdgstrf which involves rank k * update of the Schur complement. * Uses 2D partitioning for the scatter phase. * * <pre> * -- Distributed SuperLU routine (version 4.1) -- * Lawrence Berkeley National Lab, Univ. of California Berkeley. * Octob...
pr61200.c
/* PR libgomp/61200 */ /* { dg-do run } */ #include <omp.h> #include <stdlib.h> #include <unistd.h> volatile int x; void foo () { int var = 1; int i; for (i = 0; i < 2; i++) { if (i == 1) { #pragma omp parallel num_threads(2) if (x) var++; else { #pragma omp single ...