source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
mg.c | /*
!-------------------------------------------------------------------------!
! !
! N A S P A R A L L E L B E N C H M A R K S 3.0 !
! !
... |
ellipticSEMFEMSetup.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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 limitatio... |
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)
#... |
pr66820.c | /* PR middle-end/66820 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
void bar (char *);
void
foo (char **x)
{
#pragma omp parallel for
for (int i = 0; i < 16; i++)
{
char y[50];
__builtin_strcpy (y, x[i]);
__builtin_strcat (y, "foo");
bar (y);
}
}
|
config.h | /* config.h. Generated from config.in by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/* Check that config.h is #included before system headers
(this works only for glibc, but that should be enough). */
#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__... |
bitshuffle.c | /*
* Bitshuffle - Filter for improving compression of typed binary data.
*
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
* Website: http://www.github.com/kiyo-masui/bitshuffle
* Created: 2014
*
* See LICENSE file for details about copyright and rights to use.
*
*/
#include "bitshuffle.h"
#include "iochain.h"
... |
axpy_ompacc2.c | // Add example of writing multiple device code using OpenMP 4.0
//
/* change this to do saxpy or daxpy : single precision or double precision*/
#include <omp.h>
#define REAL double
#ifdef __cplusplus
extern "C" {
#endif
/* both the omp version and ompacc version */
extern void axpy_omp(REAL* x, REAL* y, int n, REAL a... |
GB_unop__identity_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
interp_kernel_arm.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
flowIssueSwap.c | int main () {
int Y = 4;
int Z;
Z = Y;
#pragma omp parallel
{
if (Y > 4) {
int t1;
#pragma omp atomic read
t1 = Z;
} else {
#pragma omp atomic write
Y = 10;
}
#pragma omp barrier
int t2;
#pragma omp atomic read
t2 = Z;
}
}
|
transform.h | /*!
* Copyright 2018 XGBoost contributors
*/
#ifndef XGBOOST_COMMON_TRANSFORM_H_
#define XGBOOST_COMMON_TRANSFORM_H_
#include <dmlc/omp.h>
#include <xgboost/data.h>
#include <vector>
#include <type_traits> // enable_if
#include "host_device_vector.h"
#include "common.h"
#include "span.h"
#if defined (__CUDACC__)
... |
GB_binop__plus_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-... |
pi-v16.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 <omp.h> /* OpenMP */
#if _DEBUG_
#define _DEBUG_ 1
#else
#define _DEBUG_ 0
#include "extrae_user_events.h"
#define PROG... |
GB_binop__iseq_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-... |
test.c |
#include <stdio.h>
#include <omp.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (1024*3)
#define M (65)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
double A[M][N], B[M][N], C[N], D[N], E[N];
double S[M];
doub... |
image.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
test.c |
#include <stdlib.h>
#include <stdio.h>
#include "omp.h"
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define N 10
int main()
{
double a[N], a_h[N];
double b[N], c[N];
int fail = 0;
check_offloading();
long cpuExec = 0;
#pragma omp target map(tofrom: cpuExec)
{
cpuExec = omp... |
lowp_SpatialMaxPooling.c | #include <math.h>
#include "../thnets.h"
static void Lowp_SpatialMaxPooling_updateOutput_frame(unsigned char *input_p, unsigned char *output_p,
long nslices,
long iwidth, long iheight,
long owidth, long oheight,
int kW, int kH, int dW, int dH,
int padW, int padH)
{
long k;
#pragma omp parallel for pri... |
Parallel-Impl.h | /*************************************************************************
> File Name: Parallel-Impl.h
> Project Name: CubbyFlow
> Author: Chan-Ho Chris Ohk
> Purpose: Parallel functions for CubbyFlow.
> Created Time: 2017/02/05
> Copyright (c) 2018, Chan-Ho Chris Ohk
**************************************************... |
main.c | // srad.cpp : Defines the entry point for the console application.
#include <stdint.h>
#include "omp.h"
#include "common.h"
//NOTE Make your configuration here
#define NUM_THREADS 8U
#define ITERS 3U
#define CHECK
// #define VERBOSE
// #define OUTPUT
#include "data/input.h"
static inline int32_t
checkResul... |
simd_metadata.c | // RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86
// RUN: %clang_cc1 -fopenmp -triple x86_64-unknown-unknown -target-feature +avx -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=X86-AVX
// RUN: %clang_cc1 -fopenmp -trip... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
fastexp.h | #ifndef FASTEXP_H
#define FASTEXP_H
#include "math.h"
#include <cstdint>
#include <cstddef>
#include <vector>
#include "product.h"
#include "ieee.h"
namespace fastexp
{
enum class Approximation {IEEE, PRODUCT};
/** \brief Fast approximate exponential.
*
* This function implements a fast, vectorizable approximatio... |
rose_v1_output_dep3.c | // an example of output dependence preventing parallelization
// two level loops, check carry level value
#include <stdio.h>
#include <omp.h>
void foo()
{
int i;
int j;
int x;
int y;
#pragma omp parallel for private (y,i,j)
for (i = 0; i <= 99; i += 1) {
#pragma omp parallel for private (y,j) lastp... |
mixed_tentusscher_myo_epi_2004_S3_20.c | // Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt + Rc)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S3_20.h"
GET_CELL_MODEL_DATA(init_cell_model_data)
{
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_o... |
FullConvolutionRules.h | // Copyright 2016-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#ifndef FULLDECONVOLUTIONRULES_H
#define FULLDECONVOLUTIONRULES_H
#include "RectangularRegions.h"
template <Int dimen... |
getStartLists.c | #include "defs.h"
double getStartLists(graph* G, edge** maxIntWtListPtr,
INT_T* maxIntWtListSizePtr)
{
mcsim_skip_instrs_begin();
LONG_T *local_max, maxWeight;
edge *maxIntWtList;
LONG_T maxIntWtListSize;
LONG_T *p_start, *p_end;
double elapsed_time;
elapsed_time = get_seconds();
... |
GB_binop__div_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
lloyds_par.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <stdbool.h>
#include <omp.h>
#include "csvparser.h"
void vector_init(double *a, int length) {
for (int i = 0; i < length; i++) {
a[i] = 0;
}
}
void vector_copy(double *dst, double *src, int length) {
for (int i = 0; i < len... |
tinyexr.h | /*
Copyright (c) 2014 - 2017, Syoyo Fujita
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 list of conditions and t... |
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)
#... |
11MultiThreadedFibonacciSeries.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main() {
int n, a[100], i, j, random;
omp_set_num_threads(2);
printf("Enter the no. of Fibonacci Series to be generated: ");
scanf("%d", &n);
a[0] = 1;
a[1] = 1;
for (j = 0; j < n; j++) {
random = rand() % 24;
... |
composite.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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)... |
common_vector_math.c | #include "common_vector_math.h"
#include <math.h>
uint64_t get_nnz_uint64_array(uint64_t* array, uint64_t no_elements) {
uint64_t nnz, j;
nnz = 0;
for (j = 0; j < no_elements; j++) {
if (array[j] != 0) {
nnz += 1;
}
}
return nnz;
}
VALUE_TYPE calculate_squared_vector_le... |
GB_unaryop__identity_uint64_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... |
convolution_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 ... |
Parallel.h | #pragma once
#include <ATen/ATen.h>
#include <c10/core/thread_pool.h>
#include <atomic>
#include <cstddef>
#include <exception>
#ifdef _OPENMP
#include <omp.h>
#endif
namespace at {
namespace internal {
// This parameter is heuristically chosen to determine the minimum number of
// work that warrants paralellism. Fo... |
cpu_adam.h | #pragma once
#include <cuda_fp16.h>
#include <cuda_runtime_api.h>
#include <stdio.h>
#include <cassert>
#include "cuda.h"
#include "custom_cuda_layers.h"
#include "simd.h"
#define STEP(SPAN) \
void Step_##SPAN(float* _params, \
float* grads, ... |
pr48716.c | /* PR c/48716 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
int
main (void)
{
#pragma omp parallel default(none)
{
static int s;
int t = 0;
#pragma omp atomic
s++;
t++;
}
#pragma omp task default(none)
{
static int s;
int t = 0;
#pragma omp atomic
s++;
t++... |
displacement_criteria.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
#if !defined(KRATOS_DISPLAC... |
model.h | #pragma once
#include <util/common/geom/point.h>
#include <vector>
#include <map>
namespace model
{
/*****************************************************/
/* params */
/*****************************************************/
struct parameters
{
... |
visual-effects.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
libimagequant.c | /*
** © 2009-2018 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include ... |
repeated_calls.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#define USE_PRIVATE_TOOL 1
#include "callback.h"
__attribute__((noinline))
int foo(int x) {
#pragma omp parallel num_threads(2)
{
#pragma omp atomic
x++;
}
return x;
}
__attribute__((noinline))
int bar(int x) {
#pragma omp parallel num_thread... |
GB_unop__identity_uint32_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... |
qsort_arg_mt.c | /*
* Imported from PostgreSQL sources by Teodor Sigaev <teodor@sigaev.ru>, <sigaev@corp.mail.ru>
*/
/*
* qsort_arg.c: qsort with a passthrough "void *" argument
*
* Modifications from vanilla NetBSD source:
* Add do ... while() macro fix
* Remove __inline, _DIAGASSERTs, __P
* Remove ill-considered "swap_... |
postgres_fmt_plug.c | /* PostgreSQL MD5 challenge-response cracker patch for JtR. Hacked together
* during October of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* Use Ettercap to get PostgreSQL MD5 challenge-response pairs in JtR format.
* E.g. ettercap -Tq -r /home/user/sample.pcap
*
* Input format:
* $postgres$user*salt*ha... |
interpolate_v2_op.h | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
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... |
6617.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose
void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[2000 + 0][2600 + 0], double ey[2000 + 0][2600 + 0], doub... |
map.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i;
#pragma omp parallel num_threads(2) // seta o número de threads em 2
{
int tid = omp_get_thread_num(); // lê o identificador da thread
#pragma omp for ordered
for(i = 1; i <= 3; i++)
{
#pragma omp ordered
... |
GB_binop__land_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
BSConstantSumWots.h | #pragma once
#include "wots/ConstantSumWots.h"
#include <iostream>
template <class D, int W, int T, int S>
class BSConstantSumWots : public virtual ConstantSumWots<D, W, T, S> {
public:
BSConstantSumWots() noexcept {};
BSConstantSumWots(const ByteArray& seed) noexcept : ConstantSumWots<D,W,T,S>(seed) {};
mpz_c... |
yolov2_forward_network.c | #include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h
// softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h
#define GEMMCONV
/*
// from: box.h
typedef struct {
float x, y, w, h;
} box;
... |
Cycle.c | /*
* The MIT License
*
* Copyright 2020 The OpenNARS authors.
*
* 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 rights
* to use,... |
GB_unaryop__identity_fp32_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
irbuilder_for_unsigned_runtime.c | // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
// RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
#if... |
utils.h | #pragma once
#include <cstdint>
#include <cmath>
#include <cstdio>
#include <omp.h>
#include <thread>
constexpr double MAX_ERROR = 0.01;
constexpr int NUM_PRINTS = 20;
int divUp(int a, int b)
{
return (a + b - 1) / b;
}
uint16_t Fp32ToFp16(float f32) {
uint32_t f = *(uint32_t*)& f32;
uint16_t f16 = 0;
... |
ompTaskSpawn.h | #include <stdint.h>
#ifdef _OPENMP
#include <omp.h>
#endif
static void ompTaskSpawn(int64_t trials, int64_t numTasks) {
int i, j;
#ifdef _OPENMP
omp_set_num_threads(numTasks);
#endif
for (i=0; i<trials; i++) {
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (j=0; j<numTasks; j++) { }
... |
BsplineFunctor.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: John R. G... |
GB_unaryop__minv_int64_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
masterConstruct.c | int main() {
int x = 1;
#pragma omp parallel
{
int localX = 2;
#pragma omp master
{
localX = x;
}
localX = 20;
}
}
|
array.h | /** @file array.h
@brief Defines a container class template for components of a NF model.
The Array class is used as a container for Population, Propagator, Coupling,
and Dendrite classes. It provides a `step()` member function that iteratively
calls the step method for each element.
@author Peter Drysdale,... |
TaskDispatcher.h |
#include "nvtt.h"
// OpenMP
// http://en.wikipedia.org/wiki/OpenMP
#if defined(HAVE_OPENMP)
#include <omp.h>
#endif
// Gran Central Dispatch (GCD/libdispatch)
// http://developer.apple.com/mac/library/documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html
#if NV_OS_DARWIN && defined(HAVE_DI... |
life.c | //===-- life.c - Parallel region printing a message ---------------*- 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
//
//===---------------------------... |
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 ... |
3d7pt.c | /*
* Order-1, 3D 7 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) ... |
debug_test_system.h | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2013, Knut Reinert, FU Berlin
// Copyright (c) 2013 NVIDIA Corporation
// All rig... |
ccsd_grad.c | /* Copyright 2014-2018 The PySCF Developers. 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 requi... |
GB_unop__asin_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
hello.c | #include <stdio.h>
int main(void)
{
#pragma omp parallel
printf("Hello, world.\n");
return 0;
} |
omp_point_product.c | #include <omp.h>
#include <stdio.h>
#define N 100000
main ()
{
int i,tid,NTHR;
float a[N],b[N],c[N];
float sum = 0;
/* Some initializations */
for (i=0; i < N; i++)
a[i] = b[i] = i * 1.0;
double start = omp_get_wtime();
omp_set_dynamic(0);
omp_set_num_threads(4)... |
TaskClauseLink.c | int x;
int main() {
int x;
#pragma omp task if (1)
{
}
#pragma omp task
{
int x;
}
}
|
wavelet.c | /* Copyright 2014. The Regents of the University of California.
* Copyright 2017. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013 Frank Ong <uecker@eecs.berkeley.edu>
* 2013-2017 Martin Uecker <martin.u... |
OffchainWithdrawalCircuit.h | #ifndef _OFFCHAINWITHDRAWALCIRCUIT_H_
#define _OFFCHAINWITHDRAWALCIRCUIT_H_
#include "Circuit.h"
#include "../Utils/Constants.h"
#include "../Utils/Data.h"
#include "../Utils/Utils.h"
#include "../Gadgets/AccountGadgets.h"
#include "ethsnarks.hpp"
#include "utils.hpp"
#include "gadgets/subadd.hpp"
using namespace et... |
NearestNeighbor.h | #pragma once
#include <flann/flann.hpp>
#include "Eigen.h"
#define MAX_DISTANCE 0.005f
struct Match {
int idx;
float weight;
};
class NearestNeighborSearch {
public:
virtual ~NearestNeighborSearch() {}
virtual void setMatchingMaxDistance(float maxDistance) {
m_maxDistance = maxDistance; // Squared
}
flo... |
deconv_2d.h | // Copyright 2018 Xiaomi, Inc. 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 applicab... |
GB_binop__pair_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... |
GB_binop__islt_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
omp_parallel_sections_firstprivate.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
int test_omp_parallel_sections_firstprivate()
{
int sum;
int sum0;
int known_sum;
sum =7;
sum0=11;
#pragma omp parallel sections firstprivate(sum0)
{
#pragma omp section
{
#pragma omp critical
{
su... |
3.c | /* Написать программу, в которой объявить и присвоить начальные значения целочисленным
переменным: a и b, определить две параллельные области, первая – с числом нитей 2,
вторая – с числом нитей 4. Для первой области переменные a и b объявить защищенными, с
режимом доступа private и firstprivate соответственно, внутри о... |
GB_binop__times_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... |
Common.h | #pragma once
#include <utility>
#include <array>
constexpr auto AUDIO_BLOCK_SIZE = (256);
constexpr auto POLY = (4);
constexpr auto CHANNELS = (8);
constexpr auto MAX_SFX_PB = (4);
//sigh
constexpr float PI = (3.14159265358979323846f);
constexpr float SQRR2 = (1.4142135623730950488016887242097f);
constexpr float IS... |
DRB049-fprintf-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... |
aux_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)
**************************************... |
ccl_utils.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <gsl/gsl_errno.h>
#include "ccl.h"
/* ------- ROUTINE: ccl_linear spacing ------
INPUTS: [xmin,xmax] of the interval to be divided in N bins
OUTPUT: bin edges in range [xmin,xmax]
*/
double * ccl_linear_spacing(double xmin, double xmax, int N)
{
do... |
mxnet_op.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_fp32_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
kernel2.h | // Copyright 2016, National University of Defense Technology
// Authors: Xuhao Chen <cxh@illinois.edu>
#define MAXCOLOR 128 // available colors: 0 ~ (MAXCOLOR - 1)
void FirstFit(int m, int nnz, int *csrRowPtr, int *csrColInd, Worklist &inwl, int *coloring) {
unsigned start = inwl.start;
unsigned end = inwl.end;
#if... |
omp_bug5fix.c | /******************************************************************************
* FILE: omp_bug5fix.c
* DESCRIPTION:
* The problem in omp_bug5.c is that the first thread acquires locka and then
* tries to get lockb before releasing locka. Meanwhile, the second thread
* has acquired lockb and then tries to get loc... |
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>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Soft... |
convolution_1x1_pack1to4_int8.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 ... |
Mat_dh.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... |
dft.c | // Copyright Naoki Shibata 2010 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
#includ... |
13_omp_loops.c | // clang-format off
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s
// RUN: %c-to-llvm -fno-disca... |
eratostene.c | /* Crivello di eratostene parallelo (openmp).
* Parametri:
* "int * sieve": array di int di lunghezza almeno n/2 opportunamente
* allocato dal chiamante nel quale saranno marchiati con "1" i
* numeri dispari primi. NOTA BENE: "sieve[i] = 1" indica che il
* numero "(i * 2) + 1" è primo (sieve contiene solo n... |
sub_omp.c | /*
This file is part of ParTI!.
ParTI! is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
ParTI! is distributed... |
GB_binop__bclr_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
dds.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
kMeansClustering.h |
#ifndef CORE_MATH_KMEANSCLUSTERING_H_
#define CORE_MATH_KMEANSCLUSTERING_H_
namespace ml {
class vec2fKMeansMetric
{
public:
static float Dist(const vec2f &L, const vec2f &R)
{
return vec2f::distSq(L, R);
}
};
class vec3fKMeansMetric
{
public:
static float Dist(const vec3f &L, const vec3f &R)
{
return vec3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.