source
stringlengths
3
92
c
stringlengths
26
2.25M
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
GB_binop__gt_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
ex1.c
#include <stdio.h> #include <assert.h> #include <omp.h> /* calculting the value of PI using the following appr intergal(4/(1+x^2)) = PI using of cours openmp */ int main(int argc,char* argv[]){ int num_steps = 100000000,gsize; double step = 1.0 /((double)num_steps),sum = 0, start = omp_get_wtime(); #pragma om...
nvptx_target_printf_codegen.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ // Test target codegen - host bc file has to be cr...
fft2.c
#include "libraries.h" #define N 1048576 #define N2 N/2 int main(int argc, char *argv[]) { /* Generic version of cfft2 - no intrinsics W. Petersen, SAM. Math. ETHZ 1 June, 2002 */ int first,i,icase,it,ln2,n; int nits=10000; float error,fnm1,sign,z0,z1,ggl(); float *x,*y,*z,*w; static float seed; d...
gemm.c
#include "gemm.h" #include "utils.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include "Enclave_u.h" #include "sgx_err.h" #include "sys/sysinfo.h" int num_cpu; #ifdef OPENMP #include <omp.h> #endif typedef struct gemm_thread_data { int TA, TB, M, N, K; float ALPHA; ...
my_functions.h
#ifndef _MY_FUNCTIONS #define _MY_FUNCTIONS #endif #ifndef PI #define PI 3.14159265358979323846 #endif // New transpose function that deals with cache miss problem // Exact implementation is modified from // http://stackoverflow.com/questions/5200338/a-cache-efficient-matrix-transpose-program void transpose_cache(dou...
Rcf_5_cython_openmp.c
/* Generated by Cython 0.29.22 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython...
rar_common.c
/* * This software is Copyright (c) 2011, Dhiru Kholia <dhiru.kholia at gmail.com> * and Copyright (c) 2012, 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. */ #include "misc.h"...
gravity_hard.h
#pragma once #define CALCFORCEFROMALLMEMBERS #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 velKick...
gather_nd_op_cpu_impl.h
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
gather_double_avx2.c
// create a list of 64 numbers, and only sum the even ones #include <stdio.h> #include <stdlib.h> #define N 32000 int main() { srand(time(NULL)); double *numbers = malloc(sizeof(double)*N); int *mask = malloc(sizeof(int)*N); // Init the numbers for (int i = 0; i<N; i++) numbers[i] = rand() % ...
sp.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - SP This benchmark is an OpenMP C version of the NPB SP code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
GB_binop__div_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-...
mkldnn_graph.h
// Copyright (C) 2018-2019 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <map> #include <string> #include <vector> #include <memory> #include <cpp_interfaces/impl/ie_executable_network_thread_safe_default.hpp> #include "ie_parallel.hpp" #include "mkldnn_memory.h" #include "config....
permute.c
/** * @file permute.c * @brief Functions for re-ordering a matrix * @author Dominique LaSalle <lasalle@cs.umn.edu> * Copyright 2014 * @version 1 * @date 2014-06-05 */ #ifndef GOOSEBERRY_PERMUTE_C #define GOOSEBERRY_PERMUTE_C #include "permute.h" /*******************************************************...
algs.h
#include <unistd.h> #include <chrono> #include <future> #include <thread> enum class Algorithm { CXX, OPENMP, SERIAL, }; class RecursiveFibonacciAlgorithm { protected: Algorithm algorithm_; // algorithm to use public: virtual ~RecursiveFibonacciAlgorithm() = default; virtual long long int compute_fib...
DRB099-targetparallelfor2-orig-no.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...
matrix.c
// // Created by Ayaz BADOURALY // #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef WITH_LIBPNG #include <png.h> #endif #include "file.h" #include "matrix.h" struct COO_Matrix construct_coo_matrix ( const int nnz ) { struct COO_Matrix mtx; mtx.nnz = nnz; mtx.rows = malloc(...
core_cpotrf.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_zpotrf.c, normal z -> c, Fri Sep 28 17:38:23 2018 * **/ #include <plasma_core_blas.h> #include "pla...
sgesv.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/zgesv.c, normal z -> s, Fri Sep 28 17:38:05 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
c_vbgmm_fit.c
/* C functions for running vbgmm from Cython*/ /*System includes*/ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <string.h> #include <sys/stat.h> #include <float.h> /*GSL includes*/ #include <gsl/gsl_vector.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #inclu...
dft_omp.c
#include "dft.h" #include <omp.h> void dft(complex_t* __restrict__ in, complex_t* __restrict__ out, const int_t len) { const real_t c = 2 * (real_t)M_PI / len; #pragma omp parallel for simd default(none) shared(in, out) for(int_t k = 0; k < len; ++k) { real_t rr = (real_t) 0.0; real_t ii =...
GB_unop__cosh_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
ast-dump-openmp-target-teams-distribute.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 target teams distribute for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target teams distribute for...
GB_binop__minus_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unaryop__identity_int8_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__lt_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
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...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
serial_tree_learner.h
#ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/tree_learner.h> #include <LightGBM/utils/random.h> #include <LightGBM/utils/array_args.h> #include <LightGBM/dataset.h> #include <LightGBM/tree.h> #include <LightGBM/feature_histogram.h> #includ...
LAGraph_BF_full1a.c
//------------------------------------------------------------------------------ // LAGraph_BF_full1a.c: Bellman-Ford single-source shortest paths, returns tree, // while diagonal of input matrix A needs not to be explicit 0 //------------------------------------------------------------------------------ // LAGraph, (...
GB_unaryop__ainv_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__first_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
RCCE_admin.c
//*************************************************************************************** // Administrative routines. //*************************************************************************************** // // Author: Rob F. Van der Wijngaart // Intel Corporation // Date: 008/30/2010 // //***************...
H2ERI_matvec.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <omp.h> #include "H2Pack_matvec.h" #include "H2Pack_utils.h" #include "H2ERI_typedef.h" #include "H2ERI_matvec.h" #include "H2ERI_utils.h" #include "utils.h" // In H2Pack // Perform bi-matvec for a B or D block blk...
GB_unop__lnot_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
omp_bug2.c
/****************************************************************************** * FILE: omp_bug2.c * DESCRIPTION: * Another OpenMP program with a bug. * AUTHOR: Blaise Barney * LAST REVISED: 04/06/05 ******************************************************************************/ #include <omp.h> #include <stdio.h>...
convolutiondepthwise_3x3_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 ...
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) >...
convolution_sgemm_packnto1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
util_test.c
/* * This file is part of ABCDK. * * MIT License * */ #include <stdio.h> #include <assert.h> #include <unistd.h> #include <string.h> #include <linux/serial.h> #include "util/general.h" #include "util/getargs.h" #include "util/geometry.h" #include "util/ffmpeg.h" #include "util/bmp.h" #include "util/freeimage.h" ...
TSDFVoxelGridImpl.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
8.norace9.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 200 int main() { double A[N], C[N], sum0 = 0.0; #pragma omp parallel for ordered for (int i = 0; i < N; i++) { #pragma omp ordered sum0 += A[i] * C[i]; } } // CHECK: Region Not Analyzed by the verifier. // END
special_ops.h
#pragma once #include <ops/ops.h> #include <loops/reduce.h> #include <loops/scalar.h> #include <loops/indexreduce.h> #include <loops/broadcasting.h> namespace functions { namespace broadcast { template <typename T> class Broadcast; } namespace transform { template <typename T> class Transform; } namespa...
GB_memcpy.c
//------------------------------------------------------------------------------ // GB_memcpy: parallel memcpy //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 //-----...
tinyexr.h
/* Copyright (c) 2014 - 2015, 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...
extract_image_patches.h
/* Copyright 2018 The Blueoil Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
seriesSumWithTaskWait.c
#include <stdio.h> #include <omp.h> int series(int n) { int s1, s2; if (n < 0) return 1; else if (n == 1 || n == 2) return n; else { #pragma omp task shared(s1) s1 = series(n - 1); #pragma omp task shared(s2) s2 = series(n - 2); #pragma omp tas...
optimized_rsa.c
#include "optimized_rsa.h" //modulus uint160_t * M; //private uint160_t * D; //public uint160_t * E; //used to count bitlength for Montgomery Modular Multiplication uint16_t count_num_bits(uint160_t* value){ uint16_t count = 0; int i = 159; for (; i >= 0; i--) { uint8_t bit = get_bit(value, i); ...
GB_unaryop__identity_bool_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...
last_private.c
#include <stdio.h> #include <omp.h> int main() { int i = 1; #pragma omp parallel for lastprivate(i) for(i=0; i<10; i++) { i = i + 1; printf("%d\n", i); } printf("\n\n"); #pragma omp parallel { printf("%d\n", i); // Value of i is 10 } }
convolution_pack1to4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
ast-dump-openmp-parallel.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() { #pragma omp parallel ; } // CHECK: TranslationUnitDecl 0x{{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl 0x{{.*}} <{{.*}}ast-dump-openmp...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__sin_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...
fc_compute.h
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
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...
2.hello_private.c
#include <stdio.h> #include <omp.h> /* If the OMP_NUM_THREADS variable is set to 8 with */ /* export OMP_NUM_THREADS=8 */ /* Q1: Is the execution of the program correct? Add a */ /* data sharing clause to make it correct */ /* Q2: Are the lines always printed in the same...
arraytools.h
/** \file arraytools.h \brief Contains the array_link class and related classes. This file contains method and classes to work with (orthogonal) arrays. Author: Pieter Eendebak <pieter.eendebak@gmail.com> Copyright: See LICENSE.txt file that comes with this distribution */ #pragma once #ifdef WIN32 #define _CRT_SE...
main.c
#include <stdio.h> #include <omp.h> int main() { int nthreads = 0; int tid = 0; /* Fork a team of threads with each thread having a private tid variable */ #pragma omp parallel private(tid) { /* Obtain and print thread id */ tid = omp_get_thread_num(); printf("Hello World from thread = %d\n", tid); /*...
operators.h
/* Project Name : OpenMEEG © INRIA and ENPC (contributors: Geoffray ADDE, Maureen CLERC, Alexandre GRAMFORT, Renaud KERIVEN, Jan KYBIC, Perrine LANDREAU, Théodore PAPADOPOULO, Emmanuel OLIVI Maureen.Clerc.AT.inria.fr, keriven.AT.certis.enpc.fr, kybic.AT.fel.cvut.cz, papadop.AT.inria.fr) The OpenMEEG software is a C++...
eur.c
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <assert.h> #include <time.h> #define MYMAX(x,y) ((x > y) ? x : y) void eur() { double sig2 = 0.04; double E = 10; double r = 0.05; double T = 1.0; double b = 30.0; int nt = 599; double dt = (T / (double)(nt+1)); int ...
conv3x3s2_pack4_neon.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 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_unop__identity_int64_uint16.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...
opi.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> int main(int argc, char **argv) { //seed random number generator // Q2b: get the number of threads to run with from agrv and // add OpenMP API code to set number of threads here int threads = atoi(argv[1]); omp_set_num_threads(threads)...
3D.c
#include <stdio.h> #include <time.h> #include <assert.h> #include <stdlib.h> #include <math.h> #include <sys/time.h> #include <string.h> #define STR_SIZE (256) #define MAX_PD (3.0e6) /* required precision in degrees */ #define PRECISION 0.001 #define SPEC_HEAT_SI 1.75e6 #define K_SI 100 /* capacitance fitting factor ...
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) #...
fox_floats_timer_caching_omp_fileIO_benchmark.c
/* fox_floats_timer_caching_omp_fileIO_benchmark.c -- uses Fox's algorithm to multiply two square matrices * * Implementation of parallel matrix multiplication: * LaTeX: $C_{i,j} = \sum_{k} A_{i,k}B_{k,j}$ * * Input: * Input Matrix file name: A.dat, B.dat * * Output: * Output Matrix file name: C.dat...
blake2bp.c
/* BLAKE2 reference source code package - optimized 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 :...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
core_zlag2c.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions mixed zc -> ds * **/ #include <plasma_core_blas.h> #include "core_lapack.h" #include "plasma_types.h" /***************************************************************...
gen_fffc.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) ***************************************...
spmm_x_csr.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_SPMAT_CSR *A, const ALPHA_SPMAT_CSR *B, ALPHA_SPMAT_CSR **matC) { check_return(B->cols != A->rows, ALPHA_SPARSE_STATUS_INVALI...
GB_unop__identity_bool_int16.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...
par_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) **************************************...
GB_binop__bxnor_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
delete_inf_refcount.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 #include <stdio.h> #include <omp.h> #pragma om...
graph.c
/*! * \file * * \brief Various routines with dealing with sparse graphs * * \author George Karypis * \version\verbatim $Id: graph.c 15329 2013-10-07 04:20:58Z karypis $ \endverbatim */ #include <GKlib.h> #define OMPMINOPS 50000 /*************************************************************************...
omp_firstprivate.c
// note not doing O0 below as to ensure we get tbaa // TODO: if [ %llvmver -ge 9 ]; then %clang -fopenmp -std=c11 -O1 -fno-vectorize -fno-unroll-loops -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out; fi // RUN: if [ %llvmver -ge 9 ]; then %clang...
timer.h
// vim: set ts=2 sw=2 expandtab: #ifndef INCLUDED_TIMER_H #define INCLUDED_TIMER_H #include <vector> #include <string> #include <algorithm> #ifdef USE_PAPI #include <papi.h> #endif #include <util/omp_wrapper.h> #include <util/time_cps.h> #include <util/verbose.h> CPS_START_NAMESPACE inline double& getStartTime() {...
covariance.c
/** * covariance.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@stude...
party.h
// // Created by liqinbin on 10/13/20. // #ifndef FEDTREE_PARTY_H #define FEDTREE_PARTY_H #include "FedTree/dataset.h" #include "FedTree/Tree/tree_builder.h" //#include "FedTree/Encryption/HE.h" #include "FedTree/DP/noises.h" #include "FLparam.h" #include "FedTree/booster.h" #include "FedTree/Tree/gbdt.h" #include <a...
470.lbm.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <stdlib.h> #include <sys/stat.h> #include <math.h> /* $Id: main.c,v 1.4 2004/04/21 04:23:43 pohlt Exp $ */ /*############################################################################*/ /* $Id: main.h,v 1.4 2004/04/21 04:23:43 pohlt Exp $ */ /*...
Example1.c
//#include <stdio.h> //#include <omp.h> //#include <conio.h> // //int main(int argc, char *argv[]) //{ // int tid,tsize; // tid = omp_get_thread_num(); // printf("Thread Number = %d \n", tid); // tsize = omp_get_num_threads(); // printf("Number of Threads = %d \n", tsize); // omp_set_num_threads(8); // //#...
convolution_winograd_transform_packn.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 ...
multisort-omp-dependencies.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...
DRB112-linear-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...
objdetect_prv.c
#include "objdetect_prv.h" float overlap ( float x1, float w1, float x2, float w2 ) { float l1 = x1 - w1/2; float l2 = x2 - w2/2; float left = l1 > l2 ? l1 : l2; float r1 = x1 + w1/2; float r2 = x2 + w2/2; float right = r1 < r2 ? r1 : r2; return right - left; } floa...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "omp.h" #include "functions.h" int main (int argc, char **argv) { int Nthreads = 1; omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will make your program run...
nevpt_contract.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...
main.c
// // main.c // omp_sections // // Created by Vicente Cubells Nonell on 06/11/14. // Copyright (c) 2014 Vicente Cubells Nonell. All rights reserved. // #include <stdio.h> #include <omp.h> #define N 100000 int main(int argc, const char * argv[]) { int suma[N], resta[N], A[N], B[N]; int i; om...
GB_binop__bor_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-...
par_mod_lr_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
GB_binop__bclr_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
simd4.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ /* { dg-additional-options "-std=c99" { target c } } */ struct S *p; /* { dg-message "forward declaration" "" { target c++ } } */ float f; int j; void foo (void) { #pragma omp simd linear(p) linear(f : 1) /* { dg-error "linear clause applied to" "" { target *-...
ex_particle_OPENMP_seq.balance.c
#include "hclib.h" int ____num_tasks[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /** * @file ex_particle_OPENMP_seq.c * @author Michael Trotter & Matt Goodrum * @brief Particle filter implementation in C/OpenMP */ #include <stdlib.h> #include <std...
particleswarmoptimization.h
#ifndef PARTICLESWARMOPTIMIZATION_H #define PARTICLESWARMOPTIMIZATION_H #include "../entities/problem.h" #include "globalsolver.h" #include <iostream> #include <memory> template <class T> class ParticleSwarmOptimization : public GlobalSolver<T> { public: ParticleSwarmOptimization(int numberOfParticles, double c1,...
GB_unop__identity_int8_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__bset_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-...