source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_binop__first_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-...
GB_binop__rdiv_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-...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
ca_obj_mapping.c
/* --------------------------------------------------------------------------- ca_obj_mapping.c This file is part of Ruby/CArray extension library. Copyright (C) 2005-2020 Hiroki Motoyoshi ---------------------------------------------------------------------------- */ /* CAMapping * index array should no...
GB_unaryop__ainv_uint16_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...
convolution_winograd_dot_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 ...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__plus_int32.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_subassign_05.c
//------------------------------------------------------------------------------ // GB_subassign_05: C(I,J)<M> = scalar ; no S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See...
normal.c
/* ============================================================================= * * normal.c * -- Implementation of normal k-means clustering algorithm * * ============================================================================= * * Author: * * Wei-keng Liao * ECE Department, Northwestern University * ...
GB_unop__identity_fp64_uint64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_unaryop__minv_fp32_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...
MorseSmaleComplex3D.h
/// \ingroup base /// \class ttk::MorseSmaleComplex3D:: /// \author Guillaume Favelier <guillaume.favelier@lip6.fr> /// \author Julien Tierny <julien.tierny@lip6.fr> /// \date February 2017. /// /// \brief TTK %morseSmaleComplex3D processing package. /// /// %MorseSmaleComplex3D is a TTK processing package that takes a...
hugepages.c
#include "sicm_low.h" #include "sicmimpl.h" #include <stdio.h> #include <time.h> #include <sys/mman.h> #ifndef MAP_HUGE_SHIFT #include <linux/mman.h> #endif // 20 MiB #define SZ 20971520 int main() { struct sicm_device_list devices = sicm_init(); unsigned int start, end; unsigned int i; printf("%d\n", MAP_HU...
intra_pred.c
#include <float.h> #include <omp.h> #include <stdlib.h> #include <sys/timeb.h> #include "cholesky.h" #include "od_defs.h" #include "od_covmat.h" #include "od_filter.h" #include "od_intra.h" #include "image_tools.h" #include "stats_tools.h" #include "svd.h" #define USE_SVD (0) #define BITS_SELECT (0) #define USE_WE...
net_ah_fmt_plug.c
/* Cracker for IPsec Authentication Header (AH) hashes. * * This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted...
imm.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
fibonacci.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #ifndef SIZE_F #define SIZE_F 2000 #endif void main(int argc, char **argv) { int F[SIZE_F]; double inicio, fim, duracao; const int T = atoi(argv[1]); int i, j; int sum; F[0] = 1; F[1] = 1; sum = 0; inicio = omp_get_wtime()...
ops.c
#include <stdio.h> #include <stdlib.h> #include <string.h> /* #include "cuda_runtime_api.h" #include "cuda.h" #include "cublas_v2.h" */ #include "ops.h" #define SWAP(a,b) {float temp=0;temp=a;a=b;b=temp;} /*-----------general matrix summation-------*/ float gems(float *a, size_t size){ int i; float sum = 0; ...
GB_binop__lt_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-...
cart2sph.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "compearth.h" /*! * @brief Converts (x,y,z) to spherical coordiantes (r,theta,phi) * * @param[in] n Number of points in arrays. * @param[in] x x cartesian ordinates. This is an array of dimension [n]. * @param[in] y ...
heat-2d.omp.c
/* * Discretized 2D heat equation stencil with non periodic boundary conditions * Adapted from Pochoir test bench * * Irshad Pananilath: irshad@csa.iisc.ernet.in */ #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> /* * N is the number of points * T is the numbe...
x_solve.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB BT code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
tammes_calc.c
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #ifndef M_PI # define M_PI 3.141592653589793 #endif #define GA 2.39996322972865332 int frame = 0; int asymmetric = 1; int N; double minD = 0; double bestMinD = 0; typedef struct { double x,y,z; } v...
SwathFileConsumer.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
THSTensorMath.c
#ifndef THS_GENERIC_FILE #define THS_GENERIC_FILE "generic/THSTensorMath.c" #else #define ROW_PTR2(t, r) (THTensor_(data)(t) + (r) * (t)->stride[0]) #define COL_PTR2(t, c) (THTensor_(data)(t) + (c) * (t)->stride[1]) void THSTensor_(zero)(THSTensor *self) { if (self->indices->nDimension) { THLongTensor_resizeNd(...
utils.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 ...
scalar.h
/* * scalar.h * * Created on: Dec 28, 2015 * Author: agibsonccc */ #ifndef SCALAR_H_ #define SCALAR_H_ #include <dll.h> #ifdef __JNI__ #include <jni.h> #endif #include <op.h> #include <templatemath.h> #ifdef __CUDACC__ #include <cuda.h> #include <cuda_runtime.h> #endif namespace functions { namespace s...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
GB_unop__identity_uint32_uint8.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...
ttaskloop.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ long result=0; void foo() { #pragma omp parallel #pragma omp single { int argum = 0; #pragma omp task shared(result) firstprivate(argum) for (long i = 0; i < 10; i++) { #pragma omp atomic result++; } argum++; ...
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...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
interpolate_v2_op.h
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. 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...
rose_inner_only.c
/* Only the inner loop can be parallelized */ #include <omp.h> void foo() { int n = 100; int m = 100; double b[n][m]; int i; int j; for (i = 0; i <= n - 1; i += 1) { #pragma omp parallel for private (j) for (j = 0; j <= m - 1; j += 1) { b[i][j] = b[i - 1][j - 1]; } } }
table.h
#ifndef batoid_table_h #define batoid_table_h #include <cstdlib> // for size_t namespace batoid { #if defined(BATOID_GPU) #pragma omp declare target #endif class Table { public: Table( double x0, double y0, double dx, double dy, const double* z, const double*...
convolution_pack4to1.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 ...
AtomicUF.h
/// \ingroup base /// \class ttk::AtomicUF /// \author Charles Gueunet <charles.gueunet@lip6.fr> /// \date June 2016. /// ///\brief TTK processing package that efficiently computes the contour tree of /// scalar data and more (data segmentation, topological simplification, /// persistence diagrams, persistence curves, ...
core_zgelqt.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <omp.h> /********************...
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) ...
GB_unop__round_fp32_fp32.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_unaryop__lnot_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__first_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-...
smallscaling.c
// run with OPENBLAS_NUM_THREADS=1 and OMP_NUM_THREADS=n #include <math.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <cblas.h> #include <omp.h> #include <pthread.h> #define MIN_SIZE 5 #define MAX_SIZE 60 #define NB_SIZE 10 // number of loop for a 1x1 matrix. Lower it if the test is // too slow ...
idaFoodWeb_kry_omp.c
/* * ----------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2020, Lawrence Livermore National Security * and Southern Methodist Univ...
heap_mult.h
#include "CSC.h" #include "utility.h" #include <omp.h> #include <algorithm> /** ** Count flop of SpGEMM between A and B in CSC format **/ template <typename IT, typename NT> long long int get_flop(const CSC<IT,NT> & A, const CSC<IT,NT> & B, IT *maxnnzc) { long long int flop = 0; // total flop (multiplication) ne...
convert_gebsr_x_coo.c
#include <alphasparse/opt.h> #include <alphasparse/util.h> #include <memory.h> #include <stdlib.h> #include "alphasparse/format.h" #include "alphasparse/util/bitmap.h" #include <stdio.h> typedef struct { ALPHA_INT row_idx; ALPHA_INT col_idx; ALPHA_Number value; } coord_t; #define ROWS_PER_ROUND (4) #define NNZ...
zsyrk.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 ...
GB_unop__ainv_int64_int64.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...
14.c
/* Написать параллельную программу возведения числа 210 в квадрат без операции умножения. Пояснение: Квадрат натурального числа N равен сумме первых N нечетных чисел. Например, 32 = 9 это 1+3+5=9; 52 = 25 это 1+3+5+7+9=25; */ #include <stdio.h> #include <omp.h> int main(int argc, char *argv[]) { int number = 210;...
doacross-3.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (void) { int i, j; #pragma omp for ordered (1) for (i = 0; i < 64; i++) { #pragma omp ordered depend (sink: i + 1) /* { dg-warning "'depend' clause with 'sink' modifier waiting for lexically later iteration" } */ #pragma omp ordered...
dyn_bfs.h
#ifndef DYN_BFS_H_ #define DYN_BFS_H_ #include <algorithm> #include "traversal.h" #include "../common/timer.h" #include "sliding_queue_dynamic.h" #include "../common/pvector.h" #include <fstream> extern std::ofstream algF; /* Algorithm: Incremental BFS and BFS starting from scratch */ template<typen...
Clique.h
// This code is part of the project "Theoretically Efficient Parallel Graph // Algorithms Can Be Fast and Scalable", presented at Symposium on Parallelism // in Algorithms and Architectures, 2018. // Copyright (c) 2018 Laxman Dhulipala, Guy Blelloch, and Julian Shun // // Permission is hereby granted, free of charge, t...
DRB030-truedep1-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
debug_threadprivate_copyin.c
// This testcase checks emission of debug info for threadprivate variables // present in any clause of OpenMP construct. // REQUIRES: x86_64-linux // RUN: %clang_cc1 -debug-info-kind=constructor -x c -verify -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics // CHECK: d...
13.c
#include <stdio.h> #include <unistd.h> #include <omp.h> int main() { int counter = 0; omp_set_num_threads(4); #pragma omp parallel { counter = 1; #pragma omp master sleep(9); #pragma omp barrier printf("%d\n", counter); } return 0; }
GB_unaryop__lnot_uint32_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...
tinyexr.h
/* Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this l...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ex05.c
/* Copyright (c) 2019 CSC Training */ /* Copyright (c) 2021 ENCCS */ #include <stdio.h> #include <math.h> #define NX 102400 int main(void) { double vecA[NX],vecB[NX],vecC[NX]; double r=0.2; /* Initialization of vectors */ for (int i = 0; i < NX; i++) { vecA[i] = pow(r, i); vecB[i] = 1.0; } /* dot p...
GB_binop__eq_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
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...
cryptsha256_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * based on rawSHA256_fmt.c code and Drepper's spec at * http://www.akkadia.org/drepper/SHA-crypt.txt * * This software is Copyright (c) 2012 magnum, and it is hereby released to the * general public under the following terms: Redistribution and use in ...
chemio.c
//////////////////////////////////////////////////////////// #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include <float.h> #include <omp.h> #include <limits.h> #include "types.h" #include "util.h" #include "vector.h" #include "voxelizer.h" #include "chemio.h" //...
wino_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...
fc_kernel_int8_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...
noatomic.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> main() { float *x,*y,*work1,*work2; int *index; int n,i; n=1000; x=(float*)malloc(n*sizeof(float)); y=(float*)malloc(n*sizeof(float)); work1=(float*)malloc(n*sizeof(float)); work2=(float*)malloc(n*sizeof(float)); ind...
nested_lwt.c
// RUN: %libomp-compile-and-run | FileCheck %s // RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s // REQUIRES: ompt #include "callback.h" #include <omp.h> #include <unistd.h> int main() { omp_set_nested(1); #pragma omp parallel num_threads(4) { print_ids(0); print_ids...
hmacMD5_fmt_plug.c
/* * This software is Copyright (c) 2010 bartavelle, <bartavelle at bandecon.com> * and (c) magnum 2011-2013, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. */ #if FMT_EXTERNS_H exter...
12_matrix_row_wise_avg.c
/* Program : 12 Author : Soumili Topic : Write a C program using OpenMP features to find the column wise average of a matrix in linear time complexity. */ #include<stdio.h> #include<omp.h> int main() { int i,j,k,m,sum,avgc; int A[3][3]={1,2,3, 4,5,6, 7,8,9}; omp_s...
GB_binop__land_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...
pr61200.c
/* PR libgomp/61200 */ int main () { int var = 1; #pragma omp parallel if (var != 1) __builtin_abort (); #pragma omp task shared(var) var = 2; return 0; }
target_teams_distribute_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}} #pragma omp target teams distribute simd // expected-error@+1 {{unexpected Ope...
rose_slowInput_47.c
#include <omp.h> typedef double real8; /************************************************************************ * Function : StressZero * * Purpose : ************************************************************************/ void StressZero(real8 *newSxx,real8 *newSyy,real8 *newSzz,real8 *newTxy,real8 *newTx...
maxwell_zeroBC.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) ***************************************...
pooling_3x3_pack4_bf16s.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 ...
renumber.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> #include "HiParTI.h" #include "sptensor.h" #include "renumber.h" /*Interface to everything in this file is orderit(.., ..)*/ /*function declarations*/ static void ptiLexiOrderPerMode(ptiSparseTensor * tsr, ptiIndex mode, ptiIndex ** orgId...
7_nXn_matrix_mul.c
/* Program : 7 Author : Debottam Topic : Write a C program using OpenMP features to find the product of two nxn matrices. The program should then find the sum of all the elements of the product matrix. */ #include <stdio.h> #include <omp.h> #define N 3 int A[3][3]; int B[3][3]; int C[3][3]; int main() ...
mxnet_op.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
j3d7pt.gold.h
#include <cstring> using std::memcpy; template <class T> void jacobi_gold(T *fout, const T *fin, double h2inv, double a, double b, int L, int M, int N) { double (*out)[M][N] = (double (*)[M][N]) fout; double (*in)[M][N] = (double (*)[M][N]) fin; auto ftemp1 = new T[L * M * N]; auto ftemp2 = new T[L * M * N]; mems...
GB_unaryop__lnot_int32_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...
residual_criteria.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_RESIDUAL_C...
matvec.h
#ifndef MATVEC_H #define MATVEC_H #include <stdlib.h> // malloc and free. #include <stdio.h> // printf #include <omp.h> // The function as give in the exercise. void dense_mat_vec(int m, int n, double *x, double *A, double *y) { int i, j; for (i=0; i<m; i++){ double tmp = 0.; for (j=0; j<n; j...
lsm3d_dlsm_openmp_v1.c
#include "openst/eikonal/lsm.h" #define M_LSM3D_IMP_NAME "DLSM" const char OPENST_LSM3D_COMPUTEPARTIAL_IMP_NAME[] = M_LSM3D_IMP_NAME; const size_t OPENST_LSM3D_COMPUTEPARTIAL_IMP_NAME_LENGTH = sizeof(M_LSM3D_IMP_NAME); int OpenST_LSM3D_ComputePartial_1H(OPENST_FLOAT *U, char *LSM_UNLOCKED, OPENST_FLOAT *V, ...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
main.c
/* !----------------------------------------------------------------------- ! Unauthorized use or distribution of this program is not permitted. ! ! Author: Ruud van der Pas ! ! Copyright 2007 - Sun Microsystems !----------------------------------------------------------------------- */ #include <omp.h>...
8700.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...
DenseMatrix.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseMatrix.h // \brief Header file for the OpenMP-based dense matrix SMP implementation // // Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved // // This file is part ...
ps_local-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 ...
coordinate_common.h
/*! * Copyright 2018 by Contributors * \author Rory Mitchell */ #pragma once #include <algorithm> #include <string> #include <utility> #include <vector> #include <limits> #include "xgboost/data.h" #include "xgboost/parameter.h" #include "./param.h" #include "../gbm/gblinear_model.h" #include "../common/random.h" n...
2DConvolution.c
/** * 2DConvolution.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@st...
close_member.c
// RUN: %libomptarget-compile-run-and-check-generic // REQUIRES: unified_shared_memory // UNSUPPORTED: clang-6, clang-7, clang-8, clang-9 #include <omp.h> #include <stdio.h> #pragma omp requires unified_shared_memory struct S { int x; int y; }; int main(int argc, char *argv[]) { int dev = omp_get_default_dev...
es1.h
#ifndef es1_h #define es1_h #include <iostream> #include <omp.h> #include <cmath> #define pi 3.14159 using namespace std; double es1Static(unsigned dim, unsigned nmt) { double *vec = new double [dim * dim]; double start = omp_get_wtime(); #pragma omp parallel num_threads(nmt) { ...
sensitivity_builder.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #if !defined(KRATOS_SENSI...
GB_binop__rminus_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...
mediancut.c
/* ** © 2009-2018 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ #include <stdlib.h> #include <stddef.h> #include "libimagequant.h" #include "pam.h" #include "mediancut.h" #defi...
iFDMEX.c
#include "mex.h" #ifdef __GNU__ #include <omp.h> #endif #ifndef MAXCORES #define MAXCORES 1 #endif void mexFunction(int nlhs, mxArray *left[], int nrhs, const mxArray *right[]) { /* Declare variables */ mwSize nD, NP=1, NV=1, NS=1, NT=1, RT=1; const mwSize *sz; mxClassID precision; mxArray *I;...
contract_fast.c
/* Generated by Cython 0.29.7 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-fopenmp" ], "extra_link_args": [ "-fopenmp" ], "language": "c", "name": "contract_fast", "sources": [ ...
lu.pluto_orio.seq.large.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.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)) double L[N][N]; double U[N][N]; double A[N][...