source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unop__round_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
par_csr_matvec.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) **************************************...
ft_ao.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 required ...
GB_unop__identity_fp32_bool.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...
master.c
////////////////////////////////////////////////////////////// // // master.c // // Copyright (c) 2017, Hassan Salehe Matar // All rights reserved. // // This file is part of Clanomp. For details, see // https://github.com/hassansalehe/Clanomp. Please also // see the LICENSE file for additional BSD notice // // Redistr...
3_2_1.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 500000000 double cal_time(struct timespec *t_end, struct timespec *t_start) { double elapsedTime; elapsedTime = (t_end->tv_sec - t_start->tv_sec) * 1000.0; elapsedTime += (t_end->tv_nsec - t_start->tv_nsec) / 1000000.0; return ...
DeclOpenMP.h
//===- DeclOpenMP.h - Classes for representing OpenMP directives -*- 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 // //===--------------------------...
AutoCo_Parta.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { int Size; float * Array; float * Sums; FILE * fp; int i,shift; fp = fopen( "signal.txt", "r" ); if( fp == NULL ) { fprintf( stderr, "Cannot open file 'signal.txt'\n" ); exit( 1 ); } fscanf( fp, "%d", &Size ); Array = (floa...
TransferOP.h
/* * TransferOP.h * * Created on: Jul 20, 2016 * Author: mason */ #ifndef TransferOP_H_ #define TransferOP_H_ #include "Param.h" #include "MyLib.h" #include "Node.h" #include "Graph.h" class TransferParams { public: vector<Param> W; PAlphabet elems; int nVSize; int nInSize; int nOutS...
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 // //===---------------------------...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
lake_opt.c
/************************************** * Author: Rahul Krishna * unity: rkrish11 **************************************/ /************************************* * lake.c * * Models pebbles on a lake * Description: * * This program uses centered finite differencing to * solve the wave equation with sources. * * The int...
7744.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
GB_binop__ne_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-...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
conv_dw_kernel_rv64.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...
sort.c
/* * sort.c * * @author: phdenzel * * Quicksort algorithms for DYAMA * * Parallel quicksort can cause bus error 10, because * some systems set the non-main stack size to < 1MB, * which is reached at N ~ 4096 * */ #include "sort.h" #include "world.h" void swapP(particle_t *p1, particle_t *p2) { // swap ...
soma_clustering.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & Newcastle University for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
hecmw_malloc.c
/***************************************************************************** * Copyright (c) 2019 FrontISTR Commons * This software is released under the MIT License, see LICENSE.txt *****************************************************************************/ #include <stdlib.h> #include <stdio.h> #include <str...
mpinpb.h
//--------------------------------------------------------------------- //--------------------------------------------------------------------- #ifndef __MPINPB_H #define __MPINPB_H #ifdef G_MAIN int node, no_nodes, total_nodes, root; int active; #else extern int node, no_n...
fio_old.c
#include <string.h> #include <stdlib.h> #include <stdint.h> #include <byteswap.h> #include <omp.h> #include "fio.h" /* NON-USER FUNCTION * * Swap 64bit double precision * Big-Endian 2 Little-Endian Scheme */ inline static double __bswap_64d(double val) { double val_; size_t sz = sizeof(double); size_t sz_ ...
divsufsort.c
/* * divsufsort.c for libdivsufsort-lite * Copyright (c) 2003-2008 Yuta Mori 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 wit...
polybench.c
/** * polybench.c: This file is part of the PolyBench 3.0 test suite. * * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <assert.h> #include <time.h> #include <sys...
sections_construct.c
#include <omp.h> #include <stdio.h> void sum_num(int a,int b) { printf("Adding %d and %d gives %d on thread %d\n",a,b,a+b, omp_get_thread_num()); } void sum_n_num(int n) { int i; int sum=0; for(i=0;i<=n;i++) { sum+=i; } printf("\nSum of first %d numbers is %d from thread %d\n",n,sum,o...
OpenMPWrapper.h
#ifndef PICMDK_OPENMPWRAPPER_H #define PICMDK_OPENMPWRAPPER_H /* This file should be included everywhere instead of <omp.h>. If the code is build with OpenMP it just includes <omp.h>, otherwise it provides wrappers for OpenMP functions and #pragma omp. The code including this file can use OpenMP functions and ...
LSBasics.h
#include "graph.h" #pragma once struct DFSData { int *id2dfs; //maps vertex ids to post-order numbers int *dfs2id; //maps post-order numbers to vertex ids int *id2parc; //maps vertex ids to parent arcs in the dfs tree DFSData(int n) { id2dfs = new...
pzgbbrd_static.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "plasma_types.h" #in...
simd_metadata.c
// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86 // RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -target-feature +avx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX // RUN: %clang_cc1 -fopenmp -trip...
GB_binop__iseq_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-...
convolution_1x1_pack1to4_fp16s.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 ...
pmm-OpenMP.c
#include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se encuentra la función printf() #ifdef _OPENMP #include <omp.h> #else #define omp_set_dynamic(0); #define omp_set_num_threads(4); #endif int main(int argc, char ** argv){ int **A, **B, **C; int i, ...
GB_unop__cos_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://...
GB_unaryop__minv_uint16_fp32.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__lor_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
squareddifference_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
ParallelJobsOpenMP.h
/* * Copyright (C) 2011 University of Szeged * Copyright (C) 2011 Gabor Loki <loki@webkit.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must re...
rnn_impl.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 ...
dynmat.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* 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 abo...
Example_scan.1.c
/* * @@name: scan.1.c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #include <stdio.h> #define N 100 int main(void) { int a[N], b[N]; int x = 0; // initialization for (int k = 0; k < N; k++) a[k] = k + 1; // a[k] is included in th...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "functions.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p; za = (2 * za...
GB_binop__band_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-...
GB_binop__lxor_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
apply_constant_scalarvalue_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_APPLY_C...
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 // //===---------------------------...
GB_unaryop__ainv_int16_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...
zunmlq.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 ...
TaskClauseLink.c
int x; int main() { int x; #pragma omp task if (1) final(1) { 11; } #pragma omp task { int x; } }
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...
valid.yolo9.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_1024_17_17_512_3_3.h" #include "gen_ukr_A1B2gemm_1_1024_17_17_512_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 17; int Ny = 17; int Nh = 3; long lo...
test_utils.h
/* * Copyright (c) 2019-2020, 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...
cloud_mpi.c
#include <string> #include <iostream> #include <algorithm> #include <utility> #include <tfhe/tfhe.h> #include <tfhe/tfhe_io.h> #include <stdio.h> #include <time.h> #include <vector> #include <cassert> #include <sys/time.h> #include <omp.h> #include <fstream> using namespace std; ifstream read; #define T_FILE "averages...
centr.h
namespace TSnap { ///////////////////////////////////////////////// // Node centrality measures (See: http://en.wikipedia.org/wiki/Centrality) /// Returns Degree centrality of a given node NId. /// Degree centrality if a node is defined as its degree/(N-1), where N is the number of nodes in the network. double GetDeg...
GB_binop__bshift_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-...
sieve.c
/* * Adapted from: http://w...content-available-to-author-only...s.org/sieve-of-eratosthenes * * Programa testado no PARCODE * * Tempo sequencial: * real 0m4.412s * user 0m4.318s * sys 0m0.080s * * Tempo paralelo: * real 0m3.659s * user 0m6.781s * sys 0m0.080s * * Tempo paralelo com escalonamento: * r...
test2.c
int main() { int x; #pragma omp parallel { 0; if (1) { x = 0; 2; #pragma omp barrier x; 3; } else { 4; while (5) { 6; #pragma omp barrier 7; x = 10; #pragma omp barrier } 8; } 9; #pragma omp barrier 10; } }
distribute_PEs.c
#define N 1000 #define NB_CLUSTERS 4 #define NB_PES 16 #define MIN(x, y) ((x) < (y) ? x : y) #include <stdio.h> /* Initialize an array between 2 given lines */ void init_array(int a[N][N], int begin, int end) { for (int i = begin; i < end; i++) for (int j = 0; j < N; j++) a[i][j] = 2*i + 3*j; } int main(...
openmp3.c
#include <math.h> #include <omp.h> double inner_sum(double *li, double *lj, int n) { double s = 0; for (int i = 0; i < n; i++) { s += li[i] * lj[i]; } return s; } void cholesky(double *A, double *L, int n) { for (int j = 0; j < n; j++) { double s = inner_sum(&L[j * n], &L[j * n], j); L[j * n + j] = sqrt(A[...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
conv5x5s2_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 ...
LogSoftMax.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/LogSoftMax.c" #else #ifdef _MSC_VER #define LOG_SOFTMAX_SIZE_TYPE int64_t #define LOG_SOFTMAX_CAST_TYPE (int64_t) #else #define LOG_SOFTMAX_SIZE_TYPE uint64_t #define LOG_SOFTMAX_CAST_TYPE #endif void THNN_(LogSoftMax_updateOutput)( THNNState ...
test_funcs.h
// Copyright (c) 2019 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...
otfft_avxdit16omp.h
// Copyright (c) 2015, OK おじさん(岡久卓也) // Copyright (c) 2015, OK Ojisan(Takuya OKAHISA) // Copyright (c) 2017 to the present, DEWETRON GmbH // OTFFT Implementation Version 9.5 // based on Stockham FFT algorithm // from OK Ojisan(Takuya OKAHISA), source: http://www.moon.sannet.ne.jp/okahisa/stockham/stockham.html #pragma...
chesv.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/zhesv.c, normal z -> c, Fri Sep 28 17:38:07 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
GB_unop__identity_int8_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...
8735.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
GB_compiler.h
//------------------------------------------------------------------------------ // GB_compiler.h: handle compiler variations //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apac...
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 = atoi(argv[argc - 1]); omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will ma...
mmp.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define NRA 1000 /* number of rows in matrix A */ #define NCA 1000 /* number of columns in matrix A */ #define NCB 1000 /* number of columns in matrix B */ #define printf(...) int main () { int i, j, k; /* ma...
perturbation_fold.c
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef VRNA_WITH_GSL #include <gsl/gsl_multimin.h> #endif #include "ViennaRNA/eval.h" #include "ViennaRNA/fold_vars.h" #include "ViennaRNA/constraints/hard.h" #include "Vie...
pi.c
#include <stdio.h> #include <omp.h> int nthreads; double seq_pi_calc(long num_steps) { double sum=0.0,x; int i; for(i=0;i<num_steps;++i) { x = (i + 0.5)/num_steps; sum = sum + 4.0/(1.0 + x*x); } return sum/num_steps; } double parallel_pi_calc(long num_steps,int NUM_THREADS) { double sum=0.0; omp_set_num_th...
parallel-inl.h
// // parallel-inl.h // DigitalRender // // Created by 杨丰 on 2020/11/3. // #ifndef parallel_inl_h #define parallel_inl_h #include "constants.h" #include <algorithm> #include <functional> #include <future> #include <vector> #define JET_TASKING_TBB true #ifdef JET_TASKING_TBB #include <tbb/parallel_for.h> #includ...
openbsdsoftraid_fmt_plug.c
/* * Copyright (c) 2014 Thiébaud Weksteen <thiebaud at weksteen dot fr> * * 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 v...
atomic_messages.c
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s int foo() { L1: foo(); #pragma omp atomic // expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression w...
square_symmetry.c
#include "smecy.h" void square_symmetry_smecy(int width, int height, int *image, int square_size, int x_offset, int y_offset) { // Can be executed in parallel #pragma omp parallel for for(int i = 0; i < square_size/2; i++) for(int j = 0; j < square_size; j++) { int tmp = image[(y_offset + i)*heigh...
DRB010-lastprivatemissing-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...
sort.c
/* This file is part of HiParTI!. HiParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. HiParTI! is distr...
omp_bug5.c
/****************************************************************************** * FILE: omp_bug5.c * DESCRIPTION: * Using SECTIONS, two threads initialize their own array and then add * it to the other's array, however a deadlock occurs. * AUTHOR: Blaise Barney 01/29/04 * LAST REVISED: 08/15/11 *******************...
squareddifference_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
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_binop__second_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...
bucle-forModificado.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_num_threads() 1 #endif int main(int argc, char ** argv) { int i, n = 9; if(argc < 2) { fprintf(stderr,"\n[ERROR] - Falta nº iteraciones \n"); exit(-1); } n = atoi(argv[1]);...
DRB005-indirectaccess1-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...
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
OpenNL_psm.c
#include "OpenNL_psm.h" /* * Copyright (c) 2004-2010, Bruno Levy * 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 n...
FullyDistVec.h
/****************************************************************/ /* Parallel Combinatorial BLAS Library (for Graph Computations) */ /* version 1.2 -------------------------------------------------*/ /* date: 10/06/2011 --------------------------------------------*/ /* authors: Aydin Buluc (abuluc@lbl.gov), Adam Lugow...
interp2.c
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * interp2.c * * Code generation for function 'interp2' * */ /* Include files */ #include "interp...
parallel-reduction2.c
#include<assert.h> #include<omp.h> #include<stdio.h> int main(void) { int i =100, sum=100; int thread_num; #pragma omp parallel reduction(+:sum) { #pragma omp single { thread_num = omp_get_num_threads(); } sum += i; } printf("thread num=%d sum =%d\n", thread_num, sum); assert(sum == (i*th...
Fig_10.1_parClaws.c
// sample compile command: "gcc -fopenmp -c Fig_10.1_parClaw.c" to generate *.o object file #include <stdio.h> #include <stdlib.h> #include <omp.h> // initialization and transform functions // (we will not show the function bodies) extern void initMats(int N, float *A, float *T); extern void transform(int N, int id,...
lis_precon_ilut.c
/* Copyright (C) 2002-2012 The SSI Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condition...
kernel_launcher.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <sys/time.h> #include "homp.h" #include "stencil3d.h" #if defined (DEVICE_NVGPU_CUDA_SUPPORT) extern __global__ void stencil3d_nvgpu_kernel(int start_n, int len_n, long n, long m, int u_dimX, int u_dimY, REAL *u, REAL *uold, int radius,...
chisquare.h
/* This file is part of Mitsuba, a physically based rendering system. Copyright (c) 2007-2014 by Wenzel Jakob and others. Mitsuba is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation. ...
task_yield.c
#include <omp.h> void something_useful ( void ); void something_critical ( void ); void foo ( omp_lock_t * lock, int n ) { int i; for ( i = 0; i < n; i++ ) #pragma omp task { something_useful(); while ( !omp_test_lock(lock) ) { #pragma omp taskyield } something_critical(); omp_unset_lock(loc...
threaded_eigen_matrix.h
/* * Copyright (c) 2017 Ivan Iakoupov * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publi...
matmult-mpi.c
/* * Copyright (c) 2014-2017, Sebastien Vincent * * Distributed under the terms of the BSD 3-clause License. * See the LICENSE file for details. */ /** * \file matmult-mpi.c * \brief Matrix multiplication in C/MPI. * \author Sebastien Vincent * \date 2018 */ #include <stdio.h> #include <stdlib.h> #include <...
bloom.c
/******************************************************************************* *** *** Author: Tyler Barrus *** email: barrust@gmail.com *** *** Version: 1.9.0 *** *** License: MIT 2015 *** *******************************************************************************/ #include <stdlib.h> #include ...
ps.c
/*** Some usefull math macros ***/ #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) static double mnarg1,mnarg2; #define FMAX(a,b) (mnarg1=(a),mnarg2=(b),(mnarg1) > (mnarg2) ?\ (mnarg1) : (mnarg2)) static double mnarg1,mnarg2; #define FMIN(a,b) (mnarg1=(a),mnarg2=(b),(mnarg1) < (mnarg2) ?\ (mnarg1) : (mnarg2)) #d...
convolution_1x1_pack8.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 ...
omp_utils.h
/** * !file omp_utils.h * \brief OpenMP utilities */ #ifndef OMP_UTILS_H #define OMP_UTILS_H #ifdef USEOPENMP #include <omp.h> #endif // USEOPENMP namespace NBody { #ifdef USEOPENMP int get_available_threads() { int nthreads; #pragma omp parallel #pragma omp single { nthreads = omp_get_num_threads(); } r...
residual_criteria.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_RESIDUAL_C...
par_relax_more.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) ***************************************...