source
stringlengths
3
92
c
stringlengths
26
2.25M
edgelist_transformation.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
kmp_csupport.c
/* * kmp_csupport.c -- kfront linkage support for OpenMP. */ /* <copyright> Copyright (c) 1997-2016 Intel Corporation. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistr...
Tutorial.h
//================================================================================================= /*! // \file blaze/Tutorial.h // \brief Tutorial of the Blaze library // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or modify...
GB_unaryop__identity_int16_fp64.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_binop__bclr_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-...
opencl_dmg_fmt_plug.c
/* * DMG cracker patch for JtR. Hacked together during August of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com> * * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * Copyright (c) 2015, magnum * and it is hereby released to the general public under the following terms: * Redistribution...
conv_kernel_arm.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...
peel.h
#include "count.h" //buffers/arrays for histogramming edges/edge workload for wing decomposition std::vector<std::array<intB, locBuffSizeLarge>> thdBloomBuff; std::vector<std::array<intE, locBuffSizeLarge>> thdEdgeBuff; std::vector<std::vector<intE>> histCountPerThread; std::vector<intE> histCountGlobal; std::vector...
GB_binop__rminus_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-...
GB_binop__lor_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-...
main.c
void foo(int N, double *A) { #pragma omp parallel default(shared) { #pragma omp for for (int I = 0; I < N; ++I) { A[I] = I; } } }
hermm_c_dia_n_lo_col_trans.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include <memory.h> #include <stdlib.h> alphasparse_status_t ONAME(const ALPHA_Complex alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Complex *x, const ALPHA_INT columns, const ALPHA_INT ld...
fill_int2e.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 requi...
mixed_tentusscher_myo_epi_2004_S0.c
// Scenario 0 - Original Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S0.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 =...
HardTanh.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/HardTanh.c" #else static int nn_(HardTanh_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor); THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor); THTensor_(resizeAs)(output, input); if (input->nD...
GB_unop__asin_fp32_fp32.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...
print.c
/* Copyright (c) 2010-2011, Jun Namikawa <jnamika@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "A...
qsort_arg_mt.c
/* * Imported from PostgreSQL sources by Teodor Sigaev <teodor@sigaev.ru>, <sigaev@corp.mail.ru> */ /* * qsort_arg.c: qsort with a passthrough "void *" argument * * Modifications from vanilla NetBSD source: * Add do ... while() macro fix * Remove __inline, _DIAGASSERTs, __P * Remove ill-considered "swap_...
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...
jacobi-ompacc-multiGPU.c
/* * Rectangular matrix multiplication, started from MIT Cilk matmul.cilk example * */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <assert.h> #include "omp.h" #include <pthread.h> #include <string.h> #define REAL double /* in second */ #define read_timer() omp_get_wtime() /* in ms */ #define ...
convolutiondepthwise_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 ...
syr2k.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...
GB_unop__identity_bool_int64.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__ge_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
neutral.c
#include "neutral.h" #include "../../comms.h" #include "../../params.h" #include "../../shared.h" #include "../../shared_data.h" #include "../neutral_interface.h" #include <assert.h> #include <float.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #ifdef MPI #include "mpi.h" #endif // Perf...
ast-dump-openmp-ordered.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() { #pragma omp ordered ; } void test_two(int x) { #pragma omp for ordered for (int i = 0; i < x; i++) ; } void test_three(int x) { #pragma omp f...
cpu.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...
Example_flush_nolist.1.c
/* * @@name: flush_nolist.1c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success */ int x, *p = &x; void f1(int *q) { *q = 1; #pragma omp flush /* x, p, and *q are flushed */ /* because they are shared and accessible */ /* q is not flushed because it is not shared. */ } void f2(int *q) { ...
track_ellipse_gpu.c
#include "track_ellipse.h" // Host and device arrays to hold matrices for all cells // (so we can copy to and from the device in a single transfer) // The number of work items per work group #define LOCAL_WORK_SIZE 256 #define FP_TYPE float #define FP_CONST(num) num##f #define PI_FP32 FP_CONST(3.14159) #define ONE_O...
GB_binop__land_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...
multisort-omp-leaf.c
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <sys/time.h> double getusec_() { struct timeval time; gettimeofday(&time, NULL); return ((double)time.tv_sec * (double)1e6 + (double)time.tv_usec); } #define START_COUNT_TIME stamp = getusec_(); #define STOP_C...
mpi_omp.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...
timers.h
double start[64], elapsed[64]; //#pragma omp threadprivate (start, elapsed)
denoise.h
/// @file denoise.h /// @brief denoise module /// @author Jeff Perry <jeffsp@gmail.com> /// @version 1.0 /// @date 2011-10-31 #ifndef DENOISE_H #define DENOISE_H #include "horny_toad.h" #include "jack_rabbit.h" #include <fstream> namespace opp { /// @brief gaussian blur and rescale an image /// /// @tpar...
EmbeddingBag.h
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
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...
symm_c_coo_u_lo_row_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #define CACHELINE 64 alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT m = mat...
omp_ex1.c
#include <stdio.h> #include<stdlib.h> #include <omp.h> int main (int argc, char *argv[]){ if(argc != 2){ printf("usage: %s [num threads] \n",argv[0]); return 0; } int i,a = 0; int num_threads = atoi(argv[1]); printf("num threads: %d\n",num_threads); omp_set_num_threads(num_threads); #pragma omp para...
omp_kmeans.c
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* File: kmeans_clustering.c (OpenMP version) */ /* Description: Implementation of simple k-means clustering algorithm */ /* This program takes an array of N data objects, each with */ ...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
conjugate_gradient.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdint.h> #include <math.h> #include "nb/memory_bot.h" #include "nb/solver_bot/sparse/sparse.h" #include "nb/solver_bot/sparse/solvers/conjugate_gradient.h" #include "../sparse_struct.h" int nb_sparse_solve_conjugate_gradient (const nb_sparse_t *co...
acc_JKmat.h
#ifndef __ACC_JKMAT_H__ #define __ACC_JKMAT_H__ #include "TinyDFT_typedef.h" #define ACC_JKMAT_IN_PARAM TinyDFT_p TinyDFT, int tid, int M, int N, int P, int Q, \ double *ERI, int load_P, int write_P, \ double *FM_strip_buf, int FM_strip_offset, \ ...
flexDiagonalOperator.h
#ifndef flexDiagonalOperator_H #define flexDiagonalOperator_H #include <vector> #include "flexLinearOperator.h" //! represents a diagonal operator template <typename T> class flexDiagonalOperator : public flexLinearOperator<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> Tdata; #else typedef std::vector<T>...
1d.np.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) #define myabs(x,y) ((x) > (y)? ((x)-(y)) : ((y)-(x))) #define myceil(x,y) (int)ceil(((double)x)/((double)y)) // if x and y are integers, myceil(x,y) = (...
flags.c
#include <stdio.h> int arr[100]; int nt =12; int main() { #pragma omp target teams distribute parallel for num_threads(nt) for (int i=0; i<100;i++) arr[i] =i; //Verify int errors = 0; for (int i=0; i<100;i++){ if(arr[i] != i) errors++; } if(!errors){ fprintf(stderr, "Success\n"); return 0;...
GB_unaryop__lnot_int64_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
dsyrk.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/zsyrk.c, normal z -> d, Fri Sep 28 17:38:03 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
GB_binop__minus_fc64.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_unaryop__ainv_int16_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...
ga.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <mpi.h> #include <omp.h> #include "../include/imagen.h" #include "../include/ga.h" #include "../include/derivados_mpi.h" #define PRINT 1 static int aleatorio(int max) { return (rand() % (max + 1)); } void init...
GB_binop__isge_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-...
convolution_5x5_pack4_bf16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
volumeramsubset.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2013-2019 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
interp2.c
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * interp2.c * * Code generation for function 'interp2' * */ /* Include files */ #include "interp2.h" #includ...
sensitivity_mapper.h
#pragma once #if _OPENMP #include <omp.h> #endif #include "util/random.h" #include "3d/geometry/voxel_set.h" #include "3d/geometry/event_generator.h" namespace PET3D { namespace Hybrid { /// Creates a map of 3D scanner sensitivity template <class ScannerClass> class SensitivityMapper { public: using Scanner = Sc...
syr2k.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...
test3_0.c
/* * test3_0.c and test3_1.c are not equivalent because * they have different private list for the parallel construct. */ #include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid; #pragma omp parallel private(nthreads, tid) { tid = omp_get_thread_n...
GB_unop__tan_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...
par_2s_interp.c
/****************************************************************************** * Copyright (c) 1998 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) ***************************************...
LG_CC_7_Nov29_2021.c
//------------------------------------------------------------------------------ // LG_CC_FastSV6: connected components //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Identifier: BSD-2-Clause //---...
core_ctrsm.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_ztrsm.c, normal z -> c, Fri Sep 28 17:38:20 2018 * **/ #include <plasma_core_blas.h> #include "plas...
omp_flush.c
<ompts:test> <ompts:testdescription>Test which checks the omp flush directive.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp flush</ompts:directive> <ompts:dependences>omp barrier</ompts:dependences> <ompts:testcode> #include <stdio.h> #include <unistd.h> #include "omp_testsuite...
GB_unaryop__ainv_uint8_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
dataset.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_DATASET_H_ #define LIGHTGBM_DATASET_H_ #include <LightGBM/config.h> #include <LightGBM/feature_group.h> #include <LightGBM/meta.h> ...
GB_unop__identity_fc32_uint8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
a.12.1.c
/* { dg-do compile } */ #include <stdio.h> extern float average (float, float, float); void a12 (float *x, float *xold, int n, float tol) { int c, i, toobig; float error, y; c = 0; #pragma omp parallel { do { #pragma omp for private(i) for (i = 1; i < n - 1; ++i) { xold[i] = x[i]; } #prag...
conv_kernel_fp16_arm82.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); ...
GB_binop__le_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_binop__pair_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-...
omptarget.h
//===---- omptarget.h - OpenMP GPU initialization ---------------- CUDA -*-===// // // 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 // //===---------------------------...
GrB_Matrix_exportHint.c
//------------------------------------------------------------------------------ // GrB_Matrix_exportHint: determine sizes of arrays for GrB_Matrix_export //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // ...
mkldnn_quantize_v2-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 ...
DRB003-antidep2-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...
[Gyan]-10_omp_producer_consumer_unbounded.c
#include<stdio.h> #include<stdlib.h> #include<omp.h> struct node { int dat; struct node *next; }; typedef struct node node; int count = 0; int enqueue(node **head, int d); int dequeue(node **head); void disp(node *head); void producer(); void consumer(); int main() { node *head = NULL; int id; ...
binary_tree.c
// The Computer Language Benchmarks Game // https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ // // Contributed by Jeremy Zerfas // Based on the C++ program from Jon Harrop, Alex Mizrahi, and Bruno Coutinho. // *reset* // This controls the width of lines that are output by this program. #define MAXIMUM_LINE...
bug_set_schedule_0.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> #include "omp_testsuite.h" /* Test that the chunk size is set to default (1) when chunk size <= 0 is specified */ int a = 0; int test_set_schedule_0() { int i; a = 0; omp_set_schedule(omp_sched_dynamic,0); #pragma omp parallel { #pr...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #...
GB_binop__rdiv_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-...
ordering_op-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 ...
mandatory_but_no_devices.c
// Check that mandatory offloading causes various offloading directives to fail // when omp_get_num_devices() == 0 even if the requested device is the initial // device. This behavior is proposed for OpenMP 5.2 in OpenMP spec github // issue 2669. // RUN: %libomptarget-compile-nvptx64-nvidia-cuda -DDIR=target // RUN:...
GB_AxB_dot2_compmask.c
//------------------------------------------------------------------------------ // GB_AxB_dot2_compmask: C<!M>=A'*B via dot products //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.c...
int_array.c
/****************************************************************************** * Copyright (c) 1998 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) ***************************************...
cf72ae4_prot.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double sect...
PReLU.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/PReLU.c" #else void THNN_(PReLU_updateOutput)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight) { THTensor_(resizeAs)(output, input); int64_t nOutputPlane = THTensor_(numel)(weight); if (nOutpu...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
contact_utilities.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
openmp.c
#include<stdlib.h> #include<stdio.h> #include<stdbool.h> #include<math.h> #include "omp.h" #define N 21 bool is_prime_optimized(unsigned long long n) { unsigned long long i; if (n % 2 == 0) return n == 2; for (i = 3; i * i <= n; i+=2) { if (n % i == 0) return false; } return n > 1; } bool is_prime(unsi...
smecy.c
//#pragma smecy remap arg(2, in, <some mapping matrix>) void SMECY_remap_int1D_to_int2D(int size_in_0, int in[size_in_0], int size_out_0, int size_out_1, int offset_out_0, int offset_out_1, int window_out_0, int window_out_1, int out[size_out_0][size_out_1]) { #pragma omp parallel for for(int ...
struct-enter-exit-data-1.c
/* Check 'GOMP_MAP_STRUCT' mapping, and in particular that it gets removed from OpenACC 'exit data' directives. */ /* { dg-additional-options "-fdump-tree-gimple" } */ struct str { int a; int *b; int *c; int d; int *e; int f; }; #define N 1024 void test (int *b, int *c, int *e) { struct str s = { ...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #...
solver_cvodes.c
/** * \file * \brief The integration driver for the CVODE solver * * \author Nicholas Curtis * \date 03/10/2015 * */ #include "header.h" #include "solver.h" /* CVODES INCLUDES */ #include "sundials/sundials_types.h" #include "sundials/sundials_math.h" #include "sundials/sundials_nvector.h" #include "nvector/nv...
GB_emult_02.c
//------------------------------------------------------------------------------ // GB_emult_02: C = A.*B where A is sparse/hyper and B is bitmap/full //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unaryop__one_int8_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
omp_nest_testlock.c
#include <stdio.h> #include <omp.h> #include "omp_testsuite.h" int check_omp_nest_testlock (FILE * logFile) { omp_nest_lock_t lck; int nr_threads_in_single = 0; int result = 0; int nr_iterations = 0; int i; omp_init_nest_lock (&lck); #pragma omp parallel shared(lck) { #pragma omp for for (i = 0; i ...
coloring_jones_v4.h
#include "gms/third_party/gapbs/benchmark.h" #include "gms/third_party/gapbs/builder.h" #include "gms/third_party/gapbs/command_line.h" #include "gms/third_party/gapbs/graph.h" #include "coloring_common.h" #include <vector> #include <unordered_map> #include <random> // We need to know the cache line size at compile-t...
bli_axpyv_bgq_int.c
/* BLIS An object-based framework for developing high-performance BLAS-like libraries. Copyright (C) 2014, The University of Texas at Austin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Re...
LinkedCellService.h
// Copyright (C) 2015 Technische Universitaet Muenchen // This file is part of the Mamico project. For conditions of distribution // and use, please see the copyright notice in Mamico's main folder, or at // www5.in.tum.de/mamico #ifndef _MOLECULARDYNAMICS_SERVICES_LINKEDCELLSERVICE_H_ #define _MOLECULARDYNAMICS_SERVIC...
VolumetricAdaptiveAveragePooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/VolumetricAdaptiveAveragePooling.c" #else #define START_IND(a,b,c) (int)floor((float)(a * c) / b) #define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b) // #define START_IND(a,b,c) a * c / b // #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b ...
q_rhashmap_mk_loc.c
#include "q_rhashmap_common.h" #include "q_rhashmap_mk_loc.h" int q_rhashmap_mk_loc( uint32_t *hashes, // input [nkeys] uint32_t nkeys, // input uint32_t hmap_size, // input uint32_t *locs // output [nkeys] ) { int status = 0; int chunk_size = 1024; uint64_t divinfo = fast_div32_init(hma...