source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unaryop__abs_bool_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...
GB_binop__ge_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-...
transpose.c
/* Copyright (c) 2013, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer...
GB_binop__eq_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-...
lstm_bwd.c
#include <libxsmm.h> #include <libxsmm_intrinsics_x86.h> #if defined(LIBXSMM_OFFLOAD_TARGET) # pragma offload_attribute(push,target(LIBXSMM_OFFLOAD_TARGET)) #endif #include <stdlib.h> #include <string.h> #include <stdio.h> #if defined(_OPENMP) # include <omp.h> #endif #include "lstm_bwd.h" #if defined(LIBXSMM_OFFLOAD_...
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. * *...
dataCostD.h
void interp3xyz(float *datai, float *data, float *datax, float *datay, int len1, int len2) { // x-interp for (int k = 0; k < len1; k++) { for (int j = 0; j < len2; j++) { int j2 = (j + 1) / 2; if (j % 2 == 1) { for (int i = 0; i < len1; i++...
SeparableFilter.h
/* Copyright 2007 Niels Martin Hansen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is...
t006.c
#include<stdint.h> #include<stdlib.h> #include<stdio.h> #include<omp.h> typedef struct {int64_t nteam; int64_t mthread;} tinfo; int main(int argc, char **argv) { const int h = omp_get_initial_device(); const int d = omp_get_default_device(); const size_t s = sizeof(tinfo); tinfo *t = malloc(s); if(!t){ perror("...
sparseBlocksJacobi.h
// // Created by mbarb on 23/01/2018. // #ifndef PARALLELITERATIVE_SPARSEBLOCKSJACOBI_H #define PARALLELITERATIVE_SPARSEBLOCKSJACOBI_H #include "Eigen" #include "utils.h" #include "sparseParallelJacobi.h" namespace Iterative { template <typename Scalar> class sparseBlocksJacobi : public sparseParallelJacobi<Scal...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
LR.h
#include "omp.h" #include <sys/timeb.h> #include <cmath> #include <iostream> #include "split.h" using namespace std; static omp_lock_t lock; int solve_lr(int nb_row, int nb_col, double ****align_edge, int ***lambda_for_cik, problem *current_problem) { omp_init_lock(&lock); double global_ub(INFINITY); ...
serial_tree_learner.h
#ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/utils/random.h> #include <LightGBM/utils/array_args.h> #include <LightGBM/tree_learner.h> #include <LightGBM/dataset.h> #include <LightGBM/tree.h> #include "feature_histogram.hpp" #include "spli...
THTensorMath.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/THTensorMath.c" #else #define TH_OMP_OVERHEAD_THRESHOLD 100000 void THTensor_(fill)(THTensor *r_, real value) { TH_TENSOR_APPLY(real, r_, THVector_(fill)(r__data, value, r__size); break;); } void THTensor_(zero)(THTensor *r_) { TH_TENSOR_...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
utils.h
#include "structures.h" #ifndef UTILSH #define UTILSH namespace utils { static void print_help_message() { std::cout << "Please provide an obj filename using -f <filename.obj>" << std::endl; std::cout << "Optional: -of specifies outfile name" << std::endl; std::cout << "Optional: -co specifies cost thresh...
GPUCommonMath.h
//**************************************************************************\ //* This file is property of and copyright by the ALICE Project *\ //* ALICE Experiment at CERN, All rights reserved. *\ //* *\ //* Prim...
host_targ.c
#include <stdio.h> #include <omp.h> int arr[100]; int nt =12; int iid, gid, gdd, gdn; int main() { fprintf(stderr, "Omp host get_num_devices %d\n", omp_get_num_devices()); #pragma omp target map(tofrom: iid, gid, gdd, gdn) { iid = omp_is_initial_device(); gid = omp_get_initial_device(); gdd = omp_get_defau...
kthvalue_op.h
/* Copyright (c) 2021 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...
GB_unaryop__minv_fp32_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
THTensorMath.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/THTensorMath.c" #else #define TH_OMP_OVERHEAD_THRESHOLD 100000 void THTensor_(fill)(THTensor *r_, real value) { TH_TENSOR_APPLY(real, r_, THVector_(fill)(r__data, value, r__size); break;); } void THTensor_(zero)(THTensor *r_) { TH_TENSOR...
DRB095-doall2-taskloop-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
ising.h
#ifndef _ISING_H #define _ISING_H #include <iostream> #include <tuple> #include <array> #include <vector> #include <bitset> #include <algorithm> #include <random> #include <string> #include <memory> #include <limits> #include <type_traits> #ifdef _OPENMP #include <valarray> #include <omp.h> #endif #include "asa.h...
dng_simd_type.h
/*****************************************************************************/ // Copyright 2017-2019 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file in // accordance with the terms of the Adobe license agreement accompanying it. /***********...
GB_Scalar_extractElement.c
//------------------------------------------------------------------------------ // GB_Scalar_extractElement_template: x = S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apach...
infectious_test.c
/* For license: see LICENSE.txt file at top-level */ #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <shmem.h> #include <math.h> #include <string.h> #include <hoover.h> #ifdef MULTITHREADED #include <omp.h> #include <shmemx.h> #endif #define TIME_STEP 0 #define ACTOR_ID 1 #define PX 2 #define PY...
channel_shuffle.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
compressible_element_rotation_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #ifndef KRATOS_COMPRESSIBLE_EL...
cmontecarlo.c
#include <inttypes.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #ifdef WITHOPENMP #include <omp.h> #endif #include "io.h" #include "abbrev.h" #include "status.h" #include "rpacket.h" #include "cmontecarlo.h" /** Look for a place to insert a value in an inversely sorted float array. * * @param x an i...
GB_binop__max_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...
proj.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sched.h> #include <omp.h> #include "allocate.h" #include "data.h" #include "prepro.h" #include "proj.h" void createSinogram(struct Sinogram *sinogram) { sinogram->sino = (ENTRY *)get_spc((sinogram->geom_info.Nr)*(sinogram->geom_info.Nc)*(sinogram->geo...
stream.c
/*-----------------------------------------------------------------------*/ /* Program: STREAM */ /* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Programm...
GB_unop__log_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...
8581.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
opencl_pgpwde_fmt_plug.c
/* * Format for brute-forcing PGP WDE disk images. * * This software is Copyright (c) 2017 Dhiru Kholia <dhiru at openwall.net> 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. */ #...
GB_binop__pow_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-...
lock-nested-unrelated.c
/* * lock-nested-unrelated.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-excep...
builder.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef BUILDER_H_ #define BUILDER_H_ #include <algorithm> #include <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include "command_line.h" #include "ge...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
rose_livenessTest.c
#include "omp.h" typedef double real8; void foo(real8 *y,real8 *d__,real8 *d11,real8 *d12,real8 *d13,real8 *d22,real8 *d23,real8 *d33,real8 *m,int *nell,real8 *p,int t,int flagB,int flagA,int ub) { int l; int nel; int t1 = t - 1; if (flagB == 0) { for (l = 0; l <= ub - 1; l += 1) { int l8 = l * 8; ...
ParallelClauseLink.c
int main() { #pragma omp parallel if (1) num_threads(2) { } }
CPULauncher.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
chat.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <arpa/inet.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/epoll.h> #include <fcntl.h> #include <omp.h> #include "myqueue.h" #define IP "127.0.0.1" #define PORT 3000 #define MAX_CLIENT 2 #defin...
blackscholes.c
#include "BullMoose_4.h" // Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, // Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <strin...
GB_unop__identity_int64_int16.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...
GB_positional_op_ip.c
//------------------------------------------------------------------------------ // GB_positional_op_ip: C = positional_op (A), depending only on i //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
GB_binop__bclr_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
tree.h
/* * tree.h * * Created on: Oct 9, 2016 * Author: Yimin Zhong */ #ifndef FMM_TREE_H #define FMM_TREE_H #include "node.h" #include "measure.h" #include <chrono> #include <fstream> #include <cassert> #include <queue> #ifdef RUN_OMP #include "omp.h" #endif class tree { public: vector<node> dict; int...
GB_binop__lor_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
KDTree.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_KDTREE_H_ #define _SPTAG_COMMON_KDTREE_H_ #include <iostream> #include <vector> #include <string> #include <shared_mutex> #include "../../../../simde/simde/x86/sse4.2.h" #include "../VectorIndex.h" ...
spectral-norm.c
/* * The Computer Language Benchmarks Game * http://shootout.alioth.debian.org/ * * Original C contributed by Sebastien Loisel * Conversion to C++ by Jon Harrop * OpenMP parallelize by The Anh Tran * Add SSE by The Anh Tran * Reconversion into C by Dan Farina */ #define _GNU_SOURCE #include <omp.h...
ejercicio_04.c
/* Ejercicio 4 * Usando la API(OpenMP) hacer un programa que realice lo siguiente: * - Crear 2 matrices de 50 columnas x 50 filas (50x50), inicializada con valores aleatorios. [✔] * - Generar las Matrices Transpuertas(MT) de cada una. ...
GB_unop__identity_int32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
GB_binop__rdiv_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-...
GB_unaryop__identity_int16_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You c...
GB_subassign_00.c
//------------------------------------------------------------------------------ // GB_subassign_00: C(I,J)<!,repl> = empty ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.co...
binary_operation.h
/* Copyright 2021 NVIDIA Corporation * * 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 agreed...
quicksort-omp.h
#include "omp.h" void quickSort_parallel(int* array, int lenArray, int numThreads); void quickSort_parallel_internal(int* array, int left, int right, int cutoff); void quickSort_parallel(int* array, int lenArray, int numThreads){ int cutoff = 1000; #pragma omp parallel num_threads(numThreads) { #pragma omp...
section_firstprivate.c
// Skip testing on 64 bit systems for now! #ifndef __LP64__ #include <stdio.h> #include "omp_testsuite.h" int check_section_firstprivate (FILE * logFile) { int sum = 7; int sum0 = 11; int known_sum; #pragma omp parallel { #pragma omp sections firstprivate(sum0) { #pragma omp section { #pragma omp c...
4848.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...
graph_cut.h
#ifndef GRAPHCUT_H #define GRAPHCUT_H #include "submodular.h" #include <vector> #include "../la/vector.h" template<class DT> class Edge { public: int64_t index; DT weight; Edge(int64_t i, DT w) : index(i), weight(w) {} }; //submodular function for a flow network //1 source and 1 sink, 2 groups template<...
rose_true_l2.c
/* * Outer loop: no dependence: * Inner loop: loop-carried dependence * * final dependence graph: * dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1); * SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1); * 2*2TRUE_DEP; commonlevel = 2 +precise CarryLevel = 1 * SgPntrArrRefExp:(a[i])[j] * SgP...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define HOST_MAX_TEAMS 128 #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) int main(void) { check_offloading(); double A[...
tree-ssa-loop-ivcanon.c
/* Induction variable canonicalization and loop peeling. Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of GCC. GCC 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, ...
GB_binop__copysign_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-...
simp.c
/* Start reading here */ #include <fftw3.h> #define NUM_POINTS 64 /* Never mind this bit */ #include <stdio.h> #include <math.h> #define REAL 0 #define IMAG 1 double theta; void acquire_from_somewhere(fftw_complex* signal) { /* Generate two sine waves of different frequencies and * * amplitudes. * ...
libsvm_parser.h
/*! * Copyright (c) 2015 by Contributors * \file libsvm_parser.h * \brief iterator parser to parse libsvm format * \author Tianqi Chen */ #ifndef XGBOOST_IO_LIBSVM_PARSER_H_ #define XGBOOST_IO_LIBSVM_PARSER_H_ #define NOMINMAX #include <vector> #include <cstring> #include <cctype> #include <algorithm> #include "....
kncmbpush3.c
/* KNC C Library for Skeleton 3D Electromagnetic Vector PIC Code */ /* written by Viktor K. Decyk, UCLA and Ricardo Fonseca, ISCTE */ #include <stdlib.h> #include <stdio.h> #include <complex.h> #include <math.h> #include <string.h> #include <immintrin.h> #include "kncmbpush3.h" /*-------------------------------------...
ams.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) **************************************...
ompfor5.c
/* * test decremental loop iteration space * Liao 9/22/2009 */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void foo(int iend, int ist) { int i; #pragma omp parallel { #pragma omp single printf ("Using %d threads.\n",omp_get_num_threads()); #pragma omp for nowait schedule(static) for (i=ien...
main.c
/*======================================*/ /*= Autor: Tiago Serique Valadares =*/ /*= GRR: 20195138 =*/ /*= Disciplina: Aprendizado de Maquina =*/ /*======================================*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "knn.h" #include "read_data....
GB_binop__bshift_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
c_timers.c
#include "wtime.h" #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif #include "hooks_base.h" /* Prototype */ void wtime( double * ); /*****************************************************************/ /****** E L A P S E D _ T I M E ******/ /************************************...
GB_binop__islt_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
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...
UpdateCombinedNeighboursWorklet.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
openMP.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int someMath(int num,int i){ num = num * num * num * i; return num; } int main(int argc, char** argv){ int nthreads, tid; int i; int num = atoi(argv[1]); int data[10000]; #pragma omp parallel { #pragma omp for for(i=0; i<...
repair.c
#include "../../shared.h" #include "hale.h" #include <float.h> #include <stdio.h> /* * NOTE: The repair phase is essentially a mesh-wide scattering stencil. * Essentially the whole stencil needs to be owned by a single thread to stop * data races... * * One method that could be employed here is to essentially bre...
eavlSimpleReverseIndexOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_SIMPLE_REVERSE_INDEX_OP_H #define EAVL_SIMPLE_REVERSE_INDEX_OP_H #include "eavlOperation.h" #include "eavlArray.h" #include "eavlException.h" /// like reverse-index op, but assume the output counts /// can only ever be "1", ...
9620.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...
stat_ops.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "stat_ops.h" #include "utility.h" #include "constant.h" double expectation_value_X_Pauli_operator(UINT target_qubit_index, const CTYPE* state, ITYPE dim); double expectation_value_Y_Pauli_operator(UINT target_qubit_index, const CTYPE...
vector.c
/*BHEADER********************************************************************** * Copyright (c) 2006 The Regents of the University of California. * Produced at the Lawrence Livermore National Laboratory. * Written by the HYPRE team. UCRL-CODE-222953. * All rights reserved. * * This file is part of HYPRE (see ht...
stencil_threads.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "malloc2D.h" #include "timer.h" #define SWAP_PTR(xnew,xold,xtmp) (xtmp=xnew, xnew=xold, xold=xtmp) int main(int argc, char *argv[]) { #pragma omp parallel if (omp_get_thread_num() == 0) printf("Running with %d thread(s)\n",omp_get_num_threads(...
ep.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <math.h> #include <omp.h> #include "util.h" #define TRUE 1 #define FALSE 0 #define DEBUG 1 #define NMAX 1000 #define MAX_LINE 256 /*Intervalo [0, 255]*/ #define RGB_SIZE 256 #define PI 3.14159265359 long int x; int main(int arg...
variable_bound_move_generator.h
/*****************************************************************************/ // Copyright (c) 2020-2021 Yuji KOGUMA // Released under the MIT license // https://opensource.org/licenses/mit-license.php /*****************************************************************************/ #ifndef PRINTEMPS_NEIGHBORHOOD_VARIA...
omp_alloc_null_fb.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> int main() { omp_alloctrait_t at[2]; omp_allocator_handle_t a; void *p[2]; at[0].key = omp_atk_pool_size; at[0].value = 2 * 1024 * 1024; at[1].key = omp_atk_fallback; at[1].value = omp_atv_null_fb; a = omp_init_allocator(omp_default_m...
vednnLinearForward.c
#include "vednnLinearForward.h" #include "vednn-def.h" static inline vednnError_t vednnLinearForward_wrapper( vednnLinearForward_t pFunc, VEDNN_LINEARFWD_ARGS ) { #ifndef VEDNN_USE_OPENMP return pFunc(VEDNN_LINEARFWD_ARGS_LIST); #else if ( __vednn_omp_num_threads == 1 ) { return pFunc(VEDNN_LINEARFWD_A...
DenseVector.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseVector.h // \brief Header file for the OpenMP-based dense vector SMP implementation // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of th...
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...
Image.h
#include <iostream> #include <cmath> #include <omp.h> //Functions that are integral to the image processing functions //in the PDImaging python toolbox written by Yngve Mardal Moe. //Basic image mathematics void inline multiply_image(double* image, double factor, int y, int x) { //Multiplies all elements of :image: b...
GB_binop__ne_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
shared_value.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid, value = 0; /* Fork a team of threads giving them their own copies of variables */ #pragma omp parallel private(nthreads, tid) shared(value) { /* Obtain thread number */ tid = omp_get_thread_n...
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 // //===---------------------------...
streaming.c
#include "streaming.h" #include "helper.h" #include "LBDefinitions.h" #include "computeCellValues.h" #include <omp.h> /* doStremingCell: performs the streaming operation for one cell, in fact each cell receives all the streaming from the neighbor cells */ void doStremingCell(float * collideField, float * streamField, ...
client_utils.h
// Copyright (c) 2020 - present Advanced Micro Devices, Inc. All rights reserved. // // 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 r...
estimate_thetae.c
/****************************************************************************** * * * ESTIMATE_THETAE.C * * * ...
GB_binop__minus_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...
hsaxpy.c
/** * @file hsaxpy.c * @brief Function definition for performing the \c saxpy operation on host. * * This source file contains function definition for the \c saxpy operation, * which is defined as: * * y := a * x + y * * where: * * - a is a scalar. * - x and y are single-precision vectors each with n elemen...