source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
Tanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/Tanh.c"
#else
static int nn_(Tanh_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor);
THTensor_(resizeAs)(output, input);
if (input->nDimension =... |
configurator.c | /* Simple tool to create config.h.
* Would be much easier with ccan modules, but deliberately standalone.
*
* Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (... |
DRB063-outeronly1-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... |
GB_binop__isge_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__bset_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-... |
ClangASTHelper.h | //
// Copyright (c) 2012, University of Erlangen-Nuremberg
// Copyright (c) 2012, Siemens AG
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain... |
Example_icv.1.c | /*
* @@name: icv.1c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
*/
#include <stdio.h>
#include <omp.h>
int main (void)
{
omp_set_nested(1);
omp_set_max_active_levels(8);
omp_set_dynamic(0);
omp_set_num_threads(2);
#pragma omp parallel
{
omp_set_num_threads(3);
#prag... |
rose_v1_scalar_true.c | /*
* Scalar-to-scalar dependencies
* */
#include <omp.h>
int a[100];
void foo2()
{
int i;
int tmp;
#pragma omp parallel for private (tmp,i)
for (i = 0; i <= 99; i += 1) {
tmp = a[i] + i;
a[i] = tmp;
}
}
void foo()
{
int i;
int tmp;
#pragma omp parallel for private (i) lastprivate (tmp)
... |
serial_tree_learner.h | #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/dataset.h>
#include <LightGBM/tree.h>
#include "feature_histogram.hpp"
#include "spli... |
eltwise_layernorm.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
drupal7_fmt_plug.c | /*
* Drupal 7 phpass variant using SHA-512 and hashes cut at 258 bits.
*
* This software is Copyright (c) 2012 magnum, and it is hereby released to the
* general public under the following terms: Redistribution and use in source
* and binary forms, with or without modification, are permitted.
*
* These are 8 by... |
kernel_sin.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @generate NDIM -> n 1 2 3 4
* Generate different functions fo... |
graph.c | /*!
* \file
*
* \brief Various routines with dealing with sparse graphs
*
* \author George Karypis
* \version\verbatim $Id: graph.c 13328 2012-12-31 14:57:40Z karypis $ \endverbatim
*/
#include <GKlib.h>
#define OMPMINOPS 50000
/*************************************************************************... |
3291.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... |
nt2_fmt_plug.c | /*
* Alternate NT format, with reduced binary size
*
* This software is Copyright 2011, 2012 magnum, and it is hereby released to
* the general public under the following terms: Redistribution and use in
* source and binary forms, with or without modification, are permitted.
*
* Losely based on rawSHA1, by bart... |
GB_subassign_09.c | //------------------------------------------------------------------------------
// GB_subassign_09: C(I,J)<M,repl> = scalar ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identif... |
render.c | #include "globals.h"
#include "render.h"
#include "terrain.h"
int render_terrain(int x_0, int y_0) {
#pragma omp parallel for collapse(2)
for (int y = 0; y < SCREEN_HEIGHT; ++y) {
for (int x = 0; x < SCREEN_WIDTH; ++x) {
switch (terrain_get_pixel(x + x_0, y + y_0, TERRAIN_VOID).type) {
... |
convolution_3x3_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. 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 of the License at
//
//... |
cc_fmap2d.c | #include <stdio.h>
#include <string.h>
#ifdef ENABLE_OPENMP
#include <omp.h>
#endif
#include "cc_assert.h"
#include "cc_array.h"
#include "cc_basic.h"
#include "cc_fmap2d.h"
#include "cc_tsrmgr.h"
#include "global_fn_cfg.h"
cc_tensor_t *cc_fmap2d_bias(cc_tensor_t *inp,
const cc_tensor_t *bias, const char *name)
{... |
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_hyper_prune.c | //------------------------------------------------------------------------------
// GB_hyper_prune: remove empty vectors from a hypersparse Ap, Ah list
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// htt... |
ast-dump-openmp-target-teams-distribute-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 target teams distribute parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target teams dis... |
matrix.h | /**
* @file matrix.h This code provide a templated matrix implementation
* @author TPOC: contact@palisade-crypto.org
*
* @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT)
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permit... |
clauum.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/zlauum.c, normal z -> c, Fri Sep 28 17:38:08 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
trsm_x_csr_n_hi_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#include <memory.h>
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT m = A-... |
main.ref.c | #include <sys/time.h>
#include <time.h>
#include <stdio.h>
static unsigned long long current_time_ns() {
#ifdef __MACH__
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), c... |
3d7pt.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
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
benchmark_mesonfield.h | #ifndef _BENCHMARK_MESONFIELD_H
#define _BENCHMARK_MESONFIELD_H
CPS_START_NAMESPACE
inline int toInt(const char* a){
std::stringstream ss; ss << a; int o; ss >> o;
return o;
}
void setupDoArg(DoArg &do_arg, int size[5], int ngp, bool verbose = true){
do_arg.x_sites = size[0];
do_arg.y_sites = size[1];
do_a... |
ex1.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define CHUNKSIZE 10
#define N 10000000 // 10 mil
float a[N], b[N], c[N];
int main (int argc, char *argv[])
{
int nthreads, tid, i, chunk;
/* Some initializations */
for (i = 0; i < N; i++) {
a[i] = b[i] = i * 1.0;
}
chunk = CHUNKSIZE;
doub... |
DRACC_OMP_018_Counter_wrong_lock_simd_yes.c | /*
Concurrent access on a counter with the wrong lock, by utilising OpenMP Lock Routines and simd. Atomicity Violation.
Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams.
Although they are able to interrupt eachother leading to a wrong result. Intra and Inte... |
GB_unaryop__ainv_bool_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... |
GB_unop__floor_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... |
blas_server_omp.c | /*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
/* Redistribution and use in sou... |
zgeqrs.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma.h"
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include ... |
test.c |
#include <stdio.h>
#include <float.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (957*3)
#define ZERO(X) ZERO_ARRAY(N, X)
#define INIT() { \
INIT_LOOP(N, { \
Ac[i] = i % 100 == 0 ? 1 : 0; \
Bc[i] = i ... |
sse-bnd-dag0.h | #include <util/omp_wrapper.h>
extern "C"
void wilson_dslash_bnd_dag0(
IFloat *chi_p_f,
IFloat *u_p_f,
IFloat *psi_p_f,
int cb,
Wilson *wilson_p)
{
int lx, ly, lz, lt;
int cbn;
int vol;
lx = wilson_p->ptr[0];
ly = wilson_p->ptr[1];
lz = wilson_p->ptr[2];
lt = wil... |
solver_main.c | /**
* \file
* \brief the generic main file for all CPU solvers
*
* \author Nicholas Curtis
* \date 03/09/2015
*
* Contains main function, setup, initialization, logging, timing and driver functions
*/
/** Include common code. */
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#inc... |
GB_unaryop__minv_fp32_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... |
omp_binding_forex.c | #include <omp.h>
#include <stdio.h>
#include <sched.h>
int main( int argc, char**argv )
{
for (int i=1; i<100; i++){
#pragma omp parallel
{
printf( "Running from thread %d of %d on cpu %2d!\n",
omp_get_thread_num()+1,
omp_get_num_threads(),
sched_getcpu());
... |
y_solve.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB BT code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
pmesh_util.c |
/* This routine does *no* bounds checking. Be careful. */
void _bin_delta_c(
double* rho,
int* pixel_ind,
double* pixel_weight,
int* radial_ind,
double* radial_weight,
double* out,
int npart,
int npix,
int nrad
) {
#pragma omp parallel for
for (int ipart = 0; ipart < npar... |
fused_rowwise_nbit_conversion_ops.h | #pragma once
#include <algorithm>
#include <vector>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
// for param_search_greedy
#include "caffe2/operators/fused_rowwise_nbitfake_conversion_ops.h"
#include "caffe2/perfkernels/fu... |
condense.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... |
ast-dump-openmp-begin-declare-variant_8.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s
// expected-no-diagnostics
#pragma omp begin declare variant match(device={kind(cpu)})
int also_before(void) {
retu... |
GB_unop__identity_uint32_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... |
pooling_2x2_pack8.h |
// Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 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 ... |
Example_task_dep.5.c | /*
* @@name: task_dep.5c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
// Assume BS divides N perfectly
void matmul_depend(int N, int BS, float A[N][N], float B[N][N], float
C[N][N] )
{
int i, j, k, ii, jj, kk;
for (i = 0; i < N; i+=BS) {
for (j = 0; j < N; j+=... |
main.c | #include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define I(N, i, j) ((N) * (i) + (j))
#ifdef DEBUG
# define DBG(FORMAT, ARGS...) fprintf(stderr, FORMAT, ARGS)
#else
# define DBG(FORMAT, ARGS...) \
{}
#endif
void to_image(char* filename, siz... |
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) ... |
pvector.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef PVECTOR_H_
#define PVECTOR_H_
#include <algorithm>
/*
GAP Benchmark Suite
Class: pvector
Author: Scott Beamer
Vector class with ability to not initialize or do initialize in parallel
- std:... |
GB_unaryop__lnot_int64_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... |
morn_image_geometry.c | /*
Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com>
Licensed under the Apache License, Version 2.0; 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 wri... |
tinyexr.h | #ifndef TINYEXR_H_
#define 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 th... |
pmv-OpenMP-b.c | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
//#define PRINT_ALL
#define VECTOR_GLOBAL
//#define VECTOR_DYNAMIC
#ifdef VECTOR_GLOBAL
#define MAX 1073741824 //=2^30
double v[MAX], m[MAX][MAX], r[MAX];
#endif
int main(int argc,char** argv){
if (argc<2){
printf("Faltan nº componentes del vector \n"... |
sparse.c | /*
Copyright (c) 2013, 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 di... |
lu.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - LU
This benchmark is an OpenMP C version of the NPB LU code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
feature_group.h | /*!
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_FEATURE_GROUP_H_
#define LIGHTGBM_FEATURE_GROUP_H_
#include <LightGBM/bin.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/ra... |
spmv.h | #pragma once
#include <cstring>
#include "dmlc/data.h"
#include "dmlc/omp.h"
namespace dmlc {
/**
* \brief a range between [begin, end)
*/
struct Range {
Range(size_t _begin, size_t _end) : begin(_begin), end(_end) { }
Range() : Range(0, 0) { }
~Range() { }
/**
* \brief evenly divide this range into npar... |
update_ops_named_SWAP.c |
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
//void SWAP_gate_old_single(UINT target_qubit_index_0, UINT target_qubit_index_1, CTYPE *state, ITYPE dim);
//void SWAP_gate_old_parallel(U... |
GB_binop__bxnor_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... |
5.race2.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N];
#pragma omp parallel for
for (int i = 1; i < N; i++)
for (int j = 0; j < N; j++)
A[i][j] = A[i - 1][j];
}
// CHECK: Data Race detected
// END
|
BenchUtils.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* 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.
*/
#pragma once
#include <chrono>
#include <functional>
#include <vector>
#include <immintrin.h>
#ifdef _O... |
gimplify.c | /* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
Copyright (C) 2002-2018 Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@redhat.com>.
This fil... |
test.c | #include <stdio.h>
#include <time.h>
#include <omp.h>
int main()
{
int x = 1;
double secs = 0;
clock_t begin = clock();
#pragma omp parallel num_threads (2)
{
#pragma omp for schedule (static, 400)
for (int i = 0; i<800; i++)
{
//printf("%d",x);
x++;
... |
RendererDeferred.h | #pragma once
#include "pc.h"
#include "RendererBase.h"
class RendererDeferred: public RendererBase {
private:
// Defaults
struct {
union {
float4 black_void1[4];
const float black_void2[4] = { 0.f, 0.f, 0.f, 0.f };
};
union {
float4 white_snow1[4];
... |
ft_ao.c | /*
* Author: Qiming Sun <osirpt.sun@gmail.com>
*/
#include <stdlib.h>
#include <string.h>
#include <complex.h>
#include <assert.h>
#include "config.h"
#include "cint.h"
#include "gto/ft_ao.h"
#include "vhf/fblas.h"
#define INTBUFMAX 16000
#define IMGBLK 80
#define OF_CMPLX 2
#define MIN(X,Y) ... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
omp_for_schedule_static_3.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <stdlib.h>
#include "omp_testsuite.h"
#include "omp_my_sleep.h"
#define CFSMAX_SIZE 1000
#define MAX_TIME 0.01
#ifdef SLEEPTIME
#undef SLEEPTIME
#define SLEEPTIME 0.0005
#endif
#define VERBOSE 0
int test_omp_for_schedule_static_3()
{
int threads;
int i... |
collective_reduction.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
convolution_winograd_dot_pack8_fp16s.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 ... |
GB_unaryop__minv_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... |
cancellation_for_sections.c | // RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run
// XFAIL: gcc
// Clang had a bug until version 4.0.1 which resulted in a hang.
// UNSUPPORTED: clang-3, clang-4.0.0
// Regression test for a bug in cancellation to cover effect of `#pragma omp cancel`
// in a loop construct, on sections construct.
// Pas... |
hd_joint_probability_generator_inl.h | /*
*
* Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above ... |
omp_task_final.c | <ompts:test>
<ompts:testdescription>Test which checks the omp task directive. The idea of the tests is to generate a set of tasks in a single region. We let pause the tasks generated so that other threads get sheduled to the newly opened tasks.</ompts:testdescription>
<ompts:ompversion>3.0</ompts:ompversion>
<ompts:dir... |
Example_target_data.6.c | /*
* @@name: target_data.6c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
#define THRESHOLD 1000000
extern void init(float*, float*, int);
extern void init_again(float*, float*, int);
extern void output(float*, int);
void vec_mult(float *p, float *v1, float *v2, int N)
{
... |
laplace2d.c | /* Copyright (c) 2012, NVIDIA CORPORATION. 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 condi... |
atomic-9.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
/* { dg-additional-options "-Wno-volatile" { target c++ } } */
/* { dg-require-effective-target cas_int } */
volatile int *bar(void);
void f1(void)
{
#pragma omp atomic
*bar() += 1;
}
/* { dg-final { scan-tree-dump-times "__atomic_fetch... |
GB_binop__bset_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__isge_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-... |
plot.c | /*****************************************************************************************************************************/
/** **/
/** **/
/** Enough. It can't be that you need twenty libraries and several Mbytes to make a bloody xy plot ... **/
/** **/
/*... |
ulf_utilities.h | /*
==============================================================================
KratosULFApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Pawel Ryzhakov
pooyan@cimne.upc... |
image-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% IIIII M M AAA GGGG EEEEE ... |
VolumetricAveragePooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricAveragePooling.c"
#else
static void nn_(VolumetricAveragePooling_updateOutput_frame)(
real *input_p, real *output_p, long nslices,
long itime, long iwidth, long iheight,
long otime, long owidth, long oheight,
int kT, int kW, int kH, int dT, int... |
channel.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mvt_teams.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... |
polybench.c | // RUN: mlir-clang %s %stdinclude -S --function=* | FileCheck %s
/**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.fr>
*
* Web address: http://polybench.sourceforge.net
*/
/* polybench.c: this file is part of PolyBench/C *... |
GB_unop__identity_fp64_int8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
mm.c | /*
Copyright (c) 2016 Jeremy Iverson
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, copy, modify, merge, publish, distribute, ... |
matmult_omp_explicit3.c | /*
Matrix multiplication example
OpenMP version, explicit domain decomposition with reduction clause
and more!
Jim Teresco, CS 338, Williams College, CS 341, Mount Holyoke College
Sun Feb 23 18:54:41 EST 2003
Updated for CSIS-335, Siena College, Fall 2021
*/
/* header files needed for printf, get... |
openmp-ex26.c | #include <stdio.h>
int main(void)
{
int tickets_out = 0;
#pragma omp parallel
{
int my_ticket;
/* we should know from studying the data model before that having all of
* the threads try to increment tickets_out at the same time won't work,
* but especially for task based parallelism, synchron... |
bucle-forModificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv)
{
int i, n = 9;
if(argc < 2) {
fprintf(stderr,"\n[ERROR] - Falta nº iteraciones \n");
exit(-1);
}
n = atoi(argv[1]);
#pragma omp parallel for
{
for (i=0; i<n; i++)
printf("thread %d ejecuta la iteración %d del bucle\n... |
openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <omp.h>
int main(int argc, char *argv[])
{
__int64_t total = 1e10; // Example amount
int tn = 12; // Threads
__int64_t count = 0;
double x, y;
#pragma omp parallel num_threads(tn)
{
unsigned seed... |
9268.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/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])... |
main.c | #include "config.h"
/* libutils */
#include <libutils/utils.h>
#include <libutils/tictoc.h>
#include <libutils/message_id.h>
#include <libutils/parallel.h>
#include "main.h"
#include "matrix_import.h"
#include "distribute.h"
#include "thread_routine.h"
#include "reorder.h"
/*
Compute maximum relative error for t... |
sub_kernel.c | #include <stdio.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#define MATSIZE 1000
struct {
int nsize;
float a2[MATSIZE][MATSIZE]; /* address of matrix.a2 == &matrix.a2[0][0] */
float b2[MATSIZE][MATSIZE];
float c2[MATSIZE][MATSIZE];
} matrix;
void set_array()
{
int i, j, nsize;
nsize = matrix.nsize... |
pmv-OpenMP-b.c | // Compilar con -O2 y -fopenmp
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main(int argc, char** argv){
int i, j, f, c;
double t1, t2, total;
srand(time(NULL));
//Leer argumento de entrada (no de componentes del vector)
if (argc<2){
printf("Falta tamaño de matriz y vector\n");
exit(-1);
}
... |
MatxVect.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <math.h>
#include <time.h>
/*
This is a function to calculate the product of a matrix by a vector.
You have to call it in a main program.
-n: rows
-m: columns
*/
double *matxvet(int n, int m, double *vect, double *matrix);
int main()
{
int n, m, i, ... |
GB_unaryop__lnot_int8_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
csr_block_matvec.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... |
Example_target.4.c | /*
* @@name: target.4c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
extern void init(float*, float*, int);
extern void output(float*, int);
void vec_mult(float *p, float *v1, float *v2, int N)
{
int i;
init(v1, v2, N);
#pragma omp target map(to: v1[0:N], v2[:N]) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.