source
stringlengths
3
92
c
stringlengths
26
2.25M
tree.h
#ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/meta.h> #include <LightGBM/dataset.h> #ifdef USE_PROTO #include "model.pb.h" #endif // USE_PROTO #include <string> #include <vector> #include <memory> namespace LightGBM { #define kMaxTreeOutput (100) #define kCategoricalMask (1) #define kDefaultL...
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...
GB_binop__rdiv_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-...
7747.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 <...
grid.c
/* Copyright 2014-2015 The Regents of the University of California. * Copyright 2015-2018 Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * 2011, 2015, 2018 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2014 Frank...
GB_binop__pair_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
mlmstream.c
/ Copyright 2009-2015 Sandia Corporation. Under the terms // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2015, Sandia Corporation // All rights reserved. // // This file is part of the SST software package. For license /...
GB_unaryop__abs_bool_int64.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_reduce_to_scalar_template.c
//------------------------------------------------------------------------------ // GB_reduce_to_scalar_template: s=reduce(A), reduce a matrix to a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // ...
data.c
#include "data.h" #include "utils.h" #include "image.h" #include "dark_cuda.h" #include "box.h" #include "http_stream.h" #include <stdio.h> #include <stdlib.h> #include <string.h> extern int check_mistakes; #define NUMCHARS 37 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; list *get_paths(char *filename) { ...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
morph_library2.h
#ifndef MORPH_LIBRARY_H #define MORPH_LIBRARY_H #include "CImgFloatWrapper.h" #include "loewner_declaration.h" #include "conversions.h" #include "morph_color_matrix.h" #include "morph_circle.h" #include "morph_smallest_circle_mask.h" #include "einstein_operations.h" #include "omp.h" #include <stdio.h> #include <stdl...
DRB053-inneronly1-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...
3387.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...
task-taskgroup-nested.c
/* * task-taskgroup-nested.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-exce...
GB_unop__sinh_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
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-...
metadirective_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -triple x86_64-unknown-linux-gnu -x c -std=c99 -ast-print %s -o - | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -triple x86_64-unknown-linux-gnu -x c -std=c99 -ast-print %s -o - | FileCheck %s // expected-no-diagnostics #ifndef HEADER #define HEADER void bar(void); #def...
par_csr_matvec.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...
lightcone-usmesh.c
#include <math.h> #include <string.h> #include <gsl/gsl_integration.h> #include <gsl/gsl_roots.h> #include <gsl/gsl_sf_hyperg.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_math.h> #include <fastpm/libfastpm.h> #include <fastpm/prof.h> #include <fastpm/lightcone.h> #include <fastpm/logging.h> #include <gsl/gsl_linalg...
blake2bp-ref.c
/* BLAKE2 reference source code package - reference C implementations Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at your option. The terms of these licenses can be found at: - CC0 1.0 Universal :...
RCCE_put.c
//*************************************************************************************** // Put data into communication buffer. //*************************************************************************************** // // Author: Rob F. Van der Wijngaart // Intel Corporation // Date: 008/30/2010 // //****...
tgen-openmp.c
#include <math.h> #include "m-array.h" ARRAY_DEF(double, double) int main(void) { const int n = 250000000; const double x = 0.001; M_LET(v, ARRAY_OPLIST(double)) { array_double_resize(v, n); #pragma omp parallel for for (int i = 0; i < array_double_size(v); ++i) { array_double_set_at(v, i, c...
PermutationMMD.h
/* * Copyright (c) The Shogun Machine Learning Toolbox * Written (w) 2012 - 2013 Heiko Strathmann * Written (w) 2014 - 2017 Soumyajit De * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * ...
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) #...
displacement_residual_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
computepi.c
#include <stdio.h> #include <immintrin.h> #include <omp.h> #include "computepi.h" #include "math.h" double compute_pi_baseline(size_t N) { double pi = 0.0; double dt = 1.0 / N; // dt = (b-a)/N, b = 1, a = 0 for (size_t i = 0; i < N; i++) { double x = (double) i / N; // x = ti = a...
fuji_compressed.h
/* * fuji_compressed - Decompress Fujifilm compressed RAF. * Copyright (C) 2016 Alexey Danilchenko * Copyright (C) 2016 Alex Tutubalin * Copyright (C) 2017 Uwe Müssel * * Adopted to dcraw by Masahiro Kitagawa, arctica0316@gmail.com * * This code is free software; you can redistribute it and/or * modify it und...
omp_dotprod_openmp.c
/***************************************************************************** * FILE: omp_dotprod_openmp.c * DESCRIPTION: * This simple program is the OpenMP version of a dot product and the * second of four codes used to show the progression from a serial program to a * hybrid MPI/OpenMP program. The relevant...
DRB050-functionparameter-orig-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
VolumetricMaxUnpooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/VolumetricMaxUnpooling.c" #else static inline void THNN_(VolumetricMaxUnpooling_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, THIndex...
least_squares_omp.h
/* The following struct is optimized for cache efficient parallel calculations using OpenMP making sure there is no strides in adressing memory by scheduling with chunksize 1 */ template < class NormalEquations, template<typename> class WeightingScheme, class OneMillerIndexFcalc> struct accumulate_reflection_chunk...
set_grid_props_and_dt.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* This file contains functions for reading the grid properties as well as setting the time step. */ #include <stdlib.h> #include <s...
Matrix.h
#pragma once #include <memory> #include <cmath> #include <iostream> #include <cassert> #include <algorithm> #include <stdio.h> // printf #include <stdlib.h> // putenv #include <limits> // std::numeric_limits<T>::max() and std::numeric_limits<T>::min(); #include <omp.h> // thread cancellation #include "PRN...
convolution_1x1.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 ...
rose_example2_refactored_OpenMP.c
#include <omp.h> #include <stdio.h> #include <sys/time.h> #define N 30000 int main() { int i; int j; double x[30002UL][30002UL]; double y[30002UL][30002UL]; double tmp[30002UL][30002UL]; double sum = 0; //for timing the code section struct timeval start; struct timeval end; float delta; for (i = 0...
quansimbench-sharemem.c
///////////////////////////////////////////////////////////////////////////// // Quantum Factorization Simulation as a Benchmark for HPC // Shared memory version // Verifies that the area under the peaks of the Quantum Fourier Transform // of delta(2^x mod n,1) is larger than 1/2, where n=p*q is an // integer that...
GB_binop__ne_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
polish.c
/* * Copyright (C) 2018 by Benedict Paten (benedictpaten@gmail.com) * * Released under the MIT license, see LICENSE.txt */ #include <getopt.h> #include <stdio.h> #include <ctype.h> #include <memory.h> #include <hashTableC.h> #include <unistd.h> #include <time.h> #include "marginVersion.h" #include "margin.h" #inc...
Example_teams.6.c
extern void init(float *, float *, int); extern void output(float *, int); void vec_mult(float *p, float *v1, float *v2, int N) { int i; init(v1, v2, N); #pragma omp target teams map(to: v1[0:N], v2[:N]) map(from: p[0:N]) #pragma omp distribute parallel for simd for (i=0; i<N; i++) p[i] = v1[i] * v2...
GB_unaryop__minv_int16_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...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
atomic-17.c
int i, v; float f; void foo () { #pragma omp atomic release, hint (0), update i = i + 1; #pragma omp atomic hint(0)seq_cst i = i + 1; #pragma omp atomic relaxed,update,hint (0) i = i + 1; #pragma omp atomic release i = i + 1; #pragma omp atomic relaxed i = i + 1; #pragma omp atomic acq_rel captur...
GB_unop__identity_int16_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...
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 ...
omp_get_device_num.c
#include <omp.h> #include <stdio.h> int main() { const int num_devices = omp_get_num_devices(); if (num_devices > 0) { for (unsigned i = 0; i < (unsigned)num_devices; i++) { int num; #pragma omp target map(from : num) device(i) num = omp_get_device_num(); if (num != i) { printf("Fa...
HashSet.h
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2010) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
GB_subassign_17.c
//------------------------------------------------------------------------------ // GB_subassign_17: C(I,J)<!M,repl> = scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identi...
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...
GB_binop__eq_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...
Cover.h
/* * Cover.h * * Created on: 03.10.2013 * Author: cls */ #ifndef COVER_H_ #define COVER_H_ #include <cinttypes> #include <set> #include <vector> #include <map> #include <cassert> #include <limits> #include "Partition.h" #include "../Globals.h" namespace NetworKit { /** * @ingroup structures * Implement...
dotp.c
#include <dotp.h> // modify this function double dotp(double* x, double* y) { double global_sum = 0.0; #pragma omp parallel { #pragma omp for for(int i=0; i<ARRAY_SIZE; i++) #pragma omp critical global_sum += x[i] * y[i]; } return global_sum; }
bench.c
#include "omp.h" #include "pmsis.h" #define LOOP_ITER (2048) #define NB_ITER (256) #define NB_BARRIER_ITER (256) #define NB_ITER_SINGLE (128) #define CORE_ID pi_core_id() #define PRINTF(...) //#define PRINTF(...) printf(__VA_ARGS__) static void test_start_timer() { pi_perf_cl_reset(); pi_perf_conf(1<<PI_PER...
pr39591-3.c
/* PR other/39591 */ /* { dg-do run } */ extern void abort (void); int err, a[40]; void __attribute__((noinline)) foo (int *array) { #pragma omp task { int j; for (j = 0; j < sizeof array / sizeof array[0]; j++) if (array[j] != 0x55555555) #pragma omp atomic err++; } } int main (void) { int k; ...
dbj_matmul_omp.h
#ifndef DBJ_MATMUL_OPEN_MP #define DBJ_MATMUL_OPEN_MP /* (c) 2021 by dbj at dbj dot org -- https://dbj.org/license_dbj */ #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> ///////////////////////////////////////////////////////////////////////////////// ...
for-19.c
/* Verify that if GOMP_parallel_loop_dynamic_start is used, variables mentioned in the INIT, COND and INCR expressions aren't unnecessarily copied to the omp_fn function. */ /* { dg-do compile } */ /* { dg-options "-O -fopenmp -fdump-tree-gimple" } */ void foo (int *a, int i, int j, int k, int l, int m) { #prag...
tti_prot_so4.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...
activation.h
// Copyright 2018 The MACE 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 appl...
ParallelJobsOpenMP.h
/* * Copyright (C) 2011 University of Szeged * Copyright (C) 2011 Gabor Loki <loki@webkit.org> * 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 re...
FTSparseGrid3D.h
/* SGCT-Based-Fault-Tolerant-3D-SFI Code source file. Copyright (c) 2015, Md Mohsin Ali. All rights reserved. Licensed under the terms of the BSD License as described in the LICENSE_FT_CODE file. This comment must be retained in any redistributions of this source file. */ // 3D (x,y,z) sparse grid data struc...
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 // //===---------------------------...
teams-3.c
/* { dg-do run } */ #include <stdlib.h> #define EPS 0.0001 #define N 1024*1024 void init (float B[], float C[], int n) { int i; for (i = 0; i < n; i++) { B[i] = 0.1 * i; C[i] = 0.01 * i * i; } } float dotprod_ref (float B[], float C[], int n) { int i; float sum = 0.0; for (i = 0; i < ...
metadirective_device_kind_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp -x c -triple aarch64-unknown-linux -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp -x c -triple ppc64le-unknown-linux -emit-llvm %s -o - | FileCheck %s // exp...
tinyexr.h
/* Copyright (c) 2014 - 2016, Syoyo Fujita 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 conditions and t...
set_value_x_coo.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(ALPHA_SPMAT_COO *A, const ALPHA_INT row, const ALPHA_INT col, const ALPHA_Number value) { ALPHA_INT num_thread = alpha_get_thread_num(); ALPHA_INT f...
GB_binop__islt_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-...
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...
perftest.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #...
GxB_BinaryOp_ytype.c
//------------------------------------------------------------------------------ // GxB_BinaryOp_ytype: return the type of y for z=f(x,y) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Iden...
GB_unop__atanh_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
convolution_winograd_transform_pack4_fp16s.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 ...
sigmoid_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...
pzgbbrd_static.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_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "plasma_types.h" #in...
special_ops.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
prime.c
#include<stdio.h> #include<stdlib.h> #include<omp.h> int main(int argc,char *argv[]){ int index; int i; int count; int first; int n; int N; int prime; char *marked; double start, delta; omp_set_num_threads(1); if(argc!=2){ printf("Command line: %s <m>\n",argv[0]); exit(1); } n = atoi(argv[1]); N = n+...
reduction.h
// Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. #ifndef __DACE_REDUCTION_H #define __DACE_REDUCTION_H #include <cstdint> #include "types.h" #include "math.h" // for ::min, ::max #ifdef __CUDACC__ #include "../../../external/cub/cub/device/device_segmented_reduce.cuh" #include "....
DRB047-doallchar-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...
convolution_5x5.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 ...
GB_binop__plus_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...
omp_threadprivate_for.c
<ompts:test> <ompts:testdescription>Test which checks if a variable declared as threadprivate can be used as a loopindex.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp threadprivate</ompts:directive> <ompts:dependences>omp critical</ompts:dependences> <ompts:testcode> #include "o...
GB_binop__islt_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
generator_spgemm_csc_bsparse.c
/****************************************************************************** ** Copyright (c) 2015-2018, Intel Corporation ** ** All rights reserved. ** ** ** ...
field_summary_kernel_c.c
/*Crown Copyright 2012 AWE. * * This file is part of CloverLeaf. * * CloverLeaf 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 option) * any later version. * * Clo...
jacobi_omp.c
/* * Copyright (c) 2008, BSC (Barcelon Supercomputing Center) * 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,...
gravity.h
#pragma once #include "cutfunc.h" template <class Tpsys> void velKick(Tpsys & pp){ const PS::S32 n = pp.getNumberOfParticleLocal(); #pragma omp parallel for for(PS::S32 i=0; i<n; i++){ pp[i].velKick(); } } #ifdef CORRECT_NEIGHBOR template <class Tpsys> void velKick2nd(Tpsys & pp){ const PS::...
KKSdiluteBinaryConcSolver.h
#ifndef included_KKSdiluteBinaryConcSolver #define included_KKSdiluteBinaryConcSolver #include "NewtonSolver.h" #include "datatypes.h" namespace Thermo4PFM { class KKSdiluteBinaryConcSolver : public NewtonSolver<2, KKSdiluteBinaryConcSolver, JacobianDataType> { public: #ifdef HAVE_OPENMP_OFFLOAD #pragma omp decl...
Fig_10.6_taskDep.c
// sample compile command: "gcc -fopenmp -c Fig_10.6_taskDep.c" to generate *.o object file #include <omp.h> // functions Awork through Ework not shown int main() { float A, B, C, D, E; #pragma omp parallel shared(A, B, C, D, E) { #pragma omp single { #pragma omp task depend(out:A) ...
bf.h
/* The MIT License (MIT) Copyright (c) 2015 Konstantinos Krestenitis 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, c...
9417.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...
zgeqrf.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 ...
MS_OpenMP_static.c
/* * ompd Mandelbort sort * */ #include <X11/Xlib.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> typedef struct complexType { double real, imag; } Compl; int main(int argc, char *argv[]) { // ----------input--------------- int number_thread = atoi(argv[1]); double leftR = atof(argv[2]); ...
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...
trilinos_block_builder_and_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_TRILINOS_BL...
dynamic.c
#include <stdio.h> #include <omp.h> int main() { omp_set_dynamic(9); omp_set_num_threads(4); printf("%d\n", omp_get_dynamic( )); #pragma omp parallel #pragma omp master { printf("%d\n", omp_get_dynamic( )); } }
GB_binop__bget_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...
laplace.h
#ifndef laplace_h #define laplace_h #include "exafmm.h" namespace exafmm { inline int oddOrEven(int n) { return (((n) & 1) == 1) ? -1 : 1; } inline int ipow2n(int n) { return (n >= 0) ? 1 : oddOrEven(n); } void cart2sph(const vec3 & dX, real_t & r, real_t & theta, real_t & phi) { r = sqrt(norm(...
vector.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) **************************************...
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...
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...