source
stringlengths
3
92
c
stringlengths
26
2.25M
target_update_array_extension.c
// -------------------------------------------------- // Check 'to' and extends before // -------------------------------------------------- // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu \ // RUN: -fopenmp-version=51 -DCLAUSE=to -DEXTENDS=BEFORE // RUN: %libomptarget-run-fail-aarch64-unknown-linux-gnu 2>&1...
convolution_1x1_pack4_bf16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 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 ...
par_2s_interp.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) **************************************...
FFT.h
#pragma once #include <vector> #include <algorithm> #ifdef MULTICORE #include <omp.h> #endif #include <libff/algebra/fields/field_utils.hpp> #include <libfqfft/tools/exceptions.hpp> /** * Let F_p denote a field of prime order p. * The Discrete Fourier Transform (DFT) of a vector 'a[0...(n-1)]' where n = 2^k and a...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
task1.c
#include <stdio.h> #include <time.h> #include <omp.h> #define N 1024 int main() { int i, k =10; int a[10] = {0,1,2,3,4,5,6,7,8,9}; int c[1000]; int b[N][N]; int loc = -1; int tmp= -1; double secs = 0; clock_t begin = clock(); for (i =0; i<k; i++){ b[i][k] = b[a[i]][k]; ...
CALPHADFreeEnergyFunctionsBinary3Ph2Sl.h
#ifndef included_CALPHADFreeEnergyFunctionsBinary3Ph2Sl #define included_CALPHADFreeEnergyFunctionsBinary3Ph2Sl #include "CALPHADSpeciesPhaseGibbsEnergy.h" #include "InterpolationType.h" #include "Phases.h" #include "datatypes.h" #include "functions.h" #include <boost/property_tree/ptree.hpp> #include <cassert> #inc...
test.c
#include <stdio.h> #include "../utilities/check.h" #define N 100 int main() { check_offloading(); int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; // offload #pragma omp target map(tofrom: a[0:100]) { int k, n; #pragma omp simd private(n) fo...
matrix.c
#include "matrix.h" #include <stdlib.h> #include <stdio.h> #include <assert.h> #include <string.h> #include <math.h> #include <stdbool.h> // --- PRIVATE START int _matrix_index_for(Matrix *m, int row, int col) { return col * m->rows + row; } // --- PRIVATE END Matrix *matrix_raw(int rows, int cols) { Matrix *matrix...
SENR-em.c
/** * Copy of SENR.c, but with file I/O removed, * and run arguments explicitly set. */ #include "SENR.h" #include <emscripten.h> EMSCRIPTEN_KEEPALIVE void print_logo() { // Print the SENR logo. #include "Logo.c" } // Global variables paramstruct params; REAL *x1G, *x2G, *x3G; REAL *gfs_n, *gfs_1, *gfs_np1, *gfs_...
GB_unop__identity_int16_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...
dropout-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 ...
declare_reduction_messages.c
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s int temp; // expected-note 6 {{'temp' declared here}} #pragma omp declare reduction // expected-error {{expected '(' after 'declare reduction'}} #pragma ...
mainMIX.c
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.c * Author: Nikolaos Mamais(2371),Nikolaos Bafatakis(2383),Panagiotis Maroylidis(2431) * * Created on March 19,...
GB_unaryop__lnot_fp64_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
parallel.h
/** * @file parallel.h This file contains the functionality for parallel operation * @author TPOC: contact@palisade-crypto.org * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, ...
DRB048-firstprivate-orig-no.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
parallel.c
/* * Copyright (c) 2014 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, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. */ #include <bomp_internal.h> ...
omp-parallel-2.c
#include <omp.h> #define THREADS 2 int main(void) { #pragma omp parallel num_threads(THREADS) { // pass } #pragma omp parallel num_threads(THREADS*4) { // pass } #pragma omp parallel num_threads(THREADS*2) { // pass } }
mlp_mnist.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
for_simd.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // XFAIL: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #include "callback.h" #include <omp.h> int main() { int y[] = {0,1,2,3}; int i; #pragma omp for simd for (i = 0; i < 4; i++) { y[i]++; } // Check if libomp supports the callbacks for this ...
residual_based_pseudo_static_displacement_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_RESIDUAL_PSEUDO_STATIC_DISPLACEMENT_SCHEME ) #de...
hola.c
/* gcc -fopenmp -O2 src/hola.c -o bin/hola Para compilar sin usar openmp y ver que no se ejecutan en paralelo es código portable porque nos sirve tanto de forma paralela como de forma normal gcc -O2 src/hola.c -o bin/hola */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num()...
sunmd5_fmt_plug.c
/* * First cut, which was oSSL only, and done in 2 source files, by * Bartavelle (please change to proper cite). * Corrections, and re-write into SSE2, JimF. * * This software was written by Bartavelle <cite> and JimF * jfoug AT cox dot net, in 2012 for CMIYC-12. No copyright is claimed, * and the software is h...
MatrixVector.c
/****************************************************************************** * Example - Matrix-vector multiplication - C/C++ Version * FILE: MatrixVector.c * DESCRIPTION: * This example multiplies matrix A with a vector element and * stores the summed products in vector c. **********************************...
upsample_nearest_op.h
/** * Copyright (c) 2016-present, Facebook, Inc. * * 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 ...
reduction.c
#include <stdio.h> #include <stdlib.h> #define N 100 int main(int argc, char *argv[]) { int i; int sum = 0; double A[N]; for (i = 0; i < N; i++) { A[i] = 1; } #pragma omp parallel for reduction(+:sum) for (i = 0; i < N; i++) { sum = sum + A[i]; } printf("sum = %d\n", sum); return EXIT_...
aggregate_ops.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
omp_coarse.h
/* Copyright 2014, Jernej Kovacic Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software ...
filter_c99.c
#ifdef __ICC #include <omp.h> #endif #include <math.h> /** * Computes a 2D gaussian filter with a 5x5 stencil accross the YZ-plane. */ void filter_c99(double *data_new, const double *data_old, int dim_x, int dim_y, int dim_z) { // cast types here to maintain a C++-compatible signature: double (* const restr...
GB_binop__pair_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unaryop__minv_uint16_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...
tool_available_search.c
// RUN: %clang %flags -shared -fPIC %s -o %T/first_tool.so // RUN: %clang %flags -DTOOL -DSECOND_TOOL -shared -fPIC %s -o %T/second_tool.so // RUN: %clang %flags -DTOOL -DTHIRD_TOOL -shared -fPIC %s -o %T/third_tool.so // RUN: %libomp-compile -DCODE && env OMP_TOOL_LIBRARIES=%T/non_existing_file.so:%T/first_tool.so:%T/...
GB_unop__identity_fc32_int32.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...
convolution_sgemm.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 // //...
kmp_stats.h
#ifndef KMP_STATS_H #define KMP_STATS_H /** @file kmp_stats.h * Functions for collecting statistics. */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license...
GB_unop__cosh_fc64_fc64.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...
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 // //===---------------------------...
rom_residuals_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: RAUL BRAVO // #if !defined( ROM_RESIDUALS_UTI...
icv-1.c
#include <omp.h> #include <stdlib.h> int main (void) { int err = 0; omp_set_num_threads (4); if (omp_get_max_threads () != 4) abort (); #pragma omp parallel reduction(|: err) num_threads(1) { if (omp_get_max_threads () != 4) err |= 1; omp_set_num_threads (6); #pragma omp task if(0) sha...
parallel_fann.c
/* * parallel_FANN.c * Author: Alessandro Pietro Bardelli */ #ifndef DISABLE_PARALLEL_FANN #include "parallel_fann.h" #include <omp.h> FANN_EXTERNAL float FANN_API fann_train_epoch_batch_parallel(struct fann *ann, struct fann_train_data *data, const unsigned int threadnumb) { fann_reset_MSE(ann); /*vector<str...
obscuration.h
#ifndef batoid_obscuration_h #define batoid_obscuration_h #include <cstdlib> // for size_t namespace batoid { #if defined(BATOID_GPU) #pragma omp declare target #endif class Obscuration { public: Obscuration(); virtual ~Obscuration(); virtual bool contains(double x,...
GB_unaryop__minv_fp64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
main.c
#include <unistd.h> #include <omp.h> #include <stdlib.h> #include <stdio.h> #include <string.h> int N_BUCKETS; struct Bucket { int* array; size_t n_elem; size_t max_elem; }; struct Bucket* make(size_t max){ struct Bucket* block_arr = malloc(sizeof(struct Bucket)); block_arr->array = malloc(size...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
hp16.c
/* 16-bit hash prospector * * Unlike the 32-bit / 64-bit prospector, this implementation is fully * portable and will run on just about any system. It's also capable of * generating and evaluating 128kB s-boxes. * * Be mindful of C integer promotion rules when doing 16-bit operations. * For instance, on 32-bit i...
fields_values.c
// RUN: %libomp-compile-and-run // REQUIRES: !abt #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #define XSTR(x) #x #define STR(x) XSTR(x) #define streqls(s1, s2) (!strcmp(s1, s2)) #define check(condition) \ if (!(condition)) { ...
GraphBLAS.h
//------------------------------------------------------------------------------ // GraphBLAS.h: definitions for the GraphBLAS package //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identif...
laplace2d.c
/* * Copyright 2017 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 ...
detector.c
#include "darknet.h" static int coco_ids[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, ...
ODME.h
/* Portions Copyright 2019-2021 Xuesong Zhou and Peiheng Li, Cafer Avci * If you help write or modify the code, please also list your names here. * The reason of having Copyright info here is to ensure all the modified version, as a whole, under the GPL * and further prevent a violation of the GPL. * * More about...
pr27416.c
/* PR middle-end/27416 */ /* { dg-do compile } */ void foo (void) { int i = 0, j = 0; #pragma omp for firstprivate (j) /* { dg-error "is private in outer context" } */ for (i = 0; i < 10; i++) j++; } int bar (void) { int i, j; #pragma omp for lastprivate (j) /* { dg-error "is private in outer context" } */ ...
nn_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...
GB_binop__isne_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-...
diagonalize_matrix_typed.c
#include "bml.h" #include "../typed.h" #include "../C-interface/dense/bml_getters_dense.h" #include <complex.h> #include <math.h> #include <stdlib.h> #include <stdio.h> #if defined(SINGLE_REAL) || defined(SINGLE_COMPLEX) #define REL_TOL 1.2e-5 #else #define REL_TOL 1e-11 #endif int TYPED_FUNC( test_diagonalize)...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
conv5x5s2_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 ...
target_data_array_extension_at_exit.c
// -------------------------------------------------- // Check extends before // -------------------------------------------------- // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu \ // RUN: -fopenmp-version=51 -DEXTENDS=BEFORE // RUN: %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 \ // RUN: | %fcheck-aarch...
nco_rgr.c
/* $Header$ */ /* Purpose: NCO regridding utilities */ /* Copyright (C) 2015--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO under the terms of the 3-Clause BSD License with exceptions described in the LICENSE file */ #inc...
matmul_1d_openmp.c
#define MATMUL_1D_OPEN_MP #ifdef MATMUL_1D_OPEN_MP /* Matrices are represented as 1-D arrays in memory. * That means they are contiguous in memory. * Minimum dimension is 1, not 0, and internal dimensions must match. */ #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <str...
integrator.c
#define _USE_MATH_DEFINES #include <inttypes.h> #include <string.h> #include <assert.h> #include <stdio.h> #include <math.h> #include <stdlib.h> #include "io.h" #include "storage.h" #include "integrator.h" #include "cmontecarlo.h" #include "omp_helper.h" #define NULEN 0 #define LINELEN 1 #define PLEN 2 #define...
kernel_cpu.c
/* Copyright (c)2008-2011 University of Virginia All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted without royalty fees or other restrictions, provided that the following conditions are met: * Redistributions of source code must retain the above ...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__iseq_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-...
stencil.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 disclaim...
stTree.h
#ifndef _STTREE_H__ #define _STTREE_H__ #include <cassert> #include <vector> #include <algorithm> #include <fstream> #include <iostream> #include <map> #include <utility> #include <util.h> #include "binTree.h" using namespace std; /* ************************************************** */ class stNode; //class binDa...
Par-08-ParallelForParallelFor.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {0, 0, 0, 0}; #pragma omp parallel { #pragma omp for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; } } #pragma omp parallel for for (int j = 0; j < 4; ++j) { b[j] = b[j] + a[j]; } return 0; }
InternalTransferCircuit.h
#ifndef _INTERNAL_TRANSFER_CIRCUIT_H_ #define _INTERNAL_TRANSFER_CIRCUIT_H_ #include "Circuit.h" #include "../Utils/Constants.h" #include "../Utils/Data.h" #include "../Utils/Utils.h" #include "../Gadgets/AccountGadgets.h" #include "../Gadgets/TradingHistoryGadgets.h" #include "ethsnarks.hpp" #include "utils.hpp" us...
zbjac2.c
#include "zbjac2.h" #include "dzjac2.h" #ifdef Z8JAC2_PARAMS #error Z8JAC2_PARAMS already defined #else /* !Z8JAC2_PARAMS */ #define Z8JAC2_PARAMS \ DZJAC2_PARAMS; \ register const VD huge = _mm512_set1_pd(DBL_MAX); \ register const VD be...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mca-api-openmp.c
/* A simple program to test MCA API integration with OpenMP 3 tasks instead of hard-core pthreads Ronan.Keryell@wild-systems.com */ #include "mca-api-common/smecy-mca-common.h" enum { PRODUCER_DOMAIN = 42, PRODUCER_NODE = 3, CONSUMER_DOMAIN = 42, CONSUMER_NODE = 7, SEND_MSG_PORT = 11, RECEIVE_MSG_...
3D.c
#include <assert.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <time.h> #define STR_SIZE (256) #define MAX_PD (3.0e6) /* required precision in degrees */ #define PRECISION 0.001 #define SPEC_HEAT_SI 1.75e6 #define K_SI 100 /* capacitance fitting factor *...
parallel.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 thread; if(argc < 2) { fprintf(stderr,"\nFalta nº de thread \n"); exit(-1); } thread = atoi(argv[1]); #pragma omp parallel ...
mesh.h
/////////////////////////////////////////////////////////////////////////////// // This file is part of ShapeOp, a lightweight C++ library // for static and dynamic geometry processing. // // Copyright (C) 2014 Sofien Bouaziz <sofien.bouaziz@gmail.com> // Copyright (C) 2014 LGG EPFL // // This Source Code Form is subje...
GB_binop__lt_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
graph_generator.xmt.c
******************************************************************************** * Cray Compilation Report * Source File: generator/graph_generator.c * Program Library: xmt-csr/xmt-csr.pl * Module: graph_generator.o ******************************************************************************** ...
mlp_mnist_f32.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
reduction.h
// Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. #ifndef __DACE_REDUCTION_H #define __DACE_REDUCTION_H #include <cstdint> #include "types.h" #include "vector.h" #include "math.h" // for ::min, ::max #ifdef __CUDACC__ #include "../../../external/cub/cub/device/device_segmented_reduce....
read_hdf5.c
#include "read_file.h" #include "libast.h" #include <stdint.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <ctype.h> #include "hdf5.h" static int read_col(hid_t group_id, char const *pos, real **data, hsize_t *num) { const int ndims = 1;//H5Sget_simple_extent_ndims(data_space); hsize_...
SpatialGridSamplerBilinear.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialGridSamplerBilinear.c" #else #undef MIN #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) ) static inline void THNN_(SpatialGridSamplerBilinear_shapeCheck) (THTensor *input, THTensor *grid, THTensor *gradOutput) { THNN_ARGCHECK(input->nDimension == 4, 2, i...
mainMIX.c
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.c * Author: Nikolaos Mamais(2371),Nikolaos Bafatakis(2383),Panagiotis Maroylidis(2431) * * Created on March 19,...
Kernel_3d_ZDG.h
#ifndef KRIPKE_KERNEL_3D_ZDG_H__ #define KRIPKE_KERNEL_3D_ZDG_H__ #include<Kripke/Kernel.h> #include<Grid.h> class Kernel_3d_ZDG : public Kernel { public: typedef std::vector<std::vector<double>> result_type; // Grid is needed to access metadata (e.g. gd_sets) stored on it. Grid_Data* grid_data; int group_se...
decorate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
main.c
/* Heat equation solver in 2D. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "heat.h" #include <omp.h> int main(int argc, char **argv) { double a = 0.5; //!< Diffusion constant field current, previous; //!< Current and previous temperature fields ...
deflation_utils.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !...
ResultHandler.h
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * Structures that collect search results from distance computations */ #pragma once #include <faiss/impl/AuxIndexStructures...
maxnum.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main() { int max_threads, scalar_num_threads; int *num_threads; omp_set_num_threads(128); // We obtain the default number of threads in the target region #pragma omp target map(from:max_threads) { max_threads = omp_get_max_threads(); } num_...
copyprivate-clauseModificado.c
#include <stdio.h> #include <omp.h> int main(){ int n= 9, i, b[n]; for(i=0;i<n;i++) b[i]=-1; #pragma omp parallel { int a; #pragma omp single { printf("\nIntroduce valor de inicialización de a:"); scanf("%d",&a); printf("\nSingle ejectuada por el thread %d\n",omp_get_thread_num()); } #p...
TV4colorCPTV.c
// parallel color total variation - A. Chambolle & T. Pock, // Pauline Tan, Samuel Vaiter [partial descent steps] // typical compilation: // cc -std=gnu99 -fopenmp -O -DVERB1 -DNITD=6 -o [your executable] TV4colorCPTV.c [your main.c] -lm // possible flags -DVARYING -DNITD=# -DCONSTANT -DVERB1 -DVERB2 // -DNITD=5 : numb...
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...
matmult_omp_explicit2.c
/* Matrix multiplication example OpenMP version, explicit domain decomposition with reduction clause Jim Teresco, CS 338, Williams College, CS 341, Mount Holyoke College Sun Feb 23 18:54:41 EST 2003 Updated for CSIS-335, Siena College, Fall 2021 */ /* header files needed for printf, gettimeofday, st...
GB_subassign_15.c
//------------------------------------------------------------------------------ // GB_subassign_15: C(I,J)<!M> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier...
comm.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 ...
omp-fibonacci.c
#include <stdio.h> #include <omp.h> int f(int n) { int i, j; if (n<2) return n; #pragma omp task shared(i) firstprivate(n) i = f(n-1); #pragma omp task shared(j) firstprivate(n) j = f(n-2); #pragma omp taskwait return i+j; } int main(int argc, char *argv[]) { if (argc ...
Array3D.h
// // Array3D.h // Copyright (c) 2016 Pixel Grammar, LLC // author: Douglas Creel // #ifndef ARRAY3D_H #define ARRAY3D_H #include <cassert> #include <iostream> template <typename T> class Array3D { public: Array3D() { } ~Array3D() { } void init(int w, int h, int d, T val) { m...
absval_hcl_arm.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
relu1_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...
stat_ops_transition_amplitude.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "stat_ops.h" #include "utility.h" #include "constant.h" CTYPE transition_amplitude_multi_qubit_Pauli_operator_XZ_mask(ITYPE bit_flip_mask, ITYPE phase_flip_mask, UINT global_phase_90rot_count, UINT pivot_qubit_index, const CTYPE* sta...
kCDensestCmpSync.c
/* Info: This program corresponds to "Sim-kClist++" in the PVLDB 2020 paper. Feel free to use these lines as you wish. This program iterates over all k-cliques for many rounds to run the Frank- Wolfe based algortihm using linear memory and report approximate maximum k-clique density. This program can han...