source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_binop__gt_int16.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_ijsort.c
//------------------------------------------------------------------------------ // GB_ijsort: sort an index array I and remove duplicates //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Id...
vect-aggressive-1.c
/* { dg-require-effective-target vect_condition } */ /* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-fopenmp-simd" } */ #include "tree-vect.h" #define N 64 int a[N]; int c[N]; __attribute__ ((noinline)) int foo (void) { int i, res = 0; #pragma omp simd safelen(8) for (i = 0; i...
GB_binop__second_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
ssha512_fmt_plug.c
/* * ssha512 support for LDAP style password storage * * This software is Copyright (c) 2013 magnum, 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. */ #if FMT_EXTERNS_H extern struct f...
papi_cntr.h
/** Copyright (c) 2012, Swiss National Supercomputing Center (CSCS) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of ...
pooling_3x3_pack16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
yescrypt-simd.c
/*- * Copyright 2009 Colin Percival * Copyright 2012-2015 Alexander Peslyak * 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 copy...
bubble.c
// C program for implementation of Bubble sort #include <stdio.h> #include <time.h> #define getClock() ((double)clock()/CLOCKS_PER_SEC) #include <omp.h> double begin,end; void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } // A function to implement bubble sort void bubbleSort(int ...
GB_emult_phase0.c
//------------------------------------------------------------------------------ // GB_emult_phase0: find vectors of C to compute for C=A.*B or C<M>=A.*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // h...
mat_mul_p4a.c
/* * file for mat_mul_dyn.c */ #include <stdio.h> #include <stdlib.h> #include "./mat_mul.h" void mat_mul(int n, int **a, int **b, int **c); int compute_cijk(int i, int j, int k, int **a, int **b); void mat_mul_function_calls(int n, int **a, int **b, int **c); void compute_cijk2(int i, int j, int k, int ...
EmbeddingBag.h
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
main.c
//=============================================================================================================================================================================================================== //===========================================================================================================...
mandelbrot.c
/* To compile: gcc -O3 -o mandelbrot mandelbrot.c png_util.c -I. -lpng -lm -fopenmp Or just type: module load gcc make To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads): ./mandelbrot 4096 4096 1 */ #include <math.h> #include <stdio.h> #include <stdlib...
ch_ompss.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <assert.h> #include "ch_common.h" #include "../extrae.h" #include "../timing.h" //#ifdef _OMPSS //#warning "Compiling for OMPSS" //#endif //TODO: adjust wait() for timing static int depth; #pragma omp threadp...
task_untied3.c
#include <stdio.h> #include <omp.h> #define LARGE_NUMBER 10 //#define LARGE_NUMBER 10000000 double item[LARGE_NUMBER]; void process (double input) { printf("processing %f by thread %d\n",input, omp_get_thread_num()); } int main () { #pragma omp parallel { #pragma omp single { int i; printf("Using %...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "dark_cuda.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"); if(!file) file...
adam_op.h
#pragma once #include "caffe2/core/operator.h" namespace caffe2 { template <typename Context> void adam_update( int N, const float* g, const float* m, const float* v, float* ng, float* nm, float* nv, float beta1, float beta2, float eps_hat, float correction, const floa...
calculate_embedded_nodal_variable_from_skin_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Ruben Zorrilla // // #if !def...
grid_refinement.c
// // Created by sachetto on 30/09/17. // #include "grid.h" #include "../../single_file_libraries/stb_ds.h" /** * Decides if the grid should be refined by traversing the whole grid, according * to parameters refinementLevel and refinementBound. A cell will not be refined * either if its refinement level is equal...
GB_binop__isle_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
Partition.h
/* * Partition.h * * Created on: 03.10.2013 * Author: cls */ #ifndef PARTITION_H_ #define PARTITION_H_ #include <cinttypes> #include <set> #include <vector> #include <map> #include <cassert> #include <limits> #include "../graph/Graph.h" namespace NetworKit { /** * @ingroup structures * Implements ...
neighbourCacheWrapper.h
#ifndef ABSMC_NEIGHBOUR_CACHE_WRAPPER_H #define ABSMC_NEIGHBOUR_CACHE_WRAPPER_H #include <cstddef> #include <vector> #include <algorithm> #include <omp.h> #include "core/neighbourCache.h" namespace absmc { /// Wrapper for NeighbourCache, offering convenience methods for neighbour searches. template<class Agent> cla...
dropout-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
vc5.c
#define A(a, x, y, z) (a[(z) * ny * nx + (y) * nx + x]) static void inner(const float *restrict const f, float *restrict const fp, const int nx, const int ny, const int nz, const int nxi, const float *restrict const model_padded2_dt2, const float dt, const float *restrict const sources...
GB_binop__plus_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...
mvt.c
/** * mvt.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic....
zeroslike_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...
lv2_cpu_sort.h
/* * MEGAHIT * Copyright (C) 2014 - 2015 The University of Hong Kong & L3 Bioinformatics Limited * * 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 ...
NAL.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * 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,...
sqrtpireduction.c
#include<stdio.h> #include<omp.h> #define NUM_THREADS 40 static long num_steps = 1000000000; double step; int main() { int i; double pi, sum = 0.0; step = 1.0/(double) num_steps; omp_set_num_threads(NUM_THREADS); #pragma omp parallel { double x; #pragma omp for reduction(+:sum) for(i = 0; i < num_steps...
8831.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...
private.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <math.h> #include <sys/time.h> #include <unistd.h> #define FLT double struct real_img { FLT xpart; FLT ypart; }; struct real_img itype[9]; #pragma omp threadprivate(itype) int *ray2; #pragma omp threadprivate(ray2) #define pi 3.141592653589793...
solution.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <unistd.h> #include <omp.h> // Определение функции double Func(double x) { // Недействительные значения не должны вносить вклад в интеграл if (x > 2) { return 0; } return sqrt(4 - x*x); } // Формула Котеса рассчета определенного...
formatter.c
/* This source file is part of real2GAME, which is released under the MIT license. Github repository: https://github.com/OpenNWP/real2GAME */ /* This tool reads the output from other models / data assimilation systems and brings it into a standardized format. */ #include <netcdf.h> #include <stdio.h> #include <string...
GB_binop__cmplx_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...
rose_v1_output_dep.c
// an example of output dependence preventing parallelization // x: not live-in, yes live-out // outer scope // loop-carried output-dependence: x=... : accept values based on loop variable; or not. //Solution: Can be parallelized using lastprivate(x) #include <stdio.h> #include <omp.h> void foo() { int i; ...
GB_unop__cos_fc32_fc32.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...
multiply_matrix.c
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <mpi/mpi.h> #include <omp.h> #include "matrix.h" #define MAXLEN 1024 #define OUT 0 //#define NO_MAT_FILE void get_file_paths(char* A_path, char* B_path, char* C_path, char** argv); bool is_input_matrixes_invalid(struct Matrix* A, struct Matrix* B);...
sparsify.h
/****************************************************************************** * sparsify.h * * Source of VieCut. * ****************************************************************************** * Copyright (C) 2017 Alexander Noe <alexander.noe@univie.ac.at> * * Published under the MIT license in the LICENSE f...
m_image.h
/*====================================================================== Maratis Tiny C Library version 1.0 ------------------------------------------------------------------------ Copyright (c) 2015 Anael Seghezzi <www.maratis3d.org> Copyright (c) 2015 Marti Maria Saguer This software is provided 'as-is', withou...
setup.h
////////////////////////////////////////////////////////////////////////////////// // // // trueke // // A multi-GPU implementation of the exchange Monte Carlo method. ...
pfmg_setup_interp.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...
flickrms.c
#define FUSE_USE_VERSION 30 #define _XOPEN_SOURCE 500 #include <fuse.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <time.h> #include <ftw.h> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-W...
residual_based_bdf_displacement_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
common.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_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h>...
GB_binop__gt_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
flush.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // GCC generates code that does not call the runtime for the flush construct // XFAIL: gcc #include "callback.h" #include <omp.h> int main() { #pragma omp parallel num_threads(2) { int tid = omp_get_thread_num(); #pragma omp flush...
constr.c
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, * check out http://www.gromacs.org for more information. * Copyright (c) 2012,2013, by the GROMACS development team, l...
3d7pt.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 * Adapted from PLUTO and Pochoir test bench * * Tare...
BarnesHut_OpenMP_V1.c
/* * gcc BarnesHut_OpenMP.c -o barnes_openmp -lm -fopenmp * ./barnes_openmp filename number_of_threads */ #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> #include <time.h> #include <sys/time.h> #include <math.h> #include <omp.h> #define THRESHOLD 0.2 const double G = ...
MD5_std.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2003,2006,2011 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. * * This implementation of FreeBSD...
compute_refl.c
#include "lasrc.h" #include "time.h" #include "aero_interp.h" #include "poly_coeff.h" /****************************************************************************** MODULE: compute_toa_refl PURPOSE: Computes the TOA reflectance and TOA brightness temps for all the bands except the pan band. Uses a per-pixel solar ...
GB_binop__gt_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
conv_im2col_layer.h
//Tencent is pleased to support the open source community by making FeatherCNN available. //Copyright (C) 2018 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 o...
badcache.h
#pragma once #include "stdafx.h" /* Small OpenMP program that has very poor locality David Gregg, April 2015 The program takes two command line parameters: - the base 2 log of the size of the area of memory that will be used (the bigger this area, the greater scope for cache misses) - the number of "iterations" or me...
tutorial_region.c
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, 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,...
GB_unaryop__identity_fp32_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...
splay.c
/* Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk) This file is part of Velvet. Velvet 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 2 of the License, or (at your opt...
transpose.h
// This code is part of the Problem Based Benchmark Suite (PBBS) // Copyright (c) 2011-2016 Guy Blelloch and the PBBS team // // 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 restri...
lloyds_par24.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <stdbool.h> #include <omp.h> #include "csvparser.h" void vector_init(double *a, int length) { for (int i = 0; i < length; i++) { a[i] = 0; } } void vector_copy(double *dst, double *src, int length) { for (int i = 0; i < len...
sudoku-mpi.c
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <stdint.h> #include <mpi.h> #include <omp.h> #include <argparse.h> #include "sp/config.h" #include "sp/list.h" #define UNASSIGNED 0 #define UNCHANGEABLE -1 #define POS 0 #define VAL 1 #define TAG_HYP 1 #define TAG_EXIT 2 #...
GB_binop__second_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
ccode_c.c
/* Copyright (c) 2020 Vladyslav Andriiashen * Centrum Wiskunde & Informatica, Amsterdam, the Netherlands. * * Code is available via AppleCT Dataset Project; www.github.com/cicwi/applect-dataset-project * * Referenced paper: S.B. Coban, V. Andriiashen, P.S. Ganguly, et al. * Parallel-beam X-ray CT datasets of appl...
dot_product.c
/* * OpenMP implementation of dot product calculation. This program is used as the driving example in the * Demos in the module Heterogeneous Programming with OpenMP * * @author Apan Qasem */ #include<stdio.h> #include<stdlib.h> #include<sys/time.h> #include <omp.h> #define REPS 100000 double t0; double ...
GB_unop__identity_fc64_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
ast-dump-openmp-taskloop.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp taskloop for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp taskloop for (int i = 0; i < x; i++) f...
DRB094-doall2-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...
mandel-omp-for-point.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
lock.c
/* * lock.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---...
omp_sections_reduction.c
<ompts:test> <ompts:testdescription>Test which checks the omp sections reduction directive with all its options.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp sections reduction</ompts:directive> <ompts:testcode> #include <stdio.h> #include <math.h> #include "omp_testsuite.h" i...
Ligo_abc_gsl.c
// mimetic_bayes program // Alessandro Casalino, University of Trento // For licence informations, see the Github repository license // // Compile with: gcc-8 -O2 -DHAVE_INLINE -DGSL_RANGE_CHECK_OFF Ligo_abc_gsl.c -o Ligo_abc_gsl.o -lgsl -lgslcblas -fopenmp // Run with: ./Ligo_abc_gsl.o // Test running time: time ./Lig...
zgeadd.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
TAD.h
// // @author Adam Gibson // #ifndef LIBND4J_TAD_H #define LIBND4J_TAD_H #include <helpers/shape.h> #include <pointercast.h> namespace shape { /** * Dimension collapse is an algorithm * for collapsing singular dimensions. * This algorithm will adjust the dimensions * wrt the original. ...
tinyexr.h
#ifndef TINYEXR_H_ #define TINYEXR_H_ /* Copyright (c) 2014 - 2021, Syoyo Fujita and many contributors. 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 th...
3loops.c
/* * Only the first level loop index variable should be private * */ #include <stdio.h> #if defined (_OPENMP) #include <omp.h> #endif int main(void) { int i,jj,kkk; double a[10][9][8]; #pragma omp parallel for for(i=0;i<10;i++){ for(jj=0;jj<9;jj++){ for (kkk=0;kkk<8;kkk++){ a[i][jj][kkk]=9...
3d7pt.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 * Adapted from PLUTO and Pochoir test bench * * Tare...
util.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <math.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_blas.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> void read_matrix(int** index, int** matrix, double scaling, int N_kw, char* input_fileName) { FILE *fp = fop...
types.h
/* ---------------------------------------------------------------------- miniMD is a simple, parallel molecular dynamics (MD) code. miniMD is an MD microapplication in the Mantevo project at Sandia National Laboratories ( http://www.mantevo.org ). The primary authors of miniMD are Steve Plimpton (sjplimp...
DRB013-nowait-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
AlloyImage.h
/* * Copyright(C) 2015, Blake C. Lucas, Ph.D. (img.science@gmail.com) * * 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...
HybridRepSetReader.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2019 QMCPACK developers. // // File developed by: Ye Luo, yeluo@anl.gov, Arg...
rose_functionCall.c
//! Contributed by Jeff Keasler #include "omp.h" typedef double real8; extern void OtherFunc(int k,real8 *l,real8 *m,real8 *n,real8 *o,real8 *p,real8 q,real8 r,real8 s[3]); void foo(int istart,int iend,real8 *a,real8 *b,real8 *c,int k,real8 *l,real8 *m,real8 *n,real8 *o,real8 *p) { int k_nom_2; int i_nom_1; for...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
close_enter_exit.c
// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu // UNSUPPORTED: clang-6, clang-7, clang-8, clan...
GB_unaryop__abs_int64_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...
common.c
#include "core/common.h" const double PI2 = 2.0 * M_PI; const double PI4 = 4.0 * M_PI; const double PI6 = 6.0 * M_PI; const double PI8 = 8.0 * M_PI; const double A0 = 1.0; const double A1 = 1.93; const double A2 = 1.29; const double A3 = 0.388; const double A4 = 0.028; size_t get_inv_stamps(double** stamps, size_t s...
shortcut_layer.c
#include "shortcut_layer.h" #include "cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_shortcut_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2) { fprintf(stderr,"Shortcut Layer: %d\n", index); layer l = {0}; l.type = SHORTCUT; l.batch = batch; l.w...
GB_binop__islt_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
network.c
#include <stdio.h> #include <time.h> #include <assert.h> #include "network.h" #include "image.h" #include "data.h" #include "utils.h" #include "blas.h" #include "crop_layer.h" #include "connected_layer.h" #include "gru_layer.h" #include "rnn_layer.h" #include "crnn_layer.h" #include "local_layer.h" #include "convoluti...
bitshuffle.c
/* * Bitshuffle - Filter for improving compression of typed binary data. * * Author: Kiyoshi Masui <kiyo@physics.ubc.ca> * Website: http://www.github.com/kiyo-masui/bitshuffle * Created: 2014 * * See LICENSE file for details about copyright and rights to use. * */ #include "bitshuffle.h" #include "iochain.h" ...
H2ERI-HF-JK.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include <omp.h> #include "TinyDFT.h" #include "H2ERI.h" void TinyDFT_copy_shells_to_H2ERI(TinyDFT_p TinyDFT, H2ERI_p h2eri) { h2eri->natom = TinyDFT->natom; h2eri->nshell = TinyDFT->nshell; h2e...
GB_unaryop__identity_uint64_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...
ompReduction.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char **argv){ int threadCount = 20; omp_set_num_threads(threadCount); // still serial here int i = 6; int *v = (int*) calloc(threadCount, sizeof(int)); int badness, veryBad = 0; // fork the program #pragma omp parallel redu...
mt-dgemm.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef USE_CBLAS #include "cblas.h" #elif USE_NVBLAS #include "nvblas.h" #elif USE_MKL #include "mkl.h" #endif #define DGEMM_RESTRICT __restrict__ // ------------------------------------------------------- // // Function: get_seconds // // Vendor may modi...
GB_unaryop__lnot_fp64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
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_binop__gt_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-...
C_hybrid.c
#include <stdio.h> #include <mpi.h> #include <omp.h> int main(int argc, char *argv[]) { int numprocs, rank, namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; int iam = 0, np = 1; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor...