source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
omp_parallel_reduction.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
#define DOUBLE_DIGITS 20 /* dt^DOUBLE_DIGITS */
#define MAX_FACTOR 10
#define KNOWN_PRODUCT 3628800 /* 10! */
int test_omp_parallel_reduction()
{
int sum;
int known_sum;
double dsum;
double dknown_sum;
double... |
GB_subassign_00.c | //------------------------------------------------------------------------------
// GB_subassign_00: C(I,J)<!,repl> = empty ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.co... |
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... |
green.h | #include "../base_system.h"
#include "hamiltonian.h"
#include <cstdio>
#include <unordered_map>
#include <vector>
#include "../util.h"
template <class S>
class Green {
public:
Green(S& system, Hamiltonian<S>& hamiltonian) : system(system), hamiltonian(hamiltonian) {}
void run();
private:
size_t n_dets;
s... |
GB_unop__identity_fp32_int32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
GB_binop__bor_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
BRKGA.h | /**
* BRKGA.h
*
* This template class encapsulates a Biased Random-key Genetic Algorithm for minimization problems
* with K independent Populations stored in two vectors of Population, current and previous.
* It supports multi-threading via OpenMP, and implements the following key methods:
*
* - BRKGA() constru... |
desc.h | #include "assert.h"
#include "omp.h"
#define DESC_DEBUG 1
int desc_counter = 0;
void my_print(const char *s) {
if (DESC_DEBUG) {
int ret;
#pragma omp atomic capture
{
ret = desc_counter;
desc_counter += 1;
}
printf("%d: desc debug: %s\n", ret, s);
}
}
void my_print_label(const c... |
ab-totient-omp-5.c | // Distributed and parallel technologies, Andrew Beveridge, 03/03/2014
// To Compile: gcc -Wall -O -o ab-totient-omp -fopenmp ab-totient-omp.c
// To Run / Time: /usr/bin/time -v ./ab-totient-omp range_start range_end
#include <stdio.h>
#include <omp.h>
/* When input is a prime number, the totient is simply the prim... |
cones.c | #include "cones.h"
#ifdef LAPACK_LIB_FOUND
#include <cblas.h>
#include <lapacke.h>
#endif
void projectsdc(double * X, int n, Work * w);
/* in place projection (with branches) */
void projCone(double *x, Cone * k, Work * w, int iter)
{
int i;
int count;
/* project onto positive orthant */
for(i = k->f... |
par_relax.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... |
shear.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
anneal.c | #include "anneal.h"
#include "cairo/visuals.h"
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
void build_stencil(graph_t *g, placement_t *p, int rows, int cols, int *stencil) {
for (int i = 0; i < rows * cols; ++i)
stencil[i] = -1;
for (int i = 0; i < g->vertices; ++i) {
int x = (i... |
LAGraph_grread.c | //------------------------------------------------------------------------------
// LAGraph_grread: read a matrix from a binary file
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-License-Identifier: BSD-2... |
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... |
one_task.c | //===-- one_task.c - Creating exactly on task ---------------------*- C -*-===//
//
// Part of the LOMP 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
//
//===---------------------------... |
convolution_3x3.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 ... |
printwhileon.c | #include "config.h"
#include <stdio.h>
#include <unistd.h>
#ifdef THREADED_OMP
#include <omp.h>
#endif
#ifdef HAVE_LIBMPI
#include <mpi.h>
#include "gptlmpi.h"
#endif
#include "gptl.h"
int main (int argc, char **argv)
{
int nthreads = 1; /* Value is 1 if no threading */
int iam = 0; /* Value is 0 if no M... |
emd.h | // fix inttypes for GCC
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <cinttypes>
// fix for the fix - it conflicts with numpy
#undef __STDC_FORMAT_MACROS
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <string>
#include "cache.h"
#include "graph/min_cost_flow.h"
/*! @ma... |
for-10.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
/* LLVM LOCAL test not applicable */
/* { dg-require-fdump "" } */
extern void bar(int);
void foo (int n)
{
int i;
#pragma omp for schedule(runtime) ordered
for (i = 0; i < n; ++i)
bar(i);
}
/* { dg-final { scan-tree-dump-times "GO... |
mc_cyclosynch.c | /*
This file is for the different functions for emitting and absorbing synchrotron photons
*/
#include "mcrat.h"
double calcCyclotronFreq(double magnetic_field)
{
//B has to be in gauss
return CHARGE_EL*magnetic_field/(2*M_PI*M_EL*C_LIGHT);
}
double calcEB(double magnetic_field)
{
//helper function to c... |
kvstore_dist_server.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 ... |
dsimage.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// by Sudipta Sinha
// adapted for AirSim by Matthias Mueller
#ifndef dsimage_h
#define dsimage_h
#include <stdio.h>
#include <limits.h>
#include <float.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#inclu... |
GB_bitmap_assign_C_whole_template.c | //------------------------------------------------------------------------------
// GB_bitmap_assign_C_whole_template: iterate over a bitmap matrix C
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
mkldnn_requantize-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 ... |
sm2x2avg_t3_1_1_0.c | #if (LEAF_PHASE_MATRICES_AUTOVECTORIZE) == 1
for(k=0; k != 2; ++k) {
#if defined __INTEL_COMPILER
__assume_aligned(scat2x2m,64);
#pragma vector always
#pragma code_align(64)
#elif defined __GNUC__ && !defined __INTEL_COMPILER
scat2x2m = (std::complex<float>*)__builtin_assume_aligned(scat2... |
TouOMP.c | /* ParTou: TouOMP.c: */
/* Solves a homogenous Diophantine system in ninegative integer numbers */
/* by Toudic method on multicore parallel architectures using OpenMP */
// schedule(dynamic, 10)
// #define __MAIN__
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <li... |
omp_parallel_for_firstprivate.c | <ompts:test>
<ompts:testdescription>Test which checks the omp parallel for firstprivate directive.</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp parallel for firstprivate</ompts:directive>
<ompts:dependences>omp parallel for reduction,omp parallel for private</ompts:dependences>
... |
round_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... |
main.c | #include <stdio.h>
#include <omp.h>
int main(int argc, char** argv)
{
printf("Hello world\n");
int max_thread = omp_get_max_threads();
printf("Thread max count: %d\n", max_thread);
#pragma omp parallel
{
for (int i = max_thread; i > 0; i--)
{
#pragma omp barr... |
DRB046-doall2-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... |
support_func.h | #include <random>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <cmath>
#include <ctime>
#include <queue>
#include <vector>
#include <omp.h>
#include <cassert>
#include <algorit... |
GB_unop__identity_fc64_fp32.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... |
resource_manager_test.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... |
gridify-3.c | /* { dg-do compile } */
/* { dg-require-effective-target offload_hsa } */
/* { dg-options "-fopenmp -fdump-tree-omplower-details" } */
#define BLOCK_SIZE 16
void tiled_sgemm_tt(const int M, const int N, const int K, const float alpha, const float*A, const int LDA,
const float*B, const int LDB, const float beta, fl... |
sparselu.c | /**********************************************************************************************/
/* This program is part of the Barcelona OpenMP Tasks Suite */
/* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */
/* Copyright (C) 2009 Univer... |
density_prior_box_op.h | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... |
uniform_grid_environment.h | // -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & Newcastle University for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
GB_unaryop__ainv_fp32_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... |
ompfor.c | /*
* default loop scheduling
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int a[20];
int main(void)
{
int i;
#pragma omp parallel
{
#pragma omp single
printf ("Using %d threads.\n",omp_get_num_threads());
#pragma omp for nowait
for (i=0;i<2;i+=1)
//for (i=0;i<20;i+=3)
{
a[i]=i... |
GB_unaryop__lnot_int8_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
KDTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_KDTREE_H_
#define _SPTAG_COMMON_KDTREE_H_
#include <vector>
#include <string>
#include <shared_mutex>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h"
#include "WorkS... |
7z_fmt_plug.c | /*
* 7-Zip cracker patch for JtR. Hacked together during June of 2013 by Dhiru
* Kholia <dhiru at openwall.com>. Unicode support and other fixes by magnum.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>
* and Copyright (c) 2013 magnum, and it is hereby released to the general
* publi... |
dijkstra_openmp.c | # include <stdlib.h>
# include <stdio.h>
# include <time.h>
# include <omp.h>
# define NV 6
int main ( int argc, char **argv );
int *dijkstra_distance ( int ohd[NV][NV] );
void find_nearest ( int s, int e, int mind[NV], int connected[NV], int *d,
int *v );
void init ( int ohd[NV][NV] );
void timestamp ( void );
vo... |
quantized_conv2d.h | /* Copyright 2018 The Blueoil 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 agre... |
pr67452_0.c | /* { dg-lto-do link } */
/* { dg-lto-options { { -O2 -flto -fopenmp-simd } } } */
float b[3][3];
__attribute__((used, noinline)) void
foo ()
{
int v1, v2;
#pragma omp simd collapse(2)
for (v1 = 0; v1 < 3; v1++)
for (v2 = 0; v2 < 3; v2++)
b[v1][v2] = 2.5;
}
int
main ()
{
asm volatile ("" : : "g" (b) :... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
updater_quantile_hist.h | /*!
* Copyright 2017-2022 by XGBoost Contributors
* \file updater_quantile_hist.h
* \brief use quantized feature values to construct a tree
* \author Philip Cho, Tianqi Chen, Egor Smirnov
*/
#ifndef XGBOOST_TREE_UPDATER_QUANTILE_HIST_H_
#define XGBOOST_TREE_UPDATER_QUANTILE_HIST_H_
#include <rabit/rabit.h>
#inclu... |
single.c |
// OpenMP Single Example
// Inclusions
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
// Main
int main( int argc, char** argv ) {
int i = 0; // Loop Iterator
int n = 0; // Number of Iterations
// Parallel Region
#pragma omp parallel \
shared( n ) \
private( i )
... |
loss.h | /**
* Copyright (c) 2015 by Contributors
* @file loss.h
* @brief the basic class of a loss function
*/
#ifndef DIFACTO_LOSS_H_
#define DIFACTO_LOSS_H_
#include <string>
#include <vector>
#include "./base.h"
#include "dmlc/data.h"
#include "dmlc/omp.h"
#include "./sarray.h"
namespace difacto {
/**
* \brief the b... |
inputSection.c | /*
test case for sections
including clause handling, explicity section, combined parallel sections
by C. Liao
July 13, 2006
*/
#include "omp.h"
#include <assert.h>
#include <stdio.h>
int main(){
int sum=7;
int known_sum;
int i;
int k_3=7;
#pragma omp parallel
{
#pragma omp sections reduction(+:sum) private(... |
scheduleg-clause.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(int argc, char **argv) {
int i, n = 16,chunk, a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"\nFalta chunk \n");
exit(-1);
}
chunk = atoi(argv[1]);
for (i=0; i<n; i++) a[i] ... |
maskedraster.h | #pragma once
#include "cpupredicates-private.h"
#include "eigeniterationsupport-private.h"
#include "gdx/cell.h"
#include "gdx/exception.h"
#include "gdx/maskedrasteriterator.h"
#include "gdx/rasterchecks.h"
#include "gdx/rastermetadata.h"
#include "infra/cast.h"
#include "infra/span.h"
#include <Eigen/Core>
#include... |
GB_unop__one_uint64_uint64.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... |
GB_binop__bxor_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-... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
fox_floats_timer_caching_omp_fileIO_benchmark.c | /* fox_floats_timer_caching_omp_fileIO_benchmark.c -- uses Fox's algorithm to multiply two square matrices
*
* Implementation of parallel matrix multiplication:
* LaTeX: $C_{i,j} = \sum_{k} A_{i,k}B_{k,j}$
*
* Input:
* Input Matrix file name: A.dat, B.dat
*
* Output:
* Output Matrix file name: C.dat... |
main.c | // C Compiler flag: -fopenmp
#include <stdio.h>
#include <omp.h>
#define N 20
int main(int argc, char *argv[])
{
omp_set_dynamic(0); // запретить библиотеке openmp менять число потоков во время исполнения
//omp_set_num_threads(2); // установить число потоков в X
int threadsCount = omp_get_max_threads();
printf... |
Integration.c | #include <math.h>
#include <omp.h>
#include <stdio.h>
#include <sys/time.h>
double wtime()
{
struct timeval t;
gettimeofday(&t, NULL);
return (double)t.tv_sec + (double)t.tv_usec * 1E-6;
}
double func(double x)
{
return log(1 + x) / x; // формула (можно менять)
}
void serial()
{
const double eps ... |
yada.c | /* =============================================================================
*
* yada.c
*
* =============================================================================
*
* Copyright (C) Stanford University, 2006. All Rights Reserved.
* Author: Chi Cao Minh
*
* ===========================================... |
warpopenmp.c | #include "warpvanilla.h"
#include <math.h>
static double LinearInterpShortVolume(const ShortVolume* const volume, const double x, const double y, const double z)
{
const int x_int = (int)floor(x);
const int y_int = (int)floor(y);
const int z_int = (int)floor(z);
const double x_frac = x - x_int;
co... |
homomorphic_functions.c | long long int sk[NUM_PRIME][4096];
long long int pk0[NUM_PRIME][4096], pk1[NUM_PRIME][4096];
long long int rlk00[NUM_PRIME][4096], rlk01[NUM_PRIME][4096], rlk10[NUM_PRIME][4096], rlk11[NUM_PRIME][4096];
long long int rlk20[NUM_PRIME][4096], rlk21[NUM_PRIME][4096], rlk30[NUM_PRIME][4096], rlk31[NUM_PRIME][4096], rlk40[N... |
libimagequant.c | /* pngquant.c - quantize the colors in an alphamap down to a specified number
**
** Copyright (C) 1989, 1991 by Jef Poskanzer.
** Copyright (C) 1997, 2000, 2002 by Greg Roelofs; based on an idea by
** Stefan Schneider.
** © 2009-2013 by Kornel Lesinski.
**
** Permission to use, copy, modi... |
util.h | #pragma once
#include <dirent.h>
#include <sys/stat.h>
#include <omp.h>
#include "type.h"
#include "new_func.h"
#include "wtime.h"
off_t fsize(const string& fname)
{
struct stat st;
if (0 == stat(fname.c_str(), &st)) {
return st.st_size;
}
perror("stat issue");
return -1L;
}
off_t fsize(in... |
GB_unop__identity_uint32_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://... |
GB_unaryop__minv_bool_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GB_unop__isnan_bool_fc64.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... |
bellmanFordCompleteGraphCpuParallel.c | #include "bellmanFordCompleteGraphCpuParallel.h"
double bellmanFordParallelCpu(CompleteGraph *graph, unsigned int startVertex, unsigned int numberOfThreads) {
if (!graph || !graph->adjMatrix || !graph->predecessor || !graph->dist) {
return -1;
}
initArrays(graph->dist, graph->predecessor, graph->si... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__first_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unop__lnot_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... |
array_of_ptr.c | // minimal example to reveal bug in OpenMP Transformer
// when shared variable is an array of pointer.
#include<stdlib.h>
int main() {
double *a[10]; // array of pointer to double
#pragma omp parallel
{
int i;
#pragma omp for
for (i=1; i<10; i++) {
a[i][1] = 2*a[i-1][2];
}
}
}
|
memcpy-tutorial.c | // -----------------------------------------------------------------------------
//
// "CAPIPrecis"
//
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2019 All rights reserved
// -----------------------------------------------------------------------------
// ... |
dcsc.h | /****************************************************************/
/* Parallel Combinatorial BLAS Library (for Graph Computations) */
/* version 1.6 -------------------------------------------------*/
/* date: 6/15/2017 ---------------------------------------------*/
/* authors: Ariful Azad, Aydin Buluc --------------... |
grid.c | /* Copyright 2014-2015 The Regents of the University of California.
* Copyright 2015. 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.
*
* 2011, 2015 Martin Uecker <uecker@eecs.berkeley.edu>
* 2014 Frank Ong <frankong@berkel... |
nufft.c | /* Copyright 2014-2015. The Regents of the University of California.
* Copyright 2016-2021. Uecker Lab. University Medical Center Göttingen.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2014-2017 Frank Ong
* 2014-2020 M... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
omp_loop_sched.c | /* vim: set ts=4 sw=4: */
/* Filename : omp_loop_sched.c
* Description : simple OpenMP model
* Author : SunYoung Kim <sunyzero@gmail.com>
* Notes : omp_get_thread_num
*/
#define _XOPEN_SOURCE 600
#include <unistd.h>
#include <stdio.h>
#include <time.h>
#include <omp.h>
int main()
{
int i;
struct ti... |
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... |
myFunc_cilk.h | //#define __declspec(x)
// Rob Farber
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <malloc.h>
#include <math.h>
//#include <omp.h>
#include <time.h>
#include <sys/time.h>
#include <cilk/cilk.h>
#include <cilk/reducer_opadd.h>
#define MICRO_IN_SEC 1000000.00
double microtime(){
int tv_... |
static-chunk-size-one.c | extern void abort ();
int
bar ()
{
int a = 0, i;
#pragma omp parallel for num_threads (3) reduction (+:a) schedule(static, 1)
for (i = 0; i < 10; i++)
a += i;
return a;
}
int
main (void)
{
int res;
res = bar ();
if (res != 45)
abort ();
return 0;
}
|
c_md.c | /* ***********************************************************************
This program is part of the
OpenMP Source Code Repository
http://www.pcg.ull.es/ompscr/
e-mail: ompscr@etsii.ull.es
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Lice... |
gimple.h | /* Gimple IR definitions.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundati... |
GB_binop__lor_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
strMsignal.c | //
// strMsignal.c
// pstock
//
// Created by takayoshi on 2016/01/24.
// Copyright © 2016年 pgostation. All rights reserved.
//
#include <stdio.h>
#include <libiomp/omp.h>
#include "main.h"
#include "strMsignal.h"
#include "xmapString.h"
#include "calc.h"
static int dekidaka(strMdata* data, int dateIndex, int cod... |
region_layer.c | #include "region_layer.h"
#include "activations.h"
#include "blas.h"
#include "box.h"
#include "opencl.h"
#include "utils.h"
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#define class temp
layer make_region_layer(int batch, int w, int h, int n, int classes, int coords)
{
layer l ... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Match.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grb2.h"
#include "wgrib2.h"
#include "fnlist.h"
#ifdef USE_REGEX
#include <sys/types.h>
#include <regex.h>
/*
* MATCH package
*
* requires POSIX-2
* if regcomp and regexec are not available, don't define USE_REGEX in makefile
*
* Only pr... |
GB_binop__second_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
bank.h | #ifndef OPENMC_BANK_H
#define OPENMC_BANK_H
#include <cstdint>
#include <vector>
#include "openmc/particle.h"
#include "openmc/position.h"
// Without an explicit instantiation of vector<Bank>, the Intel compiler
// will complain about the threadprivate directive on filter_matches. Note that
// this has to happen *ou... |
compute_struct_func_mex.c | /*******************************************************************************
* compute_struct_func_mex
*
* Mex function to compute efficiently structure functions.
*
* Inputs:
* - coefs: vector of multiresolution quantity at given scale
* - q: vector of values of q
* - flag_zq (boolean): compute struc... |
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.
*
*... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable 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) >... |
lgraph.h | #pragma once
#include "global.h"
#include "util.h"
#ifdef __CUDACC__
#define CUDA_HOSTDEV __host__ __device__
#else
#define CUDA_HOSTDEV
#endif
#ifdef ENABLE_GPU
#define SUBGRAPH_SIZE (1024*128)
#define RANGE_WIDTH (512)
#else
#define SUBGRAPH_SIZE (1024*128)
#define RANGE_WIDTH (512)
#endif
class LearningGraph {
pr... |
GB_unop__isinf_bool_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... |
bgmgraphgrid2D.h | /** @file bgmgraphgrid2D.h
* @brief class for manipulation with 2D grid
*
* Defines some basic functions for manipulaton with grids, especially for BLOCKGRAPHMATRIX.
*
* @author Lukas Pospisil
*/
#ifndef PASC_COMMON_BGMGRAPHGRID2D_H
#define PASC_COMMON_BGMGRAPHGRID2D_H
#include "general/algebra/graph/bgmgra... |
GB_binop__second_fc32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
laplace_omp.c | /*************************************************
* Laplace OpenMP C Version
*
* Temperature is initially 0.0
* Boundaries are as follows:
*
* 0 T 0
* 0 +-------------------+ 0
* | |
* | |
* | |
* T | ... |
simulate.c | /*
* simulate.c
*
* Implement your (parallel) simulation here!
*/
#include <stdio.h>
#include <stdlib.h>
#include "simulate.h"
double *old, *cur, *next, *temp;
int g_t_max, g_i_max;
int g_num_threads;
/*
* Calculate the wave
*/
void calc_wave(void)
{
for (int t = 0; t < g_t_max; t++) {
/* Differen... |
SoaDistanceTableBA.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeongnim ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.