source
stringlengths
3
92
c
stringlengths
26
2.25M
pt_to_pt_pingpong.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
reduction_1.c
#include<omp.h> #include<stdio.h> int main(){ if (omp_get_num_threads() == 1) { omp_set_num_threads(4); } int a[10],b[10]; for(int j=0;j<10;j++){ a[j]=j+1; b[j]=j+1; } int i=0; int sum=0; #pragma omp parallel for reduction(+:sum) for(i=0;i<10;i++){ sum=sum+a[i]+b[i]; printf("%d\n", ...
omp_lock.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" omp_lock_t lck; int test_omp_lock() { int nr_threads_in_single = 0; int result = 0; int nr_iterations = 0; int i; omp_init_lock(&lck); #pragma omp parallel shared(lck) { #pragma omp for for(i = 0; i < LOOPCOUNT; i++) ...
apply_mask_50.c
#include <stdint.h> void main(uint8_t* im, int32_t* h, int32_t* w, _Bool* mask, uint8_t* color) { int32_t x, y; #pragma omp parallel for for (y=0; y<h[0]; ++y) { for (x=0; x<w[0]; ++x) { if (mask[y*w[0] + x]) { int32_t pos = 3 * (y*w[0] + x); ...
smoothing_utility.h
/* ============================================================================== KratosStructuralApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix...
GB_binop__bxnor_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
NBody.c
/* Assignment 1 Program This program implements an N-body simulation and visualization on a CPU, along with code for benchmarking performance. We implement both a serial CPU version, and a version for multi-core processors using OpenMP. The accompanying report provides discussion on design considerations regarding perf...
kernel.openmp.h
#include <iris/iris_openmp.h> static void uppercase(char* b, char* a, IRIS_OPENMP_KERNEL_ARGS) { int i; #pragma omp parallel for shared(b, a) private(i) IRIS_OPENMP_KERNEL_BEGIN(i) if (a[i] >= 'a' && a[i] <= 'z') b[i] = a[i] + 'A' - 'a'; else b[i] = a[i]; IRIS_OPENMP_KERNEL_END }
array.c
#include "icomplex.h" #define MYVERSION COMPLEXARRAYTYPE " from ιlibrary for " LUA_VERSION " / Jan 2019" /** new(n) : return complex array : array->size = n */ static int newarray (lua_State *L) { lua_Integer n = luaL_checkinteger(L, 1); size_t nbytes = sizeof(iComplexNumberArray) + (n - 1)*sizeof(iComplex)...
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 // //===---------------------------...
target_exit_data_release.c
// RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -fopenmp-version=51 // RUN: %libomptarget-run-fail-aarch64-unknown-linux-gnu 2>&1 \ // RUN: | %fcheck-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -fopenmp-version=51 // RUN: %libomptarget-run-fail-powerpc64-ibm-linux-gnu 2>&1 \...
detach_nested_task.c
// RUN: %libomp-compile-and-run // Checked gcc 10.1 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10 // gcc 11 introduced detach clause, but gomp interface in libomp has no support // XFAIL: gcc-11, gcc-12 // clang supports detach clause since ver...
GB_binop__first_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...
soma_clustering.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // 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. // // See the LICENSE file distrib...
gt.scorereads.c
/* * gt.scorereads.c * * Created on: 8 Jul 2013 * Author: heath */ #define GT_SCOREREADS "gt.scorereads" #define GT_SCOREREADS_VERSION "1.0" #include <getopt.h> #include <ctype.h> #ifdef HAVE_OPENMP #include <omp.h> #endif #include <pthread.h> #include "gem_tools.h" #include "gt_pipe_io.h" #define MAP_THR...
condense.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
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 // //===---------------------------...
lib_openmp.c
// This code makes some assumptions on the implementation of // base64_stream_encode_init(), base64_stream_encode() and base64_stream_decode(). // Basically these assumptions boil down to that when breaking the src into // parts, out parts can be written without side effects. // This is met when: // 1) base64_stream_en...
main.c
/* Copyright (C) 2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
GB_unop__identity_uint64_int64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
trmm_x_sky_u_lo_col_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy) { #ifdef COMPLE...
GB_binop__times_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
nvptx_param_translate.c
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-pa...
matProduct2.c
/* OpenMP implementation of matrix multiplication. Each thread takes care a chunk of rows. Compile with gcc -O3 -fopenmp omp_matrixmult.c -o omp_matrixmult */ // Online source: http://users.abo.fi/mats/PP2012/examples/OpenMP/omp_critical.c // permission obtained #include <omp.h> #include <stdio.h> #include <st...
omp_thread_count.h
#ifndef OMP_THREAD_COUNT_H_ /* Include guard */ #define OMP_THREAD_COUNT_H_ #include <omp.h> // Credits: http://stackoverflow.com/a/13328691/140510 int _omp_thread_count(void) { int n = 0; #pragma omp parallel reduction(+:n) n += 1; return n; } #endif // OMP_THREAD_COUNT_H_
ast-dump-openmp-target-teams-distribute-parallel-for.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 parallel for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target teams dis...
GB_binop__rminus_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
test_utils.h
/* * Copyright (c) 2019, 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 ...
interpolation_v4.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
sn3d.h
#ifndef SN3D_H #define SN3D_H #include <cassert> #ifndef __CUDA_ARCH__ // host code #define __artis_assert(e) if (!(e)) { if (output_file != NULL) {(void)fprintf(output_file, "[rank %d] %s:%d: failed assertion `%s' in function %s\n", globals::rank_global, __FILE__, __LINE__, #e, __PRETTY_FUNCTION__);} (void)fpri...
laplace2d-02.c
#include <math.h> #include <string.h> #include <stdio.h> #include <omp.h> #define NN 4096 #define NM 4096 __attribute__((target(mic))) double A[NN][NM]; __attribute__((target(mic))) double Anew[NN][NM]; int main(int argc, char** argv) { const int n = NN; const int m = NM; const int iter_max = 200; co...
nmt_master.c
#include "utils.h" static void purify_generic(nmt_field *fl,flouble *mask,fcomplex **walm0,flouble **maps_in,fcomplex **alms_out) { if(fl->pure_b || fl->pure_e) { nmt_purify(fl,mask,walm0,maps_in,maps_in,alms_out); } else { int im1; for(im1=0;im1<fl->nmaps;im1++) he_map_product(fl->nside,maps_i...
GB_binop__rdiv_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_emult_02_template.c
//------------------------------------------------------------------------------ // GB_emult_02_template: C = A.*B when A is sparse/hyper and B is bitmap/full //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved....
mp.c
/******************************************************************* * * M4RI: Linear Algebra over GF(2) * * Copyright (C) 2014 Martin Albrecht <martinralbrecht@googlemail.com> * * Distributed under the terms of the GNU General Public License (GPL) * version 2 or higher. * * This code...
convolution_3x3_pack4.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 ...
a3.c
#include "omp.h" void axpy(int N, float *Y, float *X, float a) { int i; #pragma omp target enter data map(to:X[0:N]) #pragma omp parallel for for (i = 0; i < N; ++i) Y[i] += a * X[i]; }
PeptideIndexing.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
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)...
ompfor9.c
#include <math.h> void main(int n, int m, float *a, float *b, float *y, float *z) { int i; int j; #pragma omp parallel { #pragma omp for nowait linear(val(i,j):3) collapse(456) ordered(i) for (i=1; i<n; i++) b[i] = (a[i] + a[i-1]) / 2.0; #pragma omp for nowait ordered for (i=0; i<m;...
keystore_fmt_plug.c
/* Java KeyStore cracker. Written by Dhiru Kholia <dhiru at openwall.com> and * Narendra Kangralkar <narendrakangralkar at gmail.com>. * * Input Format: $keystore$target$data_length$data$hash$nkeys$keylength$keydata$keylength$keydata... * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru.kholia at gmail.c...
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 // //===---------------------------...
issue_002.c
#include <stdio.h> #include "assert.h" #include <unistd.h> // 920 fails #define TRIALS 452 // 6000 fails #define N 64*5000 int main() { int fail = 0; double A[N], B[N], C[N]; for (int i = 0; i < N; i++) { A[i] = 0.0; B[i] = 0.0; C[i] = 1.0; } int nte = 32; int tl = 64; int blockSize = tl; ...
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 ...
conv2x2s1_neon.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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 ...
generic_residual_based_bossak_velocity_scalar_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // ...
GB_binop__lor_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-...
GB_unop__identity_int8_fp64.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...
core_zhegst.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include <plasma_core_blas.h> #include "plasma_types.h" #include "core_lapack.h" /************************************************************...
betweennessCentrality.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
Line3D.h
/* * MIT License * * Copyright (c) 2018-2019 Benjamin Köhler * * 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, c...
Example_doacross.4.c
/* * @@name: doacross.4c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.5 */ double foo(int i, int j); void work( int N, int M, double **A, double **B, double **C ) { int i, j; double alpha = 1.2; #pragma omp for collapse(2) ordered(2) for (i = 1; i < N-1; i++) { ...
critical-unrelated.c
/* * critical-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-excepti...
lis_matrix_bsr.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...
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...
memory_simd_fma.c
#include <immintrin.h> #include <stdio.h> void convert_memory_simd_fma(unsigned char *img, int width, int height, int channels, int threads, unsigned char *result) { // 128 bit registers, 32 bit floats => 4 int floats_per_operation = 4; int size = width * height; int pixel_per_thread_unaligned = size ...
mpush3.c
/* C Library for Skeleton 3D Electrostatic OpenMP PIC Code */ /* written by Viktor K. Decyk, UCLA */ #include <stdlib.h> #include <stdio.h> #include <complex.h> #include <math.h> #include "mpush3.h" /*--------------------------------------------------------------------*/ double ranorm() { /* this program calculates a...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__remainder_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...
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...
memory.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) ***************************************...
distortion.h
#ifndef RESAMPLE_H_ #define RESAMPLE_H_ #include <omp.h> #include <torch/extension.h> #include "common/distortion.h" #include "core/distortion.h" #include "enums.h" namespace spherical { namespace cpu { template <typename T, void (*ApplyFunction)(const int64_t, T *, const int64_t, const T, ...
par_relax.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_unop__identity_int32_fp64.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_grid.c
#include "par_grid.h" int main(int argc, char* argv[]){ char* file; /**< Input data file name */ int generations = 0; /**< Number of generations to proccess */ int cube_size = 0; /**< Size of the 3D space */ GraphNode*** graph; /**< Graph representation - 2D array of lists */ ...
GB_reduce_each_index.c
//------------------------------------------------------------------------------ // GB_reduce_each_index: T(i)=reduce(A(i,:)), reduce a matrix to a vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // ...
GB_binop__le_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
rose_v1_private.c
/* * private(including lastprivate) scalars can be recognized by liveness analysis * They are dead (not belong to live-in variable sets) with respect to the loop body * If they are live-out with respect to the loop, it is lastprivate. */ #include <omp.h> int g; void foo() { int i; int x; int a[100]; int ...
GB_unop__identity_uint32_int64.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...
neutral.c
#include "neutral.h" #include "../../comms.h" #include "../../params.h" #include "../../shared.h" #include "../../shared_data.h" #include "../neutral_interface.h" #include <assert.h> #include <float.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #ifdef MPI #include "mpi.h" #endif // Perf...
6665.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...
dmbihamt.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "dmbihamt.kernel_inc.h" int openmp_dm_calc_hamt_dual_init (openmp_pscmc_env * pe ,openmp_dm_calc_hamt_dual_struct * kerstr ){ return 0 ;} void openmp_dm_calc_hamt_dual_get_struct_len (size_t * ...
GB_unop__identity_fc32_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...
gen_input.c
#include <time.h> #include <stdlib.h> #include <stdio.h> #ifdef FP_NUMBER typedef double FP_NUMBER; #else typedef float FP_NUMBER; #endif #define GET_RAND_FP \ ((FP_NUMBER)rand() / ((FP_NUMBER)(RAND_MAX) + (FP_NUMBER)(1))) char L_FNAME[32], U_FNAME[32], A_FNAME[32]; int main(int argc, char** argv) { int i, j, k,...
par_forloop.h
#pragma omp parallel for
sw3d_traco16.h
void sw_traco3d(){ printf("- traco [16x16x16x16] - \n\n"); int c1,c2,c3,c4,c5,c6,c7,c8,c9,c11,c10,c12,c13,c14,c15; #pragma omp parallel for shared(N) private(c1, c2,c3,c4,c5,c6,c7,c8,c9,c11,c10,c12,c13,c14,c15) for( c1 = 0; c1 <= (N - 1)/16; c1 += 1) for( c3 = 0; c3 <= (N - 1) / 16; c3 += 1) for( c5 = 0; c5 <=...
bml_scale_ellpack_typed.c
#include "../../typed.h" #include "../../macros.h" #include "../blas.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_parallel.h" #include "../bml_scale.h" #include "../bml_types.h" #include "bml_allocate_ellpack.h" #include "bml_copy_ellpack.h" #include "bml_scale_ellpack.h" #include "bml_ty...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
gimple-pretty-print.c
/* Pretty formatting of GIMPLE statements and expressions. Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> and Diego Novillo <dnovillo@google.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms o...
GB_unop__identity_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...
ofmo-twoint-buffer.c
/** * @file ofmo-twoint-buffer.c * 各タイプの二電子積分を計算して、バッファに保存する関数群。 * */ /** * @defgroup integ-twoint-buffer 2電子積分を計算してバッファに保存する * buffered direct SCF法において、決められた容量を持つバッファに * 貯められるだけ2電子積分を計算して、保存する関数群。 * * 各タイプ(2011/06/14現在、(ss,ss)〜(dd,dd)の21種類)の二電子積分 * を計算して、計算した結果を対応する添字とともにバッファに保存する。 * 基本的には、バッファがいっぱいになるまで計算する...
GeneralBlockPanelKernel.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> // // Eigen 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...
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 ...
par_rap.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_unaryop__abs_bool_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...
mkl_util.h
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
is.c
/************************************************************************* * * * N A S P A R A L L E L B E N C H M A R K S 3.3 * * * * ...
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)...
GxB_Descriptor_get.c
//------------------------------------------------------------------------------ // GxB_Descriptor_get: get a field in a descriptor //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier...
time_multi.c
///////////////////////////////////////////////////////////////////////////// // einspline: a library for creating and evaluating B-splines // // Copyright (C) 2007 Kenneth P. Esler, Jr. // // Released under the BSD-3-clause license // ////////...
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...
diamond.h
// This is the AutoMine/GraphZero implementation std::cout << "Running the AutoMine/GraphZero implementation\n"; #pragma omp parallel for schedule(dynamic,1) reduction(+:counter) for (vidType v0 = 0; v0 < g.V(); v0++) { auto y0 = g.N(v0); auto y0f0 = bounded(y0,v0); for (vidType idx1 = 0; idx1 < y0f0.size(); idx1...
mandelbrot.c
/* To compile: gcc -O3 -o mandelbrot mandelbrot.c png_util.c -I. -lpng -lm -fopenmp Or just type: module load gcc make To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads): ./mandelbrot 4096 4096 1 */ #include <math.h> #include <stdio.h> #include <stdlib...
jacobi-ompacc-opt2.c
// Liao, 7/9/2014, add collapse() inside jacobi() #include <stdio.h> #include <math.h> #include <assert.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif // Add timing support #include <sys/time.h> double time_stamp() { struct timeval t; double time; gettimeofday(&t,(struct timezone*)NUL...
is_initial_device.c
// REQUIRES: powerpc-registered-target // RUN: %clang_cc1 -verify -fopenmp -x c -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-unknown-unknown \ // RUN: -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -fopenmp -x ir -triple powerpc64le-unknown-unknown -emit-llvm \ // RUN: ...
GB_binop__bshift_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-...
task_dep_iterator2.c
#include<stdio.h> void set_an_element(int*p, int val) { *p = val; } void print_all_elements(int*v, int n) { int i; for (i = 0; i < n; ++i) { printf("%d, ", v[i]); } printf("\n"); } void parallel_computation(int n) { int v[n]; #pragma omp parallel #pragma omp single { ...
tacacs_plus_fmt_plug.c
/* * Format for cracking TACACS+ hashes. * * https://insinuator.net/2015/06/tacacs-module-for-loki/ * * This software is Copyright (c) 2015, Daniel Mende <dmende [at] ernw.de> and * Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>, and it is hereby * released to the general public under the following t...
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...