source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
convolution_sgemm_packnto1_fp16s.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 ... |
spalart_allmaras_turbulence_model.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
// ... |
suma.c | #include <stdio.h>
#include <omp.h>
#include <stdlib.h>
int main(int argc , char **argv)
{
double *Array, *Check, serial_sum, sum;
int array_size, i, num_threads;
/* Checking for command line arguments */
if( argc != 3 ) {
printf("Invalid number of arguments!\n");
printf("Running example: ./suma <num... |
GB_unaryop__ainv_int16_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... |
pctbsm.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/pztbsm.c, normal z -> c, Fri Sep 28 17:38:14 2018
*
**/
#include "plasma_async.h"
#include "plasma_context... |
mxEvaluateSurfValue.c | #ifdef _OPENMP
#include <omp.h>
#endif
#define DEBUG
#include "mex.h"
#define NRHS 5
#define NLHS 2
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
/* check input & output */
if (nrhs != NRHS) {
mexPrintf("Matlab:%s:InvalidNumberInput,\n", __FILE__);
mexPrintf("%d inputs r... |
GB_subassign_01.c | //------------------------------------------------------------------------------
// GB_subassign_01: C(I,J) = scalar ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apa... |
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)... |
J1OrbitalSoA.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:
//
// Fil... |
datatypes.h | #ifndef DATATYPES_H_
#define DATATYPES_H_
#include <stdbool.h>
#include "../tools.h"
#include "PlyDict.h"
#include "ObjDict.h"
#define MSG_HEAD_SEP "YGG_MSG_HEAD"
/*! @brief Size of COMM buffer. */
#define COMMBUFFSIZ 2000
#define FMT_LEN 100
#ifdef __cplusplus /* If this is a C++ compiler, use C linkage */
extern... |
lbm.c | /* $Id: lbm.c,v 1.6 2004/05/03 08:23:51 pohlt Exp $ */
/*############################################################################*/
#include "lbm.h"
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#if !defined(SPEC_CPU)
#ifdef _OPENMP
#include <omp.h>
#endif
#endif
/*##################################... |
TinyErode.h | // SPDX-License-Identifier: MIT
// _______ _ ______ _
// |__ __(_) | ____| | |
// | | _ _ __ _ _| |__ _ __ ___ __| | ___
// | | | | '_ \| | | | __| | '__/ _ \ / _` |/ _ \
// | | | | | | | |_| | |____| | | (_) | (_| | __/
// |_| |_|_| |_... |
main.c | // Copyright (c) 2017 ORPECOMP Project
// Fabian Schuiki <fschuiki@iis.ee.ethz.ch>
#include "oprecomp.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
// Parse the parameters that determine the benchmark's execution.
if (argc != 3) {
fprintf(stderr, ... |
operations.h | /*
* This file is part of Quantum++.
*
* MIT License
*
* Copyright (c) 2013 - 2019 Vlad Gheorghiu (vgheorgh@gmail.com)
*
* 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 restr... |
test.c | #include <stdio.h>
#define N (8*1024)
#define C 4
#define P 2
#define M (N/C)
#define TEST_PAR_NOWAIT 1
#define TEST_PAR_MAP_ALL 1
int a[N], b[N];
int main() {
int i;
int error, totError = 0;
#if TEST_PAR_NOWAIT
for (i=0; i<N; i++) a[i] = b[i] = i;
#pragma omp target data map(alloc: a, b)
{
... |
GB_unaryop__identity_int32_uint8.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__lt_bool.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
for-6.c | /* { dg-additional-options "-std=gnu99" } */
extern void abort ();
#define M(x, y, z) O(x, y, z)
#define O(x, y, z) x ## _ ## y ## _ ## z
#pragma omp declare target
#define F for
#define G f
#define S
#define N(x) M(x, G, normal)
#include "for-2.h"
#undef S
#undef N
#undef F
#undef G
#pragma omp end declare target... |
VecMath.h | /*
* Copyright (C) 2013 Sergey Kosarevsky (sk@linderdaum.com)
* Copyright (C) 2013 Viktor Latypov (vl@linderdaum.com)
* Based on Linderdaum Engine http://www.linderdaum.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... |
ast-dump-openmp-parallel-sections.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_zero() {
#pragma omp parallel sections
{}
}
void test_one() {
#pragma omp parallel sections
{ ; }
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>>... |
omp_for_schedule_auto.c | // RUN: %libomp-compile-and-run
// REQUIRES: !(abt && (clang || gcc))
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "omp_testsuite.h"
int sum1;
#pragma omp threadprivate(sum1)
int test_omp_for_auto()
{
int j;
int sum;
int sum0;
int known_sum;
int threadsnum;
sum = 0;
sum0 = 12345;
... |
zero_length_array_section.c | // RUN: %libomptarget-compile-generic -fopenmp-version=51
// RUN: %libomptarget-run-fail-generic 2>&1 \
// RUN: | %fcheck-generic
#include <stdio.h>
int main() {
int arr[5];
// CHECK: addr=0x[[#%x,HOST_ADDR:]]
fprintf(stderr, "addr=%p\n", arr);
// CHECK-NOT: Libomptarget
#pragma omp target data map(alloc: ... |
xgboost_regrank_eval.h | #ifndef XGBOOST_REGRANK_EVAL_H
#define XGBOOST_REGRANK_EVAL_H
/*!
* \file xgboost_regrank_eval.h
* \brief evaluation metrics for regression and classification and rank
* \author Kailong Chen: chenkl198812@gmail.com, Tianqi Chen: tianqi.tchen@gmail.com
*/
#include <cmath>
#include <vector>
#include <algorithm>
#include... |
GB_unaryop__ainv_uint8_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
matmul.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
const int N = 128*2;
int main(int argc, char **argv) {
float matA[N][N];
float matB[N][N];
float matC[N][N];
float matE[N][N];
fprintf(stderr, "Starting matmul\n");
#pragma omp target data map(to: matA, matB) map(from: matC)
{
float tmp;
#pragma ... |
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... |
GB_unaryop__abs_uint8_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_unop__identity_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GB_unaryop__minv_int8_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... |
pruned_landmark_labeling.h |
#ifndef PRUNED_LANDMARK_LABELING_H_
#define PRUNED_LANDMARK_LABELING_H_
#include <string.h>
#include <malloc.h>
#include <stdint.h>
#include <xmmintrin.h>
#include <sys/time.h>
#include <climits>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set... |
cpunetworkexecutor.h | #pragma once
#include "cpunetwork.h"
namespace NEAT {
//Don't need any special qualifiers for CPU
#define __net_eval_decl
//---
//--- CLASS CpuNetworkExecutor
//---
template<typename Evaluator>
class CpuNetworkExecutor : public NetworkExecutor<Evaluator> {
public:
const typen... |
test.c |
#include <stdio.h>
#include <omp.h>
#include <math.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (992)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
int main(void) {
check_offloading();
double A[N], B[N], ... |
pi_omp.c | /*
* Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x)
* between 0 and 1.
*
* Parallel version using OpenMP
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h> /* OpenMP */
#if _EXTRAE_
#include "extrae_user_events.h"
// Extrae Constants
#define PROGRAM 100... |
omp_smithW-v4-parallel-serial.c | /*********************************************************************************
* Smith–Waterman algorithm
* Purpose: Local alignment of nucleotide or protein sequences
* Authors: Daniel Holanda, Hanoch Griner, Taynara Pinheiro
*
* Compilation: gcc omp_smithW.c -o omp_smithW -fopenmp -DDEBUG // debuggin... |
GB_unaryop__minv_int16_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... |
bug_proxy_task_dep_waiting.c | // RUN: %libomp-compile-and-run
// REQUIRES: openmp-4.5
// The runtime currently does not get dependency information from GCC.
// UNSUPPORTED: gcc
#include <stdio.h>
#include <omp.h>
#include <pthread.h>
#include "omp_my_sleep.h"
/*
An explicit task can have a dependency on a target task. If it is not
directly sati... |
carrera.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n=20, a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"\nFalta iteraciones\n"); exit(-1);
}
n = atoi(argv[1]);
if (n>20) n=20;
for (i=0; i<n; i++)
a[i] = i+1;
#pragma omp parallel for ... |
GB_unaryop__identity_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... |
dcraw.c | #ifndef IGNOREALL
/*
dcraw.c -- Dave Coffin's raw photo decoder
Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net
This is a command-line ANSI C program to convert raw photos from
any digital camera on any computer running any operating system.
No license is required to download and use dcraw... |
GB_unaryop__ainv_uint8_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... |
parallel-simple.c | /*
Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze
(joachim.protze@tu-dresden.de), Jonas Hahnfeld
(hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir
Rakamaric, Dong H. A... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include <math.h>
//#include "ocl-kernel-gen.h"
#include "parse-args.h"
#include "sgtype.h"
#include "sgbuf.h"
#include "sgtime.h"
#include "trace-util.h"
#include "sp_alloc.h"
#include "morton.h"
#incl... |
3d25pt.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-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
Utils.h | //RioNeuralNetwork: License information is available here - "https://github.com/TheRioMiner/RioNeuralNetwork/blob/master/LICENSE" or in file "LICENCE"
#pragma once
#include <iostream>
#include <random>
#include <immintrin.h>
#include <omp.h>
#include <intrin.h>
#include "YUVICfg.h"
#include "ThreadingMode.h"
... |
GB_binop__bclr_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
batch_shuffle_message_manager.h | /** Copyright 2020 Alibaba Group Holding Limited.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... |
distribute_parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
//... |
mscash1_fmt_plug.c | /* MSCASH patch for john (performance improvement)
*
* Modified for utf-8 support by magnum in 2011, same terms as below
*
* Written by Alain Espinosa <alainesp at gmail.com> in 2007. No copyright
* is claimed, and the software is hereby placed in the public domain.
* In case this attempt to disclaim copyright a... |
GB_binop__iseq_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-... |
HR_HDRImageTool.h | #pragma once
#include <vector>
#include <string>
#if defined WIN32
#include <windows.h>
#endif
#include <cmath>
#include <cstdint>
#include "FreeImage.h"
#include "HR_HDRImage.h"
namespace HydraRender
{
void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char *message);
void SaveHDRImageToFileHDR(const st... |
prag_error.c | #include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main(){
#pragma omp target
{
#pragma omp error at (execution) severity(warning) message("im an error")
}
printf("Done\n");
return 0;
}
|
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_subassign_05f.c | //------------------------------------------------------------------------------
// GB_subassign_05f: C(:,:)<C,struct> = scalar ; no S, C anything, M structural
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserve... |
mvt.c | /**
* mvt.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students.ic.... |
GB_binop__gt_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unop__identity_bool_uint16.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... |
dgemvN_save.c | #define max(a,b) (((a) < (b))? (b) : (a))
#define min(a,b) (((a) < (b))? (a) : (b))
#include <omp.h>
void dgemvN(const int M,const int N,const double alpha,const double* A,const int lda,const double* X,const int incX,const double beta,double* Y,const int incY) {
int i;int j;
int i_bk_1;
int i_bk_2;
int j_b... |
mutual_information.h | #pragma once
#include "sub_function.h"
#include <deform_lib/registration/transform.h>
#include <stk/common/assert.h>
#include <stk/image/volume.h>
#include <stk/math/float3.h>
#include <stk/math/int3.h>
#include <memory>
#include <tuple>
#include <vector>
std::vector<double> gaussian_kernel(const double sigma);
t... |
GB_binop__land_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
GB_binop__iseq_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
tinyexr.h | /*
Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this l... |
ConvexLS.h | ///////////////////////////////////////////////////////////////////////////////
// Dem Bones - Skinning Decomposition Library //
// Copyright (c) 2019, Electronic Arts. All rights reserved. //
///////////////////////////////////////////////////////////////////////////////
... |
2d_simple_v1.c | #include <stdlib.h>
#include <omp.h>
int main()
{
int** arr = malloc(sizeof(int*));
arr[0] = malloc(sizeof(int));
#pragma omp parallel
{
arr[0][0] = 42;
printf("%d\n", arr[0][0]);
}
free(arr[0]);
free(arr);
}
|
GB_unop__identity_fc32_int32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
opi.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
//seed random number generator
// Q2b: get the number of threads to run with from agrv and
// add OpenMP API code to set number of threads here
int Nthreads = atoi(argv[0]);
omp_set_num_threads(Nt... |
DenseMatrix.h | //=================================================================================================
/*!
// \file blaze/math/smp/openmp/DenseMatrix.h
// \brief Header file for the OpenMP-based dense matrix SMP implementation
//
// Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved
//
// This file is part ... |
GB_unaryop__lnot_uint16_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... |
data.h | /*!
* Copyright (c) 2015 by Contributors
* \file data.h
* \brief The input data structure of xgboost.
* \author Tianqi Chen
*/
#ifndef XGBOOST_DATA_H_
#define XGBOOST_DATA_H_
#include <dmlc/base.h>
#include <dmlc/data.h>
#include <rabit/rabit.h>
#include <xgboost/base.h>
#include <xgboost/span.h>
#include <xgboos... |
sqrtpinofalseshare.c | #include<stdio.h>
#include<omp.h>
#define NUM_THREADS 40
static long num_steps = 1000000000;
double step;
int main() {
double x, pi, sum = 0.0;
step = 1.0/(double) num_steps;
omp_set_num_threads(NUM_THREADS);
#pragma omp parallel
{
int ID = omp_get_thread_num();
double thread_sum = 0.0;
int i;
for(i =... |
learntopicmat.h | #ifndef _LEARNTOPICMAT_H // Include guard
#define _LEARNTOPICMAT_H
#include <iostream> // cout,cerr,etc.
#include <stdio.h> // printf, etc.
#include <stdexcept> // Standard exceptions
#include <omp.h>
#include <cmath>
// Eigen
#include <Eigen/Dense>
#include <Eigen/SparseCore>
#include "utils.h"
typedef Eigen::Vect... |
DRB045-doall1-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
classifier.h | #ifndef CLASSIFIER_H__
#define CLASSIFIER_H__
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/sync/named_mutex.hpp>
#include <sstream>
#include <string>
#include <vector>
#incl... |
GB_unop__cos_fc32_fc32.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... |
DRB085-threadprivate-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_binop__min_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
sum_float_avx2.c | //sum.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <malloc.h>
#define N_RUNS 20
#define N 10240000
// read timer in second
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millitm / 1000.0;
}
//Create a matrix and a vec... |
9270.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... |
prox.c | // A Splitting Method for Optimal Control
// by Brendan O'Donoghue, George Stathopoulos and Stephen Boyd
// ===========================================================
// code to perform prox step for robust state estimation example
#include <stdio.h>
#include "../../src/osc.h"
#include "prox.h"
#include <stdlib.h>... |
GB_unop__identity_int8_uint32.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... |
OctTree.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#include "ompfuncs.h"
#endif
#include "OctTree.h"
#include "libgad.h"
static int num_threads=1;
static int periodic = 0;
static float boxsize = 0;
OctNode * initNode ()
{
OctNode *onode;
int i, j;
onod... |
GB_binop__iseq_fc32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unaryop__minv_uint16_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
aula2809_nested.c | #include <stdio.h>
void report_num_threads(int level) {
#pragma omp single
{
printf("Level %d: number of threads in the team - %d\n",level,omp_get_num_threads());
}
}
int main(int argc, char const *argv[]) {
omp_set_dynamic(0);
omp_set_nested(1);
#pragma omp parallel num_threads(2)
{
report_num_... |
matrix.c | //
// Created by vmachado on 2/11/20.
//
#include "matrix.h"
matrix* matrix_alloc(int rows, int columns) {
int len = rows * columns;
matrix *out = aalloc(sizeof(*out));
out->data = aalloc(sizeof(float) * len);
out->rows = rows;
out->columns = columns;
return out;
}
static inline matrix *in... |
tvl1flow_lib.c |
// This program is free software: you can use, modify and/or redistribute it
// under the terms of the simplified BSD License. You should have received a
// copy of this license along this program. If not, see
// <http://www.opensource.org/licenses/bsd-license.html>.
//
// Copyright (C) 2011, Javier Sánchez Pérez <jsa... |
pi_omp_atomic.c | /*
* Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x)
* between 0 and 1.
*
* Parallel version using OpenMP
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h> /* OpenMP */
double getusec_() {
struct timeval time;
gettimeofday(&time, NULL);
... |
ast-dump-openmp-parallel-for.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp parallel for
for (int i = 0; i < x; i+... |
rt_dlaswp.c | #include "runtime.h"
void RT_CORE_dlaswp(Quark *quark, Quark_Task_Flags *task_flags,
int n, double *A, int lda,
int i1, int i2, const int *ipiv, int inc)
{
plasma_context_t *plasma;
plasma = plasma_context_self();
if (plasma->runtime == PLASMA_QUARK) {
QUARK_CORE_dla... |
GB_unaryop__minv_int8_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... |
par_mod_lr_interp.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
random_draw.c | /*
Copyright (c) 2015, Intel Corporation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer... |
laplace_mp.singleTargetBasic.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
// grid size
#define GRIDY 2048
#define GRIDX 2048
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
// smallest permitted change in temperature
#define MAX_TEMP_ERROR 0.02
double T_new[GRIDX+2][GRIDY+2]; // temperature grid
double T[GRIDX+... |
opi.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
//seed random number generator
// Q2b: get the number of threads to run with from agrv and
// add OpenMP API code to set number of threads here
int Nthreads = atoi(argv[1]);
// tells openMP to use... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__fmod_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
centr-exp.h | namespace TSnap {
/////////////////////////////////////////////////
// Node centrality measures (See: http://en.wikipedia.org/wiki/Centrality)
/// PageRank
/// For more info see: http://en.wikipedia.org/wiki/PageRank
template<class PGraph> void GetPageRank_v2(const PGraph& Graph, TIntFltH& PRankH, const double& C=0.8... |
viter.c |
#include "libimagequant.h"
#include "pam.h"
#include "viter.h"
#include "nearest.h"
#include <stdlib.h>
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_max_threads() 1
#define omp_get_thread_num() 0
#endif
/*
* Voronoi iteration: new palette color is computed from weighted average of color... |
arraybench.c | /***************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 2.0 *
* *
* ... |
layerramsubset.h | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2018-2021 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
GB_reduce_panel.c | //------------------------------------------------------------------------------
// GB_reduce_panel: s=reduce(A), reduce a matrix to a scalar
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://suites... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.