source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
lu_par_loop.c | #include "trace.h"
#include "common.h"
/* This routine performs the LU factorization of a square matrix by
block-columns */
void lu_par_loop(Matrix A){
int i, j;
/* Initialize the tracing system */
trace_init();
#pragma omp parallel private (i)
{
for(i=0; i<A.NB; i++){
#pragma omp single
{... |
reduction-clause.c | /*
$ gcc -fopenmp -O2 reduction-clause.c -o reduction-clause
*/
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main(int argc, char **argv) {
int i, n=20, a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n =... |
reduction-clauseModificado2.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(int argc, char **argv) {
int i, n=20, a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n = atoi(argv[1]); if (n>20) {n=20; printf("n=%d",n);}
... |
openmp_reduction2.c | ///TAFFO_TEST_ARGS -fopenmp
#include <stdio.h>
#define NUM_THREADS (10)
int main(int argc, char *argv[])
{
float result __attribute__((annotate("scalar(range(0,5000))"))) = 0.0;
#pragma omp parallel reduction(+:result) num_threads(NUM_THREADS)
result += 500.0;
printf("result: %f\n", result);
}
|
hypre_smp_forloop.h | /*BHEADER**********************************************************************
* Copyright (c) 2006 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
* Written by the HYPRE team, UCRL-CODE-222953.
* All rights reserved.
*
* This file is part of HYPRE (see ht... |
GB_binop__pair_fc64.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__first_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
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) ... |
GB_binop__copysign_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... |
Example_SIMD.5.c | /*
* @@name: SIMD.5c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
void work( double **a, double **b, double **c, int n )
{
int i, j;
double tmp;
#pragma omp for simd collapse(2) private(tmp)
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
tm... |
GB_bitmap_AxB_saxpy_A_sparse_B_bitmap_template.c | //------------------------------------------------------------------------------
// GB_bitmap_AxB_saxpy_A_sparse_B_bitmap: C<#M>+=A*B, C bitmap, M any format
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
solucao_omp_do_for.c | /******************************************************************************
* FILE: omp_workshare1.c
* DESCRIPTION:
* OpenMP Example - Loop Work-sharing - C/C++ Version
* In this example, the iterations of a loop are scheduled dynamically
* across the team of threads. A thread will perform CHUNK iterations
*... |
GB_unop__identity_fp32_uint32.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... |
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
// 4 layers in 1: convolution, batch-normalization, BIAS and act... |
mmul_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... |
ten_tusscher_2004_epi_S2_3.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_3.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO:... |
gemm.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... |
randomized_rm.h | // -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & Newcastle University for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
GB_unop__isnan_bool_fc32.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... |
fixed.c | #include <stdio.h>
static int i, counter;
#pragma omp threadprivate(i)
int main()
{
#pragma omp parallel
for (i = 0; i < 100000; i++)
#pragma omp atomic
counter++;
printf("counter=%d\n", counter);
return 0;
}
|
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 <cstring>
#include <memory>
#include <numeric>
#include <al... |
c-tree.h | /* Modula-3: modified */
/* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
... |
prob3.c | /*
Student: Naoki Atkins
Class: 479 - 01
HW4
*/
#include <omp.h>
#include <stdio.h>
#define N 8
int main(int argc, char** argv)
{
int arr[32];
int i, th_id, odd_count;
int sum = 0;
omp_set_num_threads(N);
#pragma omp parallel shared(arr, sum) private(i, odd_count, th_id)
... |
OmpForEndLink.c | int main() {
int i;
#pragma omp for
for (i = 0; i < 10; i++) {
123;
}
}
|
GB_subassign_zombie.c | //------------------------------------------------------------------------------
// GB_subassign_zombie: C(I,J)<!,repl> = empty ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Iden... |
spatial.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @file src/applications/spatial.c
* @version 0.1.1
* @author ... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__asin_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... |
ZQ_CNN_MTCNN.h | #ifndef _ZQ_CNN_MTCNN_H_
#define _ZQ_CNN_MTCNN_H_
#pragma once
#include "ZQ_CNN_Net.h"
#include "ZQ_CNN_BBoxUtils.h"
#include <omp.h>
namespace ZQ
{
class ZQ_CNN_MTCNN
{
public:
using string = std::string;
ZQ_CNN_MTCNN()
{
min_size = 60;
thresh[0] = 0.6;
thresh[1] = 0.7;
thresh[2] = 0.7;
nms_thr... |
cryptocontext.h | // @file cryptocontext.h -- Control for encryption operations.
// @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 permitted provide... |
target_data-6.c | /* { dg-do run } */
/* { dg-require-effective-target offload_device_nonshared_as } */
#include <stdlib.h>
#include <omp.h>
#define EPS 0.000001
#define THRESHOLD 1000
const int MAX = 1800;
void check (float *a, float *b, int N)
{
int i;
for (i = 0; i < N; i++)
if (a[i] - b[i] > EPS || b[i] - a[i] > EPS)
... |
critical1.c | #include <omp.h>
int main (void)
{
int a=0,b=0,c =0;
#pragma omp parallel
{
#pragma omp critical(aaa) hint(test)
a=a+1;
#pragma omp critical (bbb), hint(test)
b=b+1;
#pragma omp critical
c=c+1;
}
return 0;
}
|
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... |
initAtoms.c | /// \file
/// Initialize the atom configuration.
#include "initAtoms.h"
#include <math.h>
#include <assert.h>
#include "constants.h"
#include "decomposition.h"
#include "parallel.h"
#include "random.h"
#include "linkCells.h"
#include "timestep.h"
#include "memUtils.h"
#include "performanceTimers.h"
static void comp... |
GB_binop__ge_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unaryop__ainv_fp64_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... |
raw2iq.c | // raw2iq.c - A tool for converting RASDRstreamer .raw files to interleaved I,Q
//
// Acknowledgements:
// http://stackoverflow.com/questions/14386/fopen-deprecated-warning
#if defined(_MSC_VER)
#define _CRT_SECURE_NO_DEPRECATE
#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h> // for tolower()
#includ... |
pi_omp_private.c | /*
This program will numerically compute the integral of
4/(1+x*x)
from 0 to 1.
History: Written by Tim Mattson, 11/99.
Configure eclipse based: https://medium.com/swlh/openmp-on-ubuntu-1145355eeb2
*/
#include <omp.h>
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
// Variables Declara... |
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... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
expected_output.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
//---------------------------------------------------------------------
// program LU
//---------------------------------------------------------------------
//----------
// Class S:
//----------
/*full problem size*/
/*nu... |
rice1.c | /*
* Contributed by Yonghong Yan
*
* A tricky case when a variable is used to define array size
* Outliner will have trouble to generate a legal array type based on the variable
* within the outlined function
*
* int *N = (int *)(((struct OUT__1__1527___data *)__out_argv) -> N_p);
* //wrong! N is a pointe... |
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... |
axpby.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 limitation t... |
vlisa_2ndlevel.c | /*
** Implementation of LISA algorithm
** for statistical inference of fMRI images
**
** 2nd level inference using a GLM design matrix,
** e.g. for anova designs
**
** G.Lohmann, 2018
*/
#include <viaio/Vlib.h>
#include <viaio/file.h>
#include <viaio/mu.h>
#include <viaio/option.h>
#include <viaio/os.h>
#include <vi... |
bml_multiply_ellpack_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_add.h"
#include "../bml_allocate.h"
#include "../bml_logger.h"
#include "../bml_multiply.h"
#include "../bml_parallel.h"
#include "../bml_types.h"
#include "bml_add_ellpack.h"
#include "bml_allocate_ellpack.h"
#include "bml_multiply_ellpack.h"
#include... |
transfer.c | /** @file transfer.c Documented transfer module.
*
* Julien Lesgourgues, 28.07.2013
*
* This module has two purposes:
*
* - at the beginning, to compute the transfer functions \f$
* \Delta_l^{X} (q) \f$, and store them in tables used for
* interpolation in other modules.
*
* - at any time in the code, to ... |
sp.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB SP code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
thd_info.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "thd_info.h"
/******************************************************************************
* PRIVATE FUNCTIONS
********************... |
DMD5_fmt_plug.c | /*
* DMD5_fmt.c
*
* DIGEST-MD5 authentication module for Solar Designer's John the Ripper
* Uses Solar Designer's MD5 implementation.
*
* This software is Copyright 2006, regenrecht@o2.pl, and
* Copyright 2011, 2013 magnum, and it is hereby released to the general
* public under the following terms: Redistribu... |
RK4Register.h | #ifndef COSMO_UTILS_RK4REGISTER_H
#define COSMO_UTILS_RK4REGISTER_H
#include <string>
#include <utility>
#include "Array.h"
namespace cosmo
{
/**
* @brief RK4 Class for integration
* @details See the docs/RK4_integration.pptx file.
*
* @tparam IT Index type
* @tparam RT Real type
*/
template<typename IT, type... |
GB_binop__pair_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
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... |
datac.h | /***************************************************************************
* datac.h is part of Math Graphic Library
* Copyright (C) 2007-2016 Alexey Balakin <mathgl.abalakin@gmail.ru> *
* *
* This program is free software; you can re... |
int_array.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)
**************************************... |
estimator.h | // Copyright (C) 2013 The Regents of the University of California (Regents).
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above... |
DataSource.h | #ifndef DATASOURCE_H
#define DATASOURCE_H
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdint>
#include "../Tuvok/Controller/Controller.h"
#include "../Tuvok/StdTuvokDefines.h"
#include "../Tuvok/Controller/Controller.h"
#include "../Tuvok/Basics/ProgressTimer.h"
#include "../Tuvok... |
calculate_signed_distance_to_3d_condition_skin_process.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Pooyan Dadvand
// Daniel Baumga... |
templatemath.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
GB_unaryop__ainv_uint32_int32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
simdtruedep-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
packet-inl.h | /*!
* Copyright (c) 2014 by Contributors
* \file packet-inl.h
* \brief Generic packet vectorization code
*/
#ifndef MSHADOW_PACKET_INL_H_
#define MSHADOW_PACKET_INL_H_
#if defined(__APPLE__) || defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#include "./base.h"
#include "./tensor.h"
#inc... |
sharing-2.c | /* { dg-do compile } */
void
foo (void)
{
int i;
int a[10];
#pragma omp parallel private (i) shared (a)
{
i = 1;
#pragma omp parallel shared (a, i)
{
#pragma omp master
i = 2;
#pragma omp parallel private (i) shared (a)
{
for (i = 0; i < 10; i++)
a[i] = i + 1;
}
#... |
GB_unop__identity_int8_uint8.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... |
column_matrix.h | /*!
* Copyright 2017 by Contributors
* \file column_matrix.h
* \brief Utility for fast column-wise access
* \author Philip Cho
*/
#ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_
#define XGBOOST_COMMON_COLUMN_MATRIX_H_
#include <limits>
#include <vector>
#include <memory>
#include "hist_util.h"
namespace xgboost {
names... |
fft.c | /* Copyright 2013-2014. The Regents of the University of California.
* Copyright 2016-2018. Martin Uecker.
* Copyright 2018. Massachusetts Institute of Technology.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2011-2018 ... |
fibonacci.c | #include <stdio.h>
#include <omp.h> //openmp library
long fib(long n)
{
long i, j;
if (n < 2)
return n;
else if (n < z)
{
return fib(n-1) + fib (n-2);
}
else
{
#pragma omp parallel sections
{
#pragma omp section
i = fib(n-1);
#pragma omp section
... |
GB_ijsort.c | //------------------------------------------------------------------------------
// GB_ijsort: sort an index array I and remove duplicates
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitespa... |
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)
#... |
omp-taskloop-nogroup-single.c | #include <omp.h>
#include <unistd.h>
#include <stdio.h>
#define LEN 4
int main(void)
{
int j=0;
#pragma omp parallel
{
#pragma omp single
{
#pragma omp taskloop nogroup
for (j=0; j<LEN; j++)
{
usleep(30);
}
#pragma omp taskwait
}
... |
reduce.h | /* reduce.h */
#define NUM_THREADS 16
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <assert.h>
#include <vector>
#include <list>
#include <omp.h>
#include <flann/flann.hpp>
int knn_search_rnd_kd_forest(flann::Matrix<float>& qmat, int offset, int num_pts, int ... |
ast-dump-openmp-target-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 parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target parallel for
for (int i ... |
A4_e1.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
double myFunc();
//Execute as: ./e1 6 (here 6 is command line param for the size of the vectors to be multiplied)
int main(int argc, const char *argv[])
{
double tmp;
//Snippet#1: What is wrong with the following code? Please fix
// Parallelization is us... |
threshold.c | /* Copyright 2014. The Regents of the University of California.
* Copyright 2015-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-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2015-20... |
mandelecl.c | #include<Python.h>
#include<numpy/arrayobject.h>
#include<math.h>
#include<omp.h>
#define IND(a,i) *((double *)(a->data+i*a->strides[0]))
static PyObject *mandelecl(PyObject *self, PyObject *args, PyObject *keywds);
static PyObject *mandelecl(PyObject *self, PyObject *args, PyObject *keywds)
{
PyObject *etc;
PyA... |
resample.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
nested-1.c | #include <omp.h>
#include <stdlib.h>
int
main (void)
{
int i = -1, j = -1;
omp_set_nested (1);
omp_set_dynamic (0);
#pragma omp parallel num_threads (4)
{
#pragma omp single
{
i = omp_get_thread_num () + omp_get_num_threads () * 256;
#pragma omp parallel num_threads (2)
{
#pragma omp single
... |
population.h | #ifndef POPULATION_H
#define POPULATION_H
#include "ind_data.h"
#include "rndutils.hpp"
#include <vector>
struct pop_param
{
pop_param(int n_inds = 1,
double mut_rate_w = 0.01,
double mut_st = 0.1,
double mut_rate_act = 0.001,
double mut_rate_dupl = 0.001,
... |
opencl_blockchain_fmt_plug.c | /* blockchain "My Wallet" cracker patch for JtR. Hacked together during June of
* 2013 by Dhiru Kholia <dhiru at openwall.com>.
*
* See https://blockchain.info/wallet/wallet-format
* This software is Copyright (c) 2012 Lukas Odzioba <ukasz at openwall.net>
* and Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.... |
GB_unaryop__identity_uint32_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... |
zlansy.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 ... |
owl_aeos_tuner_map_impl.h | /*
* OWL - OCaml Scientific and Engineering Computing
* Copyright (c) 2016-2019 Liang Wang <liang.wang@cl.cam.ac.uk>
*/
#ifdef FUN4
CAMLprim value BASE_FUN4(value vN, value vX, value vY) {
CAMLparam3(vN, vX, vY);
int N = Long_val(vN);
struct caml_ba_array *X = Caml_ba_array_val(vX);
NUMBER *X_data = (NUMB... |
GB_unaryop__minv_uint16_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... |
row_wise_v2.c |
/****
Author: Rayhan Shikder,
email: shikderr@myumanitoba.ca
MSc Student,
Department of Computer Science,
University of Manitoba, Winnipeg, MB, Canada
****/
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#include<mpi.h>
#include<omp.h>
#include<time.h>
//macros
#define ALPHABET_LENGTH 4... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
parallel2.c | #include <stdio.h>
#include <omp.h>
#include <time.h>
#include <stdlib.h>
void SelectionSort (int *array, int size);
int IsSort(int *array, int size);
int main(int argc, char** argv) {
int size = 15000, algorithm, i, *arr, opt;
arr = malloc(size* sizeof(int));
srand(time(NULL));
for (i = 0; i < size; i++)
arr... |
GB_unop__identity_uint8_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... |
DRB080-func-arg-orig-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
fc_kernel_int8_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... |
detector.c | #include "darknet.h"
static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90};
void train_detector(char *datacfg, cha... |
MsnhCVMatOp.h | #ifndef MSNHCVOP_H
#define MSNHCVOP_H
#include <Msnhnet/cv/MsnhCVMat.h>
#include <Msnhnet/utils/MsnhTimeUtil.h>
namespace Msnhnet
{
class MsnhNet_API MatOp
{
public:
static void getROI(Mat &src, Mat &dst, const Vec2I32 &p1, const Vec2I32 &p2);
static void setROI(Mat &srcDst, Mat &roi, const Vec2I32 &pos);
... |
convolution_1x1_pack1to8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
GB_unop__isfinite_bool_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
image.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ompfor-decremental.c | /*
* default, decremental
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int foo(int lower, int upper, int stride)
{
int i;
#pragma omp for
for (i=lower;i>upper;i-=stride)
{
printf("Iteration %2d is carried out by thread %2d\n",\
i, omp_get_thread_num());
}
}
int main(void)
{
#prag... |
kernels.h | // v = 10.0
#define ADD1_OP s=v-s;
#define ADD2_OP ADD1_OP s2=v-s2;
#define ADD4_OP ADD2_OP s3=v-s3; s4=v-s4;
#define ADD8_OP ADD4_OP s5=v-s5; s6=v-s6; s7=v-s7; s8=v-s8;
// v = 1.01
#define MUL1_OP s=s*s*v;
#define MUL2_OP MUL1_OP s2=s2*s2*v;
#define MUL4_OP MUL2_OP s3=s3*s3*v; s4=s4*s4*v;
#define MUL8_O... |
crop_and_resize.c | #include <TH/TH.h>
#include <stdio.h>
#include <math.h>
void CropAndResizePerBox(
const float * image_data,
const int batch_size,
const int depth,
const int image_height,
const int image_width,
const float * boxes_data,
const int * box_index_data,
const int start_box, ... |
apm_omp.c | /**
* * APPROXIMATE PATTERN MATCHING
* *
* * INF560 X2016
* */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include <mpi.h>
#include <omp.h>
#define APM_DEBUG 0
char *read_input_file(char * filename, int * size) {
char * buf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.