source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_binop__lt_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... |
vecadd_opt1.c | #include <stdio.h>
#include <omp.h>
#include "timer.h"
// large enough to force into main memory
#define ARRAY_SIZE 80000000
static double a[ARRAY_SIZE], b[ARRAY_SIZE], c[ARRAY_SIZE];
void vector_add(double *c, double *a, double *b, int n);
int main(int argc, char *argv[]){
#pragma omp parallel
if (omp_get_... |
hmvm_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include "hacapk.h"
// ######## ######## ######## ########
void hmvm_omp_1
(double *zau, const matrix *mat, const double *zu)
{
#pragma omp parallel
{
int ip,il,it;
int ndl,ndt,nstrtl,nstrtt,kt,itl,itt,ill;
double *zaut, *zbut;
int ls,... |
target_parallel_for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for'}}
#pragma omp target parallel for
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for'}}
... |
sample_sort.c |
/*********************************************************************
samplesort.c: source: http://www.cse.iitd.ernet.in/~dheerajb/MPI/codes/day-3/c/samplesort.c
Objective : To sort unsorted integers by sample sort algorithm
Write a MPI program to sort n integers... |
GB_binop__isgt_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
omp_ex_30.c | #include <stdio.h>
#include <omp.h>
/*
MIT License
Copyright (c) 2019 NOUREDDINE DAGHBOUDJ
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 ri... |
state.h | #pragma once
#ifndef STATE_H
#define STATE_H
#include "logger.h"
//#include "pop.h"
struct state{
vector<long long> ptevals; //number of instruction evals
vector<long long> numevals; //number of evals on each thread
vector<int> genevals; //total evals for each generation
vector <int> fit_best;
vector <float> fit... |
diamond.h | // This code is modified from AutoMine and GraphZero
// Daniel Mawhirter and Bo Wu. SOSP 2019.
// AutoMine: Harmonizing High-Level Abstraction and High Performance for Graph Mining
#pragma omp parallel for schedule(dynamic,1) reduction(+:counter)
for (vidType v0 = 0; v0 < g.V(); v0++) {
auto y0 = g.N(v0);
for (vidT... |
countersparallel.c | //counters parallel version HPC Felix Feliu
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <memory.h>
#include <malloc.h>
#include <papi.h>
#include <omp.h>
#define SIZE 1000
int main(int argc, char** argv) {
float matrixa[SIZE][SIZE], matrixb[SIZE]... |
navierstokes_avx.h | //*****************************************************************************
// Title : src/equation_avx/navierstokes_avx.h
// Author : Tanabe Yuta
// Date : 2021/01/24
// Copyright : (C)2021 TanabeYuta
//*****************************************************************************
#... |
weights.c |
/*
Author: Mohammed Ahmed Al Farhan
Email: mohammed.farhan@kaust.edu.sa
Compute the weights for each node for the weighted least square
*/
#include <stdio.h>
#include <stdint.h>
#include <omp.h>
#include <math.h>
#include "inc/geometry.h"
#include "inc/allocator.h"
#include "inc/msh/mesh.h"
static inline voi... |
GB_reduce_to_scalar_template.c | //------------------------------------------------------------------------------
// GB_reduce_to_scalar_template: s=reduce(A), reduce a matrix to a scalar
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// ... |
pfmg3_setup_rap.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... |
Normals.h | /* License Information
*
* Copyright (C) ONERA, The French Aerospace Lab
* Author: Alexandre BOULCH
*
* 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, includin... |
threshold.c | /* Copyright 2014. The Regents of the University of California.
* Copyright 2015-2017. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2015-20... |
bs_omp.c |
#include <assert.h>
#include <getopt.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "shared.hpp"
#include "timer.h"
#define DTYPE uint64_t
/*
* @brief creates a "test file" by filling a bufferwith values
*/
void... |
NLmean_propag2dirs_sspacing3_tspacing6_sim12_acc12_neighbor5_tau0100.c | /*
* compile: gcc -O3 -std=c99 -o [filename_out] -fopenmp [filename].c -lm -I/usr/include/netcdf-3/ -L/usr/lib64/ -lnetcdf -lnetcdf_c++
* in the terminal: export OMP_NUM_THREADS=3
*/
#include<stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <netcdf.h>
#include <omp.h>
/* This is the name ... |
GraphBLAS.h | //------------------------------------------------------------------------------
// GraphBLAS.h: definitions for the GraphBLAS package
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identif... |
protosplittest.c | #include "protosplittest.h"
void parallelize(split_fn fn, void * output1, void * output2, void * output3, uint32_t * input, int leneach, void * pd1, void* pd2) {
#pragma omp parallel num_threads(3)
{
//OpenMP seems to get along with obliv-c just fine, so long as obliv-c only uses the master thread.
#pragma omp m... |
trsm_x_sky_n_hi_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#include <memory.h>
#ifdef _OPENMP
#include <omp.h>
#endif
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, cons... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
kernel_cos.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @generate NDIM -> n 1 2 3 4
* Generate different functions fo... |
omp_single_private_nothreadprivate.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
int test_omp_single_private()
{
int nr_threads_in_single;
int result;
int nr_iterations;
int i;
nr_threads_in_single = 0;
nr_iterations = 0;
result = 0;
#pragma omp parallel private(i)
{
int myresult = 0;
int myit... |
GB_unop__signum_fp64_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... |
meta.h | #include <iostream>
#include <vector>
#include <string>
#include <omp.h>
#include "formula.h"
using namespace std;
template<int N>
class formula_generator{
public:
static inline void EXEC(ResultsWriter & writer, int elcount, int minimum[], int maximum[], double masses[], int *current, double pre_mass, double loMas... |
mph.h | #ifndef PERFECTHASH_H_
#define PERFECTHASH_H_
#include <iostream>
#include <cstdint>
#include <cstring>
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include <ctype.h>
#include <stdlib.h>
#include <bf.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
extern "C" {
#include <cmph.h>
}
#include "../seq/types.... |
middle2r.c | /*
* Date: 11 December 2015
* Contact: Thomas Peyrin - thomas.peyrin@gmail.com
*/
/*
* Simmulation of boomerang analysis for Skinny
* Date: March 21, 2020
* Author: Hosein Hadipour
* Contact: hsn.hadipour@gmail.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#i... |
close_manual.c | // RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
#include <omp.h>
#include <stdio.h>
// -------... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#ifdef _OPENMP
#include <omp.h>
#else
int omp_get_max_threads () { return 1; }
#endif /* _OPENMP */
#include "ScaleME.h"
#include "precision.h"
#include "itsolver.h"
#include "measure.h"
#include "direct.h"
#include "co... |
GB_add_phase0.c | //------------------------------------------------------------------------------
// GB_add_phase0: find vectors of C to compute for C=A+B or C<M>=A+B
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
libperf.c | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
* Copyright (C) The University of Tennessee and The University
* of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED.
* Copyright (C) ARM Ltd. 2017-2021... |
matmulomp.c | #include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <omp.h>
float **A=NULL;
float **B=NULL;
float **S=NULL;
float **P=NULL;
void createMatrix(uint32_t n){
uint32_t i=0;
uint32_t j=0;
A=(float **)calloc(n,sizeof(float *));
B=(float **)calloc(n,sizeof(float *));
S=(float **)calloc(n,sizeof(float ... |
transform.h | /*!
* Copyright 2018 XGBoost contributors
*/
#ifndef XGBOOST_COMMON_TRANSFORM_H_
#define XGBOOST_COMMON_TRANSFORM_H_
#include <dmlc/omp.h>
#include <dmlc/common.h>
#include <xgboost/data.h>
#include <utility>
#include <vector>
#include <type_traits> // enable_if
#include "xgboost/host_device_vector.h"
#include "x... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
SpatialSubSampling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialSubSampling.c"
#else
static int nn_(SpatialSubSampling_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id));
int kW = luaT_getfieldcheckint(L, 1, "kW");
int kH = luaT_getfieldcheckint(L, 1, "kH");
int dW = luaT_... |
LAGraph_bfs_pushpull.c | //------------------------------------------------------------------------------
// LAGraph_bfs_pushpull: push-pull breadth-first search
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2020 LAGraph Contributors.
... |
DRB063-outeronly1-orig-no.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... |
edge_miner.h | #ifndef EDGE_MINER_H
#define EDGE_MINER_H
#include <mutex>
#include "miner.h"
#include "domain_support.h"
typedef std::pair<unsigned, unsigned> InitPattern;
typedef QuickPattern<EdgeEmbedding, ElementType> QPattern;
typedef CanonicalGraph<EdgeEmbedding, ElementType> CPattern;
typedef std::unordered_map<QPattern, Frequ... |
gmm_uborder_fun.c | /*
*
* gmm_uborder_fun.c
*
* Code generation for function 'gmm_uborder_fun'
*
*/
/* Include files */
#include "gmm_uborder_fun.h"
#include "fetch_thresholds.h"
#include "fetch_thresholds_emxutil.h"
#include "rt_nonfinite.h"
#include <math.h>
/* Function Definitions */
double __anon_fcn(const double mu[2], const... |
portablegl.h | /*
PortableGL 0.95 MIT licensed software renderer that closely mirrors OpenGL 3.x
portablegl.com
robertwinkler.com
Do this:
#define PORTABLEGL_IMPLEMENTATION
before you include this file in *one* C or C++ file to create the implementation.
If you plan on using your own 3D vector/matrix library rather than crsw_m... |
alignedattribute.c | #include <stdio.h>
void write_index(int*a, int N){
int*aptr __attribute__ ((aligned(64))) = a; // THIS FAILS
// int*aptr = a; // THIS WORKS
printf(" ===> Encounter target teams distribute par for map tofrom:aptr\n");
#pragma omp target teams distribute parallel for map(tofrom: aptr[0:N])
for(int i=0;i<N;i+... |
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 ... |
GB_binop__bset_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... |
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)
#... |
convolution_3x3_pack1to4_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 ... |
rmse.c | /*************************************************************************/
/** File: rmse.c **/
/** Description: calculate root mean squared error of particular **/
/** clustering. **/
/** Author: Sang-Ha Lee **/
/** University of Virginia.... |
ccv_bbf.c | #include "ccv.h"
#include "ccv_internal.h"
#include <sys/time.h>
#ifdef HAVE_GSL
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#endif
#ifdef USE_OPENMP
#include <omp.h>
#endif
const ccv_bbf_param_t ccv_bbf_default_params = {
.interval = 5,
.min_neighbors = 2,
.accurate = 1,
.flags = 0,
.size = {
24,
2... |
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... |
softmax_layer.c | #include "softmax_layer.h"
#include "blas.h"
#include "dark_cuda.h"
#include "utils.h"
#include "blas.h"
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#define SECRET_NUM -1234
void softmax_tree(float *input, int batch, int inputs, float temp, tree *hierarchy, float *... |
matmul_int.c | /*
* Square matrix multiplication
* A[N][N] * B[N][N] = C[N][N]
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <malloc.h>
#define N 1024
//#define N 16
// read timer in second
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (d... |
1.race5.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N];
#pragma omp parallel for schedule(guided)
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
A[i][j] = A[i - 1][j - 1];
}
// CHECK: Data Race detected
// END
|
atomic_read_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -target-cpu core2 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -include-pch %t ... |
sormlq.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zunmlq.c, normal z -> s, Fri Sep 28 17:38:04 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
luks_fmt_plug.c | /* luks.c
*
* hashkill - a hash cracking tool
* Copyright (C) 2010 Milen Rangelov <gat3way@gat3way.eu>
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as p... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
resource_strings.h | #pragma once
#include <torch/csrc/jit/fuser/config.h>
#if USE_CPU_FUSER
#include <torch/csrc/jit/code_template.h>
namespace torch { namespace jit { namespace fuser { namespace cpu {
/*with type_as not checking type of its input, a fusion group can have non-fp32 tensor as input.
Correct code for this case is generate... |
c-parser.c | /* Parser for C and Objective-C.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Parser actions based on the old Bison parser; structure somewhat
influenced by and fragments based on the C++ parser.
This file... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GxB_UnaryOp_ztype_name.c | //------------------------------------------------------------------------------
// GxB_UnaryOp_ztype_name: return the type_name of z for z=f(x)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Licen... |
revert_kernel_c.c | /*Crown Copyright 2012 AWE.
*
* This file is part of CloverLeaf.
*
* CloverLeaf is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Clo... |
knn_utils.h | /*
*
* Copyright (c) 2019, BIOVAULT (Leiden University Medical Center, Delft University of Technology)
* 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 mu... |
optimizer.c | /*
*
*/
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "cint.h"
#include "cvhf.h"
#include "optimizer.h"
#define MAX(I,J) ((I) > (J) ? (I) : (J))
int int2e_sph();
int GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
int *atm, int n... |
run_sign_verify.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 may not use ... |
displacement_op_cuda.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... |
pfmg2_setup_rap.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... |
vel_pr_criteria.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#ifndef KRATOS_VEL_PR_CRITERIA_... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You... |
multigrid.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
//#include "multigrid.h"
#include "utils.h"
// This is a readaptation of Martin J. White's code, available at https://github.com/martinjameswhite/recon_code
// C++ dependencies have been removed, solver parameters e.g. niterations exposed
// Grid can be non-cubic... |
phantom_g5.c | #include <stdio.h>
#include <math.h>
#include <assert.h>
#include <immintrin.h>
#include <xmmintrin.h>
#include <emmintrin.h>
#include "avx_type.h"
#include "gp5util.h"
#define NUM_PIPE (4)
#ifndef MAXDEV
#define MAXDEV (128)
#endif /* MAXDEV */
static double Eps;
static struct Ptcl_Mem {
Ipdata iptcl;
Fodata ... |
GB_binop__le_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
CPUImplQPU.h | /*
Copyright (c) 2017-2020 Origin Quantum Computing. All Right 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 la... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can ob... |
Example3a.c | #include<stdio.h>
int main(){
int sum = 1;
int i =1;
// increase sum by one each iteratiob using openmp
#pragma omp parallel for private(i) reduction( + : sum )
for (i = i; i < 100; i++) {
sum +=1;
}
printf("sum is %d\n",sum);
}
|
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)... |
array_args.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_
#define LIGHTGBM_UTILS_ARRAY_AGRS_H_
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm>
#include ... |
fhn_mod.c | #include <stdio.h>
#include "fhn_mod.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) {
/*
static bool first_call =... |
edge_vol_int.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
scheduled-clauseModificado4.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main(int argc, char **argv) {
int i, n=200,chunk,a[n],suma=0, num_threads,num_proc,in_parallel;
if(argc < 3) {
fprintf(stderr,"\nFalta iteraciones o chunk \n");
exit(-1);
}
n = atoi(argv[1]); if ... |
copy-private.c | #include <stdio.h>
#include <omp.h>
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 a: ");
scanf("%d", &a );
printf("\nSingle ejecutada por el thread %d\n", omp_get_thread_num());
}
#prag... |
block-6.c | // { dg-do compile }
void foo()
{
#pragma omp ordered
{
return; // { dg-error "invalid branch to/from OpenMP structured block" }
}
}
|
scheduled-clauseModificado4.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main(int argc, char **argv) {
int i, n=200,chunk,a[n],suma=0, num_threads,num_proc,in_parallel;
if(argc < 3) {
fprintf(stderr,"\nFalta iteraciones o chunk \n");
exit(-1);
}
n = atoi(argv[1]); if ... |
GB_binop__bset_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_unop__log2_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
LG_brutal_malloc.c | //------------------------------------------------------------------------------
// LG_brutal_malloc: brutal memory debugging
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-License-Identifier: BSD-2-Clause
... |
reduction_average.c | #include<stdio.h>
#include<omp.h>
#define MAX 5
int main() {
double ave=0.0, A[MAX];
int i;
for (i=0; i<MAX; i++) {
A[i] = i+1.0;
}
#pragma omp parallel for reduction(+: ave)
for (i=0; i<MAX; i++) {
ave += A[i];
}
ave /= MAX;
printf("%f\n",ave);
return 0;
}
|
switch-1.c | #include <assert.h>
#define s 100
#pragma omp declare target
int
switch1 (int a)
{
switch (a)
{
case 1:
return 11;
case 33:
return 333;
case 55:
return 55;
default:
return -1;
}
}
int
switch2 (int a)
{
switch (a)
{
case 1 ... 11:
return 11;
brea... |
convolution_1x1_pack4.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
map_alm_qu_eb.h | /**************************************************************
Compute map2alm_pol and alm2map_pol for QU and EB only
***************************************************************/
#ifdef UPDATE_HEALPIX3_60_SOLVED
#include <vector>
//#include "alm_healpix_tools.h"
//#include "alm_map_tools.h"
#include "alm.h"... |
pi.c | #include <err.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef WITH_MPI
#include <mpi.h>
#endif
#ifdef _OPENMP
#include <omp.h>
#endif
typedef struct {
long n;
int is_verbose;
} Params;
Params get_params(int argc, char *argv[]);
double *compute_limits();
double partial_pi(double left, double right, Params *pa... |
ActivationsExecutioner.h | //
// @author raver119@gmail.com
//
#ifndef PROJECT_ACTIVATIONSEXECUTIONER_H
#define PROJECT_ACTIVATIONSEXECUTIONER_H
#include <layers/activations.h>
using namespace nd4j;
template <typename T> class ActivationsExecutioner {
public:
// This method should be backend-specific, and should be implemented... |
particlefilter.c | /**
* @file ex_particle_OPENMP_seq.c
* @author Michael Trotter & Matt Goodrum
* @brief Particle filter implementation in C/OpenMP
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <time.h>
// RISC-V VECTOR Version by Cristóbal Ramírez Lazo, "... |
par.c | #include <stdio.h>
#include <limits.h>
#include <omp.h>
#include <time.h>
#include <stdlib.h>
#define V 10000
int num;
int minKey(int key[], int visited[])
{
int min = INT_MAX, index, i;
#pragma omp parallel
{
num = omp_get_num_threads();
int index_local = index;
int mi... |
hermv_c_dia_n_lo.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>
alphasparse_status_t
ONAME(const ALPHA_Complex alpha,
const ALPHA_SPMAT_DIA *A,
const ALPHA_Complex *x,
... |
layer_example_f32.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
fflush.c | // Copyright (c) 2018 - 2020 Arm, Ltd
#define _GNU_SOURCE
#include <shmem.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "timer.h"
#define GET_INT_SHMEM_FP 0
#define FLUSH_SHMEM_FP 1
... |
GB_binop__plus_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-... |
c-tree.h | /* Definitions for C parsing and type checking.
Copyright (C) 1987-2013 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at yo... |
elim.c | /*!
* \file elim.c
* \author Jun Yoshida
* \copyright (c) Jun Yoshida 2019
* The project is released under BSD3 License.
*/
#include "elim.h"
#include <stdlib.h>
#include <omp.h>
#include "common.h"
#include "elementary.h"
/* Debug
#include <stdio.h>
#define DEBUG_MSG fprintf(stderr,... |
dnnl_quantize_v2-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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.