source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
normal.c | /* =============================================================================
*
* normal.c
* -- Implementation of normal k-means clustering algorithm
*
* =============================================================================
*
* Author:
*
* Wei-keng Liao
* ECE Department, Northwestern University
* ... |
p2.c |
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
int main (int argc, char *argv[])
{
int i, n;
float a[1000000], b[1000000], sum;
/* Some initializations */
n = 1000000;
omp_set_num_threads(4);
#pragma omp parallel for
for (i=0; i < n; i++)
a[i] = b[i] = i * ... |
magickio.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <magick/api.h>
#include "fileio.h"
/**
* @brief read an image file into an unsigned char array
*/
unsigned char *read_img_rgb(const char *fname, size_t * nx, size_t * ny)
{
ExceptionInfo *exception = AcquireExceptionInfo();
I... |
GB_unop__floor_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
LG_check_tri.c | //------------------------------------------------------------------------------
// LG_check_tri: compute the number of triangles in a graph (simple method)
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-Li... |
GB_unop__identity_fp64_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... |
GB_unaryop__minv_uint16_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_unop__identity_fc32_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... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
core_spotrf.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/core_blas/core_zpotrf.c, normal z -> s, Fri Sep 28 17:38:22 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
GB_binop__ne_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
grid_basis.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... |
target-teams-1.c | /* { dg-do compile } */
/* { dg-additional-options "-fdump-tree-gimple" } */
int v = 6;
void bar (int);
void bar2 (int, long *, long *);
int baz (void);
#pragma omp declare target to (bar, baz, v)
void
foo (int a, int b, long c, long d)
{
/* The OpenMP 4.5 spec says that these expressions are evaluated before
... |
GB_binop__ne_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
openmp_array1.c | ///TAFFO_TEST_ARGS -Xvra -propagate-all -fopenmp
#include <stdio.h>
#define MAX_N (100)
int main(int argc, char *argv[])
{
float array[MAX_N] __attribute__((annotate("target('array') scalar(range(0,100) final)")));
int i = 0;
#pragma omp parallel for
for (i = 0; i < MAX_N; i++) {
array[i] = i * 1.0;
... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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 <dmlc/serializer.h>
#include <rabit/rabit.h>
#include <xgboost/base.h>
#include <xgb... |
GB_AxB_saxpy3_symbolic.c | //------------------------------------------------------------------------------
// GB_AxB_saxpy3_symbolic: symbolic analysis for GB_AxB_saxpy3
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suit... |
flux_attenuation_kernel.c | #include "minray.h"
void flux_attenuation_kernel(Parameters P, SimulationData SD, uint64_t ray_id, int energy_group)
{
// Cull threads in case of oversubscription
if( ray_id >= P.n_rays )
return;
if( energy_group >= P.n_energy_groups)
return;
// Indexing
float * isotropic_source = SD.readWriteData.... |
linear_interpolators.h | #ifndef XFIELDS_LINEAR_INTERPOLATORS_H
#define XFIELDS_LINEAR_INTERPOLATORS_H
typedef struct{
int64_t ix;
int64_t iy;
int64_t iz;
int64_t nx;
int64_t ny;
int64_t nz;
double w000;
double w100;
double w010;
double w110;
double w001;
double w101;
double w011;
double... |
cfunctions.h | #ifndef __CFUNCTIONS_H__
#define __CFUNCTIONS_H__
//#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <omp.h>
#ifndef Complex
#include <complex>
#define Complex std::complex<double>
#define creal(x) x.real()
#define cimag(x) x.imag()
#ifndef I
#define I Complex(0.,1.)
... |
mxEvaluateStrongFormEdgeCentralRHS.c | #ifdef _OPENMP
#include <omp.h>
#endif
#include "mex.h"
#include "blas.h"
// #if !defined(_WIN32)
// #define dgemm dgemm_
// #endif
#define DEBUG 0
#define NRHS 9
#define NLHS 1
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
/* check input & output */
if (nrhs != NRHS) {
mex... |
fig4.12-two-for-loops.c | /*
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the BSD License("BSD")(the "License").
You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
resample.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
TomoP2DModelSino_core.c | /*
* Copyright 2017 Daniil Kazantsev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed t... |
lsh_index.h | /***********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
* Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution an... |
GB_unop__identity_uint8_int64.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... |
core_ztsmlq.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c d s
*
**/
#include <plasma_core_blas.h>
#include "plasma_types.h"
#include "plasma_internal.h"
#include "core_lapack.h"
#include <omp.h>
/*************... |
decorate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
main.c | #include <stdio.h>
#include <omp.h>
int main(int argc, char** argv)
{
printf("Hello world\n");
int max_thread = omp_get_max_threads();
printf("Thread max count: %d\n", max_thread);
#pragma omp parallel
{
for (int i = max_thread; i > 0; i--)
{
#pragma omp barr... |
txinvr.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB SP code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
Quadtree.c | #include "Morton.h"
#include "Quadtree.h"
#include <math.h>
#include <mpi.h>
#include <omp.h>
// Private auxiliary functions prototypes
// Compute the centers of mass of the i-th vertex and its children
static void computeCMrec(Quadtree *qt, int cmNo);
// Public functions
// Initialise the cells of a quadtree of sp... |
GB_unaryop__abs_uint64_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_unaryop__abs_uint8_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... |
ast-dump-openmp-parallel-sections.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_zero(void) {
#pragma omp parallel sections
{}
}
void test_one(void) {
#pragma omp parallel sections
{ ; }
}
// CHECK: TranslationUnitDecl {{.*}} <<invali... |
residual_based_bdf_custom_scheme.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
#if !defined(KRATOS... |
ex4.c | #include <stdio.h>
#include <omp.h>
#define NPOINTS 1000
#define MXITR 1000
struct d_complex{
double r;
double i;
};
void testpoint(struct d_complex);
struct d_complex c;
int numoutside = 0;
int main()
{
int i, j;
double area, error, eps = 1.0e-5;
#pragma omp parallel for default(none) private(c,j) firstpri... |
bicg.c | /**
* bicg.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* Web address: http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardos... |
OMPIRBuilder.h | //===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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
//
//===---------------------------... |
data.h | /*!
* Copyright (c) 2015-2021 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 <dmlc/serializer.h>
#include <xgboost/base.h>
#include <xgboost/host_device_vec... |
GB_Vector_extractElement.c | //------------------------------------------------------------------------------
// GB_Vector_extractElement: x = V(i)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
... |
DRB005-indirectaccess1-orig-yes.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... |
ResultHandler.h | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* Structures that collect search results from distance computations
*/
#pragma once
#include <faiss/impl/AuxIndexStructures... |
propagatorStaticFunctions.h | #ifndef PROPAGATOR_STATIC_FUNCTIONS_H
#define PROPAGATOR_STATIC_FUNCTIONS_H
#define MIN(x,y) ((x)<(y)?(x):(y))
template<class Type>
#if defined(__FUNCTION_CLONES__)
__attribute__((target_clones("avx","avx2","avx512f","default")))
#endif
inline void applyFirstDerivatives2D_PlusHalf(
const long freeSurface,
... |
imginputfileconn.h | /**
* DeepDetect
* Copyright (c) 2014 Emmanuel Benazera
* Author: Emmanuel Benazera <beniz@droidnik.fr>
*
* This file is part of deepdetect.
*
* deepdetect 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 F... |
offsets.c | /*******************************************************************************
Collective Matrix Factorization
-------------------------------
This is a module for multi-way factorization of sparse and dense matrices
intended to be used for recommender system with explicit feedback data plus
... |
error.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... |
omp_parfor.c | #include <omp.h>
#include <stdio.h>
#include <time.h>
double CLOCK()
{
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return (t.tv_sec * 1000) + (t.tv_nsec * 1e-6);
}
main(int argc, char **argv)
{
unsigned int i;
double start, finish, total1, total2, total3;
double a[1000000];
sta... |
GB_unop__erfc_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GrB_Matrix_wait.c | //------------------------------------------------------------------------------
// GrB_Matrix_wait: wait for a matrix to complete
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier:... |
GB_unop__acos_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GB_unop__identity_bool_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GB_unop__abs_fp32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
diagsm_x_sky_n_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#include <memory.h>
#ifdef _OPENMP
#include <omp.h>
#endif
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, cons... |
distances_core.c | #define _GNU_SOURCE
#include "distances_core.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#define pi 3.141592653589793238462643383279502884197
#define nneigh 4
#define nneigh_hp 4
int yoffs[8] = { 0, 0, -1, +1, +1, +1, -1, -1 };
int xoffs[8] = {-1, +1, 0, 0, ... |
partial.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)
**************************************... |
reduction.c | /*
1. A local copy of reduction variable is made and initialized depending on the op(e.g. 0 for +).
2. Compiler finds standard reduction expressions containing op and uses them to update the local copy.
3. Local copies are reduced into a single value and combined with the original global value.
*/
#include <stdio.h>... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__gt_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... |
KDTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_KDTREE_H_
#define _SPTAG_COMMON_KDTREE_H_
#include <vector>
#include <string>
#include <shared_mutex>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h"
#include "WorkS... |
correct_mex.c | #include <inttypes.h>
#include <omp.h>
#include "mex.h"
#include "correct_mex.h"
void correctf(float *x,
const float *x2, const uint8_t *G,
const size_t *sz, const size_t *sz2);
void correctd(double *x,
const double *x2, const uint8_t *G,
const size_t *sz, cons... |
dropout-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 ... |
exactNNN.h | #pragma once
#include<vector>
#include<list>
#include<unordered_map>
#include"util.h"
#include"graph.h"
#include"pQueue.h"
#include<omp.h>
using namespace std;
typedef vector<float> Point;
Graph createNNN(const vector<Point>& points, unsigned int numNN, bool l2 = true){
unsigned int numVecs = points.size();
i... |
DRB097-target-teams-distribute-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
GB_unop__identity_fc32_int8.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... |
special_ops.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.
*
*... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
rose_v1_c99loop.c | /*
Contributed by Jeff Keasler
Liao, 10/22/2009
*/
#include <omp.h>
int main(int argc,char *argv[])
{
double a[20][20];
for (int i = 0; i <= 18; i += 1) {
#pragma omp parallel for
for (int j = 0; j <= 19; j += 1) {
a[i][j] += a[i + 1][j];
}
}
return 0;
}
// with shadow i and j
void foo(int... |
mlpcell_fp32.h | #ifndef MLPCELL_F32
#define MLPCELL_F32
#include "mc_funcs.h"
#define PCL_ASSERT(cond, x...) do { if(!(cond)) { printf(x); fflush(stdout); exit(1); } } while(0)
#define DECL_VLA_PTR(type, name, dims, ptr) type (*name)dims = (type (*)dims)ptr
#define DECL_VLA_PTR_CHECK_VAR(var, type, name, dims, ptr) type (*name)dims ... |
convolution_pack8to16.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 ... |
Fig_4.2_parReg.c | #include <stdio.h>
#include <omp.h>
// a simple function called by each thread
void pooh(int ID, double* A)
{
A[ID] = ID;
}
int main()
{
double A[10] = {0}; // an array visible to all threads
omp_set_num_threads(4);
#pragma omp parallel
{
int ID = omp_get_thread_num(); // a variable local to each ... |
idasFoodWeb_bnd_omp.c | /*
* -----------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU
* Based on idaFoodWeb_bnd.c and parallelized with OpenMP
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2019, Lawr... |
triplet.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* These codes were originally parts of spglib, but only develped */
/* and used for phono3py. Therefore these were moved from spglib to */
/* phono3py. This file is part of phonopy. */
/* Redistribution and use in source and binary forms, with or witho... |
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
//
//... |
image_input_op.h | #ifndef CAFFE2_IMAGE_IMAGE_INPUT_OP_H_
#define CAFFE2_IMAGE_IMAGE_INPUT_OP_H_
#include <omp.h>
#include <opencv2/opencv.hpp>
#include <iostream>
#include "caffe/proto/caffe.pb.h"
#include "caffe2/core/db.h"
#include "caffe2/utils/math.h"
#include "caffe2/operators/prefetch_op.h"
namespace caffe2 {
template <class ... |
queue.h | // -*- C++ -*-
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3... |
main.c | /* Copyright (C) 2010 The Trustees of Indiana University. */
/* */
/* Use, modification and distribution is subject to the Boost Software */
/* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */
/* http:... |
omp-axpy2.c | //
// omp-axpy.c
//
//
// Created by Yaying Shi on 10/2/19.
//
#include "omp-axpy.h"
void axpy(int N, float *Y, float *X, float a) {
int i,j;
//#pragma omp target map(to:X[0:N]) map(tofrom:Y[0:N])
//#pragma omp parallel for
for (i = 0; i < N; ++i){
Y[i] += a * X[i];
printf("this a tset: %f %f\n",X[i... |
increase.c | // RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | %python %S/check.py -c 'CHECK' %s
// REQUIRES: !abt
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char** argv) {
omp_set_affinity_format("TESTER: tl:%L tn:%n nt:%N");
// should print all for first parallel
omp_se... |
mandelbrot_area2.c | #include<stdio.h>
#include<omp.h>
#define NPOINTS 1000
#define MXITR 1000
struct d_complex {
double r;
double i;
};
void testpoint (struct d_complex);
struct d_complex c;
int numoutside = 0;
int main(){
int i, j;
double area, error, eps = 1.0e-5;
#pragma omp parallel for default(shared) private(c, j) firstpriv... |
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 ... |
init.c | #include <stdio.h>
int main(void)
{
int array[10];
int i;
#pragma omp parallel for private(i)
for(i=0; i<10; i++)
{
array[i]=i;
}
for(i=0; i<10; i++)
{
printf("%d ",array[i]);
}
printf("\n");
return 0;
}
|
structure_factors_direct.h | #ifndef CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H
#define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H
#include <cctbx/xray/scattering_type_registry.h>
#include <cctbx/xray/hr_ht_cache.h>
#include <cctbx/math/cos_sin_table.h>
#include <omptbx/omp_or_stubs.h>
#define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_NO_PRAGMA_OMP
namespace c... |
CameraUtil.h | #pragma once
namespace CameraUtil {
inline float gaussR(float sigma, float dist)
{
return std::exp(-(dist*dist) / (2.0f*sigma*sigma));
}
inline float linearR(float sigma, float dist)
{
return std::max(1.0f, std::min(0.0f, 1.0f - (dist*dist) / (2.0f*sigma*sigma)));
}
inline float gaussD(float sigma, int x... |
HYPRE_IJMatrix.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)
**************************************... |
top_k_v2_op.h | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ThreadedFriends.h | /****************************************************************/
/* Parallel Combinatorial BLAS Library (for Graph Computations) */
/* version 1.6 -------------------------------------------------*/
/* date: 6/15/2017 ---------------------------------------------*/
/* authors: Ariful Azad, Aydin Buluc --------------... |
GB_unaryop__minv_uint32_int32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
bml_utilities_ellpack_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_logger.h"
#include "../bml_parallel.h"
#include "../bml_types.h"
#include "../bml_utilities.h"
#include "bml_types_ellpack.h"
#include "bml_utilities_ellpack.h"
#include <complex.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
/** Read i... |
no_omp_cpu.c | /*
* Copyright (c) 2015 - 2022, 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 condition... |
omp_ex_12.c | #include <stdio.h>
#include <omp.h>
/*
MIT License
Copyright (c) 2019 NOUREDDINE DAGHBOUDJ
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 ri... |
lensing.c | /** @file lensing.c Documented lensing module
*
* Simon Prunet and Julien Lesgourgues, 6.12.2010
*
* This module computes the lensed temperature and polarization
* anisotropy power spectra \f$ C_l^{X}, P(k), ... \f$'s given the
* unlensed temperature, polarization and lensing potential spectra.
*
* Follows Chal... |
spectralnorm.gcc-4.c | /*
* The Computer Language Benchmarks Game
* http://shootout.alioth.debian.org/
*
* Original C contributed by Sebastien Loisel
* Conversion to C++ by Jon Harrop
* OpenMP parallelize by The Anh Tran
* Add SSE by The Anh Tran
* Reconversion into C by Dan Farina
*/
#define _GNU_SOURCE
#include <omp.h>
#include <... |
GxB_UnaryOp_xtype_name.c | //------------------------------------------------------------------------------
// GxB_UnaryOp_xtype_name: return the type_name of x for z=f(x)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licen... |
7140.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... |
VerletNeighborListAsBuild.h | /**
* @file VerletNeighborListAsBuild.h
* @author humig
* @date 21.05.19
*/
#pragma once
#include "AsBuildPairGeneratorFunctor.h"
#include "C08TraversalColorChangeNotify.h"
#include "autopas/containers/verletListsCellBased/varVerletLists/neighborLists/VerletNeighborListInterface.h"
#include "autopas/utils/WrapOpe... |
6811.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[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub... |
header.h | //---------------------------------------------------------------------
//---------------------------------------------------------------------
//
// header.h
//
//---------------------------------------------------------------------
//---------------------------------------------------------------------
#ifndef __HEA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.