source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_unaryop__minv_uint32_int32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
DRB067-restrictpointer1-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... |
3d7pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil with variable coefficients
* Adapted from PLUTO and Po... |
GB_binop__second_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
utils.h | /* Copyright (C) 2010 The Trustees of Indiana University. */
/* */
/* Use, modification and distribution is subject to the Boost Software */
/* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */
/* http:... |
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... |
graphProcessing.h | /*
FINISH TEMPFLATPATH CODE
AS WRITTEN, THESE FUNCTIONS WILL ONLY WORK WITH GRAPHS THAT ARE IMPLEMENTED IN THE boost NAMESPACE.
*/
#define LP 1
#define PERFDEBUG 0
//#define FULLDEBUG 1
#ifdef _OPENMP
#include <omp.h>
#endif
#include <boost/regex.hpp>
#include <iostream>
#include <fstream>
#include <string>
#inc... |
tensor_convert.h | /* Copyright 2019 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... |
GB_binop__isge_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
DRB093-doall2-collapse-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... |
format_trans.h | #ifndef FORMAT_TRANS
#define FORMAT_TRANS
#include"common.h"
#include"mmio_highlevel.h"
//#include"mmio.h"
#include"utils.h"
//calculate the number of non-empty tiles of matrix A
void step1_kernel(Beidou_Tile_Matrix *matrix)
// (int m, int n, MAT_PTR_TYPE *rowpointer, int *columnidx,
// int tilem,... |
GB_unop__identity_uint32_bool.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... |
pt_to_pt_multiPingpong.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
poisson_jacobi_omp.c | #include <math.h>
#include <stdio.h>
#include <string.h>
int main()
{
int m = 512, n = 512;
int iter = 0, iter_max = 1000;
float err = 1.0, tol = 1.0e-5;
const float pi = 2.0 * asinf(1.0);
float y0[n];
float A[n][m], Anew[n][m];
// initialization
memset(A, 0, n * m * sizeof(float));
... |
shear.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_1x1.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 ... |
thscale_mpb.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See COPYRIGHT in top-level directory.
*/
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include "queue/zm_mpbqueue.h"
#define TEST_NELEMTS 64
#define NITER (1024*32)
/*--------------------------------------------------------------------... |
pi_calculator.c | #include "pi_calculator.h"
#include <math.h>
#include <omp.h>
#include <sys/types.h>
#include <unistd.h>
#include "math_utils.h"
double calculatePi(int numberOfThreads, int numberOfPoints, int *numberOfPointsInsideCircle)
{
omp_set_num_threads(numberOfThreads);
// Ponemos una seed aleatoria
setSeed(getpid... |
convolution_pack1to8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 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 ... |
convolution_3x3.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 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 ... |
cg.20190406_parallel_block.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "globals.h"
#include "randdp.h"
#include "timers.h"
#include <omp.h>
//---------------------------------------------------------------------
#define CACHE_LINE_SIZE_PAD 128
#define INT_PAD_SIZE CACHE_LINE_SIZE_PAD/sizeof(int)
#define DOUBLE_PAD_SIZE CA... |
scatter_int_avx2.c | // create a list of 64 numbers, and only sum the even ones
#include <stdio.h>
#include <stdlib.h>
#define N 32000
#define SCALE 8
int main() {
srand(time(NULL));
int *numbers = malloc(sizeof(int)*N);
int *result1 = malloc(sizeof(int)*N);
int *result2 = malloc(sizeof(int)*N);
int *mask = malloc(siz... |
es3.h | #ifndef es3_h
#define es3_h
#include <iostream>
#include <omp.h>
#define nt 8
#define ns 1000000000
#define PAD 8
using namespace std;
//rendere le sum dinamiche
void output(double pig, double time) {
cout << "Time: " << time << endl << "PiGreco: " << pig << endl;
}
void ciclica(unsigned nmt) {
... |
conv_kernel_rv64.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... |
bml_transpose_triangle_dense_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_allocate.h"
#include "../bml_transpose_triangle.h"
#include "../bml_types.h"
#include "bml_allocate_dense.h"
#include "bml_transpose_triangle_dense.h"
#include "bml_types_dense.h"
#include <complex.h>
#include <stdlib.h>
#include <string.h>
#include <... |
GB_binop__rdiv_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
nco_s1d.c | /* $Header$ */
/* Purpose: NCO utilities for Sparse-1D (S1D) datasets */
/* Copyright (C) 2020--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 LIC... |
core_zsyssq.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c d s
*
**/
#include <plasma_core_blas.h>
#include "plasma_types.h"
#include "core_lapack.h"
#include <math.h>
/*****************************************... |
scalespace_filter_impl.h | /* The MIT License (MIT)
*
* (c) Jürgen Simon 2014 (juergen.simon@uni-bonn.de)
*
* 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 ... |
main2.h | #pragma once
#include "geometrycentral/surface/halfedge_mesh.h"
#include "geometrycentral/surface/meshio.h"
#include "geometrycentral/surface/vertex_position_geometry.h"
//#include <boost/program_options.hpp>
//namespace po = boost::program_options;
#include "../deps/polyscope/deps/args/args/args.hxx"
#include <omp.... |
convolution_5x5.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 ... |
dfe.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)
*
* @file src/backends/mpi/blrm/dfe.c
* @version 1.3.0
* @author... |
GB_unop__identity_uint16_uint64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
ten_tusscher_2004_epi_S2_2.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_2.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO:... |
racey_tasks.c | //
// This is a very simple program to play with tasks.
//
// the idea is to print one of two strings
//
// I think race cars are fun.
// I think car races are fun
//
// This is a race condition since depending on how the
// threads are scheduled, you will get a different answer.
// We aren't writing any var... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- 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
//
//===---------------------------... |
normsq.c | // Jacobi 3D skeleton program
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "timing.h"
int main(int argc, char** argv) {
double wct_start,wct_end,cput_start,cput_end,runtime,r;
int iter,size,i,j,k,n;
double *f1, *f2;
iter=1000;
double mintime = 4.0;
if (argc != 2 ... |
conversion.h | #ifndef _CONVERSION_H
#define _CONVERSION_H
#include <comms/glb.h>
CPS_START_NAMESPACE
#if 1
#define NOINLINE_MACRO __attribute((noinline))
#else
#define NOINLINE_MACRO
#endif
inline void moveFloattofloat (float *out, Float * in, size_t f_size)
{
Float sum=0.;
#pragma omp parallel for reduction(+:sum)
for (size... |
efp.c | /*-
* Copyright (c) 2012-2017 Ilya Kaliman
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the fol... |
weno5js_impl_c_.c | #include <stdlib.h>
#include <math.h>
static double eps;
static int size;
static double c00 = 1.0/3.0;
static double c01 = -7.0/6.0;
static double c02 = 11.0/6.0;
static double c10 = -1.0/6.0;
static double c11 = 5.0/6.0;
static double c12 = 1.0/3.0;
static double c20 = 1.0/3.0;
static double c21 = 5.0/6.0;
static ... |
shingles.c | /*
* Simple Stencil example
* Main program example
*
* Brian J Gravelle
* gravelle@cs.uoregon.edu
*
*/
#ifdef USE_CALI
#include <caliper/cali.h>
#endif
#ifdef USE_LIKWID
#include <likwid-marker.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <omp.h>
//KERNEL
#define TRUE 1
#d... |
vednnLinearBackwardData.c |
#include <stdint.h>
#include "vednnLinearBackwardData.h"
#ifdef VEDNN_USE_OPENMP
#include <omp.h>
extern int __vednn_omp_num_threads ;
#endif
static inline vednnError_t
vednnLinearBackwardData_wrapper(
vednnLinearBackwardData_t pFunc,
const uint64_t inDim,
const uint64_t outDim,
const uint64_t ... |
HybridRepSetReader.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2019 QMCPACK developers.
//
// File developed by: Ye Luo, yeluo@anl.gov, Arg... |
Q5.1.c | /* File: histogram.c
* Purpose: Build a histogram from some random data
*
* Compile: gcc -g -Wall -o histogram histogram.c
* Run: ./histogram <bin_count> <min_meas> <max_meas> <data_count>
*
* Input: None
* Output: A histogram with X's showing the number of measurements
* in ea... |
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)
#... |
GB_unop__identity_bool_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... |
rnn_helpers.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#ifdef _WIN32
#pragma warning(disable : 4267)
#endif
#include <algorithm>
#include <functional>
#include <future>
#include <string>
#include <vector>
#include "gsl/span"
#include "gsl/gsl_algorithm"
#includ... |
9175.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <po... |
extra_mixed_models.c | //
// Created by berg on 03/04/19.
//
#include "../config/extra_data_config.h"
#include "../config_helpers/config_helpers.h"
#include "../libraries_common/common_data_structures.h"
SET_EXTRA_DATA (set_mixed_model_if_x_less_than)
{
uint32_t num_active_cells = the_grid->num_active_cells;
*extra_data_size = siz... |
l7_setup.c | /*
* Copyright (c) 2011-2012, Los Alamos National Security, LLC.
* All rights Reserved.
*
* Copyright 2011-2012. Los Alamos National Security, LLC. This software was produced
* under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National
* Laboratory (LANL), which is operated by Los Alamos Nati... |
CGOpenMPRuntime.h | //===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
p3.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define VECLEN 100000000
double *a, *b, sum;
double begin;
double time_spent;
int main (int argc, char *argv[]) {
int i;
sum = 0.0;
a = aligned_alloc(64, VECLEN * sizeof(double));
b = aligned_alloc(64, VECLEN * sizeof(double));
for... |
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
//
//===---------------------------... |
Feature_matrix.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include <string.h>
#include "Feature_matrix.h"
void dgemm_(char *TRANSA, char *TRANSB, int *M, int *N, int *K, double *ALPHA, double *A, int *LDA, double *B, int *LDB, double *BETA, double *C, int *LDC);
void ComputeFeatureMatrix(int n, int d,... |
dragon.c | /*
* dragon.c
*
* Created on: 2011-06-26
* Authors: Francis Giraldeau
* Pier-Luc St-Onge
*
* http://en.wikipedia.org/wiki/Dragon_curve
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include "dragon.h"
#include "color.h"
xy_t compute_position(int64_t i)
{
xy_t position;
po... |
GB_binop__rminus_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
hill_paralelo.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
int** reserveMemoryMatrix(int rows, int columns);
void fillMatrix(int** matrix, int dimension);
void printMatrix(int** matrix, int rows, int columns);
char* getAlphabet();
// Functions for read file and get a string clean for encrypt
char... |
omp-maxof-elements-critical.c | /***********************************************************************************
Example 3.1 : omp-maxof-elements-critical.c
Objective : Write an OpenMP program to print Largest of an element in
an array
This example demonstrates the use of
omp_critical se... |
spmv_int.c | ////Example of sparse matrix-vector multiply, using CSR (compressed sparse row format).
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Add timing support
#include <sys/timeb.h>
#define REAL int
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millitm ... |
sample.c | #include <stdio.h>
#include <omp.h>
int main(int argc, char *argv[]){
int i;
#pragma omp parallel shared(i)
{
i = omp_get_thread_num();
printf("thread num = %d\n", i);
}
return 0;
}
|
DRB034-truedeplinear-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
GB_unop__identity_int16_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... |
ordering_op-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 ... |
GB_unaryop__lnot_fp64_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
conv_dw_kernel_rv64.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... |
omp_sum_strnum_tls.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <unistd.h>
#include "stdalsp.h"
#define LEN_SUM_STR 16
char *sum_strnum(const char *, const char *);
int main()
{
omp_set_num_threads(4);
{
#pragma omp parallel sections
{
#pragma omp section
{
char *x = "1", *y = "3";
ch... |
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... |
sum_gpu.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main()
{
double sum = 0;
int width = 40000000;
#pragma omp target teams distribute parallel for simd map(tofrom:sum) map(to:width) reduction(+:sum)
for(int i = 0; i < width; i++)
{
sum += i;
}
printf("\nSum = %lf\n",sum);
} |
GB_unop__log2_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... |
private-clauseModificado.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(){
int i, n = 7;
int a[n], suma;
for (i=0; i<n; i++)
a[i] = i;
suma = 10000;
#pragma omp parallel private(suma)
{
//suma=500;
#pragma omp for
for (i=0; i<n; i++){
suma = suma ... |
convolutiondepthwise_3x3_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 copy ... |
DRB053-inneronly1-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... |
GB_unop__identity_int64_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
logics.c | //int logics[1000];
//another regular array types, not from a parameter list
int main()
{
int logic_or = 0;
int i;
int logics[1000];
#pragma omp parallel
{
#pragma omp for schedule(dynamic,1)
for (i = 0; i < 1000; ++i)
{
logic_or = logic_or || logics[i];
}
}
return 0;
}
|
sample_task_single_producer.c | #include <omp.h>
#include <stdio.h>
#include <sys/time.h>
int main(int argc, char * argv[]) {
int i,num=(argc>1)?atoi(argv[1]):100;
int nthreads;
struct timeval t_start, t_end;
double time;
double *a = (double *)malloc(sizeof(double)*num);
#pragma omp parallel
{
nthreads=omp_get_n... |
psd.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
objdetect_prv.c | #include "objdetect_prv.h"
float overlap
(
float x1,
float w1,
float x2,
float w2
)
{
float l1 = x1 - w1/2;
float l2 = x2 - w2/2;
float left = l1 > l2 ? l1 : l2;
float r1 = x1 + w1/2;
float r2 = x2 + w2/2;
float right = r1 < r2 ? r1 : r2;
return right - left;
}
floa... |
GB_unaryop__identity_int64_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__plus_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
HybridRepSetReader.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2019 QMCPACK developers.
//
// File developed by: Ye Luo, yeluo@anl.gov, Arg... |
GB_binop__isle_uint64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
dz1z2.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
void Usage(char *prog_name);
#define ACCURACY 0.01
/*
* worksharing
*/
double sequential_solution(int argc, char *argv[])
{
long long n, i;
double factor;
double sum = 0.0;
if (argc != 2)
Usage(argv[0]);
n = str... |
GB_binop__band_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
core_math.h | // == mojo ====================================================================
//
// Copyright (c) gnawice@gnawice.com. All rights reserved.
// See LICENSE in root folder
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentatio... |
LBCouetteSolver.h | // Copyright (C) 2015 Technische Universitaet Muenchen
// This file is part of the Mamico project. For conditions of distribution
// and use, please see the copyright notice in Mamico's main folder, or at
// www5.in.tum.de/mamico
#ifndef _MOLECULARDYNAMICS_COUPLING_SOLVERS_LBCOUETTESOLVER_H_
#define _MOLECULARDYNAMICS_... |
trmm_x_sky_u_hi_col_conj.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy)
{
#ifdef COMPLE... |
matrix_multiplication.c | /******************************************************************************
* FILE: omp_mm.c
* DESCRIPTION:
* OpenMp Example - Matrix Multiply - C Version
* Demonstrates a matrix multiply using OpenMP. Threads share row iterations
* according to a predefined chunk size.
*************************************... |
dem_structures_coupling_utilities.h | /*
* Author: Miguel Angel Celigueta
*
* maceli@cimne.upc.edu
*/
#ifndef KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
#define KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
// /* External includes */
// System includes
// Project includes
#include "includes/variables.h"
/* System includes */
#include <limits>
#includ... |
callback.h | #define _BSD_SOURCE
#define _DEFAULT_SOURCE
#include <stdio.h>
#include <inttypes.h>
#include <omp.h>
#include <ompt.h>
#include "ompt-signal.h"
// Used to detect architecture
#include "../../src/kmp_platform.h"
static const char* ompt_thread_type_t_values[] = {
NULL,
"ompt_thread_initial",
"ompt_thread_worker"... |
zSchCompUdt-2Ddynamic.c | /*! \file
Copyright (c) 2003, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt
at the top-level directory.
... |
ompfor7.c | /*
* test #define
* Liao 12/1/2010
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#define P 4
void foo(int iend, int ist)
{
int i=0;
i= i+P;
#pragma omp parallel
{
#pragma omp single
printf ("Using %d threads.\n",omp_get_num_threads());
#pragma omp for nowait schedule(static,P)
for (i=i... |
estimator.h | // Copyright (C) 2013 The Regents of the University of California (Regents).
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above... |
resize-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 may no... |
quick_fermi_dirac.c | /*
A. Odrzywolek, andrzej.odrzywolek@uj.edu.pl, 01-06-2020
*/
#include "../fermidirac.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include <stdio.h>
#include <float.h>
/*
SECTION FOR FAST VERSIONS
*/
void fixedFfermi_derivatives(const double k, const double eta, const doubl... |
GB_unop__atan_fc64_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... |
trmv_x_csc_u_hi.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
trmv_csc_u_hi_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSC *A,
const ALPHA_Number *x,
const ALPHA_Number b... |
gbdt.h | #ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/json11.hpp>
#include "score_updater.hpp"
#include <cstdio>
#include <vector>
#include <string>
#include <fstream>
... |
matmul.c | /*
* In His Exalted Name
* Title: Matrix Multiplication Sequential Code
* Author: Ahmad Siavashi, Email: siavashi@aut.ac.ir
* Date: 15/11/2015
*/
/*
* Parallelization: Ali Gholami
*/
// Let it be.
#define _CRT_SECURE_NO_WARNINGS
#define NUM_THREADS 8
// Global variable to check the summation of the elements of ... |
error.h | #include <math.h>
#include "disptools.h"
/*!
* \brief Redistribute the volume change over the image.
*
* Redistribute the change of volume within the body on the background,
* and enforce the total volume change over the entire image to be zero.
*/
static inline void redistribute_volume_change(
con... |
cancel-parallel-1.c | /* { dg-do run } */
/* { dg-set-target-env-var OMP_CANCELLATION "true" } */
#include <stdlib.h>
#include <omp.h>
int
main ()
{
#pragma omp parallel num_threads (32)
{
#pragma omp cancel parallel
if (omp_get_cancellation ())
abort ();
}
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.