source
stringlengths
3
92
c
stringlengths
26
2.25M
configurator.c
/* Simple tool to create config.h. * Would be much easier with ccan modules, but deliberately standalone. * * Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) int main(void){ check_offloading(); int fail; double A[N], B[N], C[N], D[N], E[N]; INIT(); #if 0 // // Test: Execute o...
mm_dist.c
#include <stdio.h> #include <stdlib.h> /* TEMPO SEQUENCIAL: real 3m30.117s user 1m15.715s sys 0m0.127s TEMPO PARALELO MULTICORE: real 1m29.670s user 1m14.390s sys 0m0.269s TEMPO PARALELO DISTRIBUTE: real 3m5.985s user 2m25.092s sys 0m40.084s Invocations ...
GB_binop__div_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-...
ordered.c
/* Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze (joachim.protze@tu-dresden.de), Jonas Hahnfeld (hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir Rakamaric, Dong H. A...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
omp_kmeans.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "kmeans.h" // distancia euclideana __inline static float euclid_dist_2(int numdims, /* num_dimensiones */ float *coord1, /* [num_dimensiones] */ float *coord2) /* [num_dimensiones] */ { int i; flo...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
for-15.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo() { long n = 10; int i; #pragma omp for for (i=0; i < n; ++i) ; #pragma omp for for (i=0; n > i; ++i) ; }
tutorial_region_prof.c
/* * Copyright (c) 2015 - 2021, 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 condition...
residualbased_newton_raphson_contact_strategy.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_/...
syncbench.c
/**************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 3.1 * * * * ...
trmm_x_dia_u_hi_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *...
top_k_op.h
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__isle_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-...
light.h
/* light.h */ #include "mytypes.h" /******************************************************************************/ /* Access macros */ /* light */ #define t0(a,b,c) t0[CELTNDX(a,b,c)] #define t0_sav(a,b,c) t0_sav[CELTNDX(a,b,c)] #define t2(a,b,c) t2[CELTNDX(a,b,c)] /* t0_big has NO guard zones and is nxfull-by-nyf...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
GB_binop__lxor_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...
DRB040-truedepsingleelement-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...
nvptx_target_printf_codegen.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ // Test target codegen - host bc file has to be cr...
lone_target_exit_data.c
// Check that a target exit data directive behaves correctly when the runtime // has not yet been initialized. // RUN: %libomptarget-compile-run-and-check-generic #include <stdio.h> int main() { // CHECK: x = 98 int x = 98; #pragma omp target exit data map(from:x) printf("x = %d\n", x); return 0; }
par_csr_matop.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
GB_mask_template.c
//------------------------------------------------------------------------------ // GB_mask_template: phase1 and phase2 for R = masker (M, C, Z) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://su...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
gdal_sam_eta.c
#include<stdio.h> #include<omp.h> #include<math.h> #include "gdal.h" #include "sam_eta.h" #include "libcrop.h" void usage() { printf( "-----------------------------------------\n"); printf( "--Modis Processing chain--OpenMP code----\n"); printf( "-----------------------------------------\n"); printf( "./sam_eta in...
munit.c
/* Copyright (c) 2013-2018 Evan Nemerson <evan@nemerson.com> * * 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...
lock.c
#include <stdio.h> #include <omp.h> omp_lock_t my_lock; int main() { omp_init_lock(&my_lock); #pragma omp parallel num_threads(4) { int tid = omp_get_thread_num( ); int i, j; for (i = 0; i < 5; ++i) { omp_set_lock(&my_lock); printf("Thread %d - starting locked region\n",...
mixed_tentusscher_myo_epi_2004.c
#include <stdio.h> #include "mixed_tentusscher_myo_epi_2004.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } SET_ODE_INITIAL_CONDITIONS_CPU(set_model_initial_conditions_cpu) { st...
symv_c_csr_n_lo_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include <memory.h> #include<stdlib.h> static alphasparse_status_t symv_x_csr_n_lo_conj_omp(const ALPHA_Number alpha, c...
rose_v1_break2.c
#include <omp.h> int i; int j; int a[100][100]; void foo() { #pragma omp parallel for private (i) for (i = 0; i <= 99; i += 1) { for (j = 0; j <= 99; j += 1) { a[i][j] = a[i][j] + 1; if (a[i][j] == 100) break; } } }
postgres_fmt_plug.c
/* PostgreSQL MD5 challenge-response cracker patch for JtR. Hacked together * during October of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * Use Ettercap to get PostgreSQL MD5 challenge-response pairs in JtR format. * E.g. ettercap -Tq -r /home/user/sample.pcap * * Input format: * $postgres$user*salt*ha...
convolution_sgemm_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. 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 of the License at // //...
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 <vector> #include <string> #include <shared_mutex> #include "../VectorIndex.h" #include "CommonUtils.h" #include "QueryResultSet.h" #include "WorkS...
util.h
/* Copyright (c) 2013, Taiga Nomi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditi...
conv.h
#ifndef CONV_H #define CONV_H namespace TSnap { /// Sequentially converts the table into a graph with links from nodes in \c SrcCol to those in \c DstCol. template<class PGraph> PGraph ToGraph(PTable Table, const TStr& SrcCol, const TStr& DstCol, TAttrAggr AggrPolicy) { PGraph Graph = PGraph::TObj::New(); const T...
UnitLocality.h
#ifndef DASH__UTIL__UNIT_LOCALITY_H__INCLUDED #define DASH__UTIL__UNIT_LOCALITY_H__INCLUDED #include <dash/util/Locality.h> #include <dash/util/LocalityDomain.h> #include <dash/util/Config.h> #include <dash/algorithm/internal/String.h> #include <dash/dart/if/dart_types.h> #include <dash/dart/if/dart_locality.h> #in...
Rasterizer.h
#ifndef RASTERIZER_INCLUDED #define RASTERIZER_INCLUDED #include <vector> #include <omp.h> #include "Util/Geometry.h" #include "SignalProcessing/CubeGrid.h" template< class Real > void Rasterize( Point3D< Real > v1 , CubeGrid< char >& grid , Real scale=Real(1.) ); template< ...
cholesky-no-dependency.c
/* * Cholesky por bloques. */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include "ctimer.h" #define L(i,j) L[j*n+i] #define A(i,j) A[j*n+i] #define C(i,j) C[j*n+i] int cholesky_escalar( int n, double *C ); int cholesky_bloques( int n, int b, double *C ); int main( int argc, char *argv[] ) { in...
build_tree.c
/******************************************************************************* * 2pt/build_tree.c: this file is part of the FCFC program. * FCFC: Fast Correlation Function Calculator. * Github repository: https://github.com/cheng-zhao/FCFC * Copyright (c) 2020 -- 2021 Cheng Zhao <zhaocheng03@gmail.com> [M...
FourierTransform.h
#pragma once #include <omp.h> #include "ScalarField.h" #include "Grid.h" #include "Enums.h" #ifdef __USE_FFT__ #include "fftw3.h" #endif namespace pfc { namespace fourier_transform { inline Int3 getSizeOfComplexArray(Int3 sizeOfFP) { return Int3(sizeOfFP.x, sizeOfFP.y, sizeOfFP.z / 2 ...
GB_binop__lt_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
softmax-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 ...
scheduler-clause.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n=20,a[n],suma=0; if(argc < 2) { fprintf(stderr,"\nFalta iteraciones \n"); exit(-1); } n = atoi(argv[1]); if (n>20) n=20; for (i=0; i<n; i++)...
csf.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "csf.h" #include "sort.h" #include "tile.h" #include "ccp/ccp.h" #include "io.h" #include "sptensor.h" /*******************************...
debug_private.c
// This testcase checks emission of debug info for variables inside // private/firstprivate/lastprivate. // 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: define internal i...
opencl_keyring_fmt_plug.c
/* * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net>, * Copyright (c) 2012 Dhiru Kholia <dhiru at openwall.com> and * Copyright (c) 2012-2014 magnum * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or witho...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
main.c
//===--- Adi.c ---- Alternating Direction Implicit ---------------*- C -*-===// // // This file implements the Alternating Direction Implicit(ADI) method which is // an iterative method used to solve partial differential equations. // //===----------------------------------------------------------------------===// #i...
spmv.c
////Example of sparse matrix-vector multiply, using CSR (compressed sparse row format). #include <stdio.h> #include <stdlib.h> #include <string.h> // Add timing support #include <sys/timeb.h> #define REAL float double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millit...
elemwise_binary_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 ...
GB_binop__times_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
pfmg_setup_rap5.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...
cv_basic.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...
linked_tasks.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #ifndef N #define N 5 #endif #ifndef FS #define FS 38 #endif struct node { int data; int fibdata; struct node* next; }; struct node* init_list(struct node* p); void processwork(struct node* p); int fib(int n); int fib(int n) ...
GB_binop__gt_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
grid_ao_drv.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <string.h> #include <math.h> #include <complex.h> #include "config.h" #include "grid_ao_drv.h" #define MIN(X,Y) ((X)<(Y)?(X):(Y)) #define MAX(X,Y) ((X)>(Y)?(X):(Y)) double exp_cephes(double x); double CINTcommon_fac_sp(int...
CGOpenMPRuntime.h
//===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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 // //===---------------------------...
sparse.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 di...
ab758071d8e021266f07f078cf339d98655cede0.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double section0; } ; int norm2(struct dataobj *restrict...
ctl_fragment.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/) * * 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 Lic...
tree-vectorizer.h
/* Vectorizer Copyright (C) 2003-2019 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.com> 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 ve...
GB_binop__eq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
boundary_matrix.h
/* Copyright 2013 IST Austria Contributed by: Ulrich Bauer, Michael Kerber, Jan Reininghaus This file is part of PHAT. PHAT 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 vers...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
nestedFunc.c
// OpenMP Nested Functions Example #include <omp.h> #include <stdio.h> #include <stdlib.h> int main( int argc, char** argv ) { omp_set_nested( 1 ); // Enable Nested Parallelism omp_set_dynamic( 0 ); // Disable Dynamic Threads int num = 0; // Thread Number int threads = 0; // Current Threads ...
Fig_12.21_ompTwoTarg.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #define N 1024 int main() { float *a, *b, *c, *d; int i; a = (float*) malloc(N * sizeof(float)); b = (float*) malloc(N * sizeof(float)); c = (float*) malloc(N * sizeof(float)); d = (float*) malloc(N * sizeof(float)); // initialize a, b...
vacation.c
/* ============================================================================= * * vacation.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
aix_smd5_fmt_plug.c
/* AIX smd5 cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 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 ...
common.c
#include "common.h" bool IS_EDGE(const int e){ return (e >= 0)? true : false; } static void BE_EDGE(int *e) { *e = ((*e) + 1) * (-1); } static void BE_NOEDGE(int *e) { *e = -1 * (*e) - 1; } void REVERSE(int *e) { if(IS_EDGE(*e)) BE_NOEDGE(e); else BE_EDGE(e); } void printb(const uint64_t v) { ...
udr-1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ #pragma omp declare reduction (| : long int : omp_out |= omp_in) /* { dg-error "predeclared arithmetic type" } */ #pragma omp declare reduction (+ : char : omp_out += omp_in) /* { dg-error "predeclared arithmetic type" } */ typedef short T; #pragma omp declare r...
GB_unop__abs_int32_int32.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__atan2_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
softmax-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 ...
NAS_EP.c
//--------------------------------------------------------------------- // program EP //--------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <sys/time.h> #if !defined(CLASS_W) && !defined(CLASS_S) && !defined(CLASS_A...
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...
sync.c
/** * \file * \brief BOMP barrier synchronization microbenchmark */ /* * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, H...
par_amgdd_fac_cycle.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) **************************************...
NALF-SFCM.h
// Fully normalized associated Legendre functions calculated by standard forward column methods // Holmes, S. A., & Featherstone, W. E. (2002). // A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions. // Journal of Geodesy, 76(...
GB_unaryop__minv_uint32_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...
DRB003-antidep2-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...
kruskal.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "kruskal.h" #include <math.h> #include <omp.h> /****************************************************************************** * PRIVA...
transposition_network_binary_alphabet.h
// // Created by nikita on 19.08.2020. // #ifndef CPU_TRANSPOSITION_NETWORK_BINARY_ALPHABET_H #define CPU_TRANSPOSITION_NETWORK_BINARY_ALPHABET_H #include <cstdlib> /** * Contains implementations of cell processing logic for bitwise algorithm based on semi-local iterative combing */ namespace cell_routines { ...
lsh_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
ssca2-locks.c
/* ============================================================================= * * ssca2.c * * ============================================================================= * * For the license of bayes/sort.h and bayes/sort.c, please see the header * of the files. * * ---------------------------------------...
DRB092-threadprivatemissing2-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...
gemv.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...
unittest.h
/** * @file unittest.h * * @brief single-header unittesting framework for pure C99 codes * * @author Hajime Suzuki * @date 2016/3/1 * @license MIT * * @detail * latest version is found at https://github.com/ocxtal/unittest.h. * see README.md for the details. */ #pragma once /* instead of include guard */ ...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
5115.c
/* * Compile using the command: * `cc 27Stencil.c -o oa -fopenmp -lm` */ #include <math.h> #include <omp.h> #include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #ifdef _OPENACC #include <openacc.h> #endif #define DEFAULT_DATASIZE 1048576 /* Default datasize. */ #define DEFAULT_REPS 10 ...
convolution.h
// // Created by agibsonccc on 3/9/16. // #ifndef NATIVEOPERATIONS_CONVOLUTION_H #define NATIVEOPERATIONS_CONVOLUTION_H #include <omp.h> template <typename T> class Im2col { private: T *img; T *out; int kernelWidth; int kernelHeight; int strideY; int strideX; int padHeight; int padWid...
index.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> typedef unsigned int uint; #define LIMIT 500 #define XCHG(i, j) {uint t = i; i = j; j = t;} static void imerge_(uint * b, uint * l1, uint * h1, uint * l2, uint * h2, uint * l_) { for(;(l1 != h1) && (l2 != h2);) { if(*(b + *(l2)) < *(b + *(l1))) mem...
darts-hybrid.c
/* Compute pi using hybrid MPI/OpenMP */ #include "lcgenerator.h" #include <mpi.h> #include <omp.h> #include <stdio.h> static long num_trials = 1000000; int main(int argc, char **argv) { long i; long Ncirc = 0; double pi, x, y; double r = 1.0; // radius of circle double r2 = r*r; int rank, size, manager ...
core_zgemm.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 "core_lapack.h" /*******************************************************************...
Example_declare_target.4.c
/* * @@name: declare_target.4c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ #define N 10000 #pragma omp declare target float Q[N][N]; float Pfun(const int i, const int k) { return Q[i][k] * Q[k][i]; } #pragma omp end declare target float accum(int k) { float tmp = 0.0...
ktensor.c
/* This file is part of ParTI!. ParTI! 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. ParTI! is distributed...
ast-dump-openmp-master.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test() { #pragma omp master ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-maste...
observables.h
/*************************************************************************** * Copyright (C) 2009-2013 by Florian Goth * * fgoth@wthp095 * * * * All rights reserved. * * ...
r_numint.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <complex.h> #include "cint.h" #include "gto/grid_ao_drv.h" #include "np_helper/np_helper.h" #include "vhf/fblas.h" #include <assert.h> #define BOXSIZE 56 int VXCao_empty_blocks(char *empty,...