source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_subassign_02.c | //------------------------------------------------------------------------------
// GB_subassign_02: C(I,J) = A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: Apache-2... |
wpapsk.h | /*
* This software is Copyright (c) 2012 Lukas Odzioba <lukas dot odzioba at gmail dot com>
* and Copyright (c) 2012-2014 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.
*
* hccap ... |
histogram-openmp.c | #ifndef _HISTOGRAM_H
#define _HISTOGRAM_H
#include"histogram.h"
#endif
void openmp_histogram(int *data, int *parallel_hist, int data_size, int hist_size, int num_thread){
int bucketSize = RANGE / hist_size;
omp_set_num_threads(num_thread);
#pragma omp parallel shared(parallel_hist, bucketSize, data_size, hist... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- 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
//
//===---------------------------... |
GB_binop__ne_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_unop__abs_uint32_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
_dd_linalg.c | /* Python extension module for linear algebra functions.
*
* Copyright (C) 2021 Markus Wallerberger and others
* SPDX-License-Identifier: MIT
*/
#include "Python.h"
#include "math.h"
#include "stdio.h"
#include "dd_arith.h"
#include "dd_linalg.h"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include "numpy/n... |
GB_unaryop__ainv_int32_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... |
veccopy.c | #include <stdio.h>
#include <omp.h>
int main()
{
int N = 100000;
int a[N];
int b[N];
int i;
for (i=0; i<N; i++){
a[i]=0;
b[i]=i;
}
#pragma omp target parallel for map(from: a[0:N]) map(to: b[0:N])
{
for (int j = 0; j <= N; j++)
a[j]=b[j];
}
int rc = 0;
for (i=0; i<N; i++)
... |
interaction.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* This file is part of phonopy. */
/* 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 abo... |
6cd8aaf_icc_so4.c | #define _POSIX_C_SOURCE 200809L
#define START_TIMER(S) \
struct timeval start_##S, end_##S; \
gettimeofday(&start_##S, NULL);
#define STOP_TIMER(S, T) \
gettimeofday(&end_##S, NULL); \
T->S += (double)(end_##S.tv_sec - start_##S.tv_sec) + (double)(end_##S.tv_usec - start_##S.tv_usec) / 1000... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
dft.c | // Copyright Naoki Shibata and contributors 2010 - 2020.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.... |
GB_unaryop__abs_fp64_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
ced_openmp.c | #include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
#include <omp.h>
#define MAX_BRIGHTNESS 255
// C99 doesn't define M_PI (GNU-C99 does)
// #define M_PI 3.14159265358979323846264338327
/*
* Loading part taken f... |
GB_apply_op.c | //------------------------------------------------------------------------------
// GB_apply_op: typecast and apply a unary operator to an array
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://sui... |
convolution_1x1_pack4to8_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 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 ... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable 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) >... |
GB_unop__signum_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
Tensor.h | #ifndef _TENSOR_H_
#define _TENSOR_H_ 2.0.2
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <assert.h>
#include <sstream>
#include <random>
#include "operator_macro.h"
using namespace std;
namespace KDTLAB
{
template <typename T=double>
class Tensor
{
temp... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- 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
//
//===---------------------------... |
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... |
convolutiondepthwise_5x5_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 a copy ... |
pooling_2x2.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 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 ... |
gather_int_avx2.c | // create a list of 64 numbers, and only sum the even ones
#include <stdio.h>
#include <stdlib.h>
#define N 32000
int main() {
srand(time(NULL));
int *numbers = malloc(sizeof(int)*N);
int *mask = malloc(sizeof(int)*N);
// Init the numbers
for (int i = 0; i<N; i++) numbers[i] = rand() % 10;
... |
GB_unaryop__minv_int8_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... |
smg_axpy.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... |
c-decl.c | /* Process declarations and variables for C compiler.
Copyright (C) 1988-2017 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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, or ... |
MathTools.h | /**
*
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#pragma once
#include <boost/math/constants/co... |
matrixPar.c | /*
* expansion.c
* Esse arquivo faz parte do trabalho-1 de programação paralela da turma 2020/02 (t2)
* Faculdade Facom - UFMS
*
* Arquivo responsável pela expansão e descoberta de célula.
*
*/
/******************************************************************************************
** ... |
layer.h | /*
Copyright (c) 2013, Taiga Nomi and the respective contributors
All rights reserved.
Use of this source code is governed by a BSD-style license that can be found
in the LICENSE file.
*/
#pragma once
#include <algorithm>
#include <iomanip>
#include <limits>
#include <memory>
#include <numeric>
#inclu... |
ATL_goparallel.c | #ifndef ATL_NOAFFINITY
#include "atlas_taffinity.h" /* include this file first! */
#endif
#include "atlas_misc.h"
#include "atlas_threads.h"
#if !defined(ATL_NOAFFINITY) && defined(ATL_PAFF_SELF) && defined(ATL_USEOPENMP)
static int ATL_setmyaffinity()
/*
* Attempts to sets the affinity of an already-running thre... |
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
//
//===---------------------------... |
DRB025-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... |
bspline_create.c | /////////////////////////////////////////////////////////////////////////////
// einspline: a library for creating and evaluating B-splines //
// Copyright (C) 2007 Kenneth P. Esler, Jr. //
// //
// This... |
copyprivate.c | #include <omp.h>
#include <stdio.h>
int main()
{
omp_set_num_threads(4);
int num;
#pragma omp parallel private(num)
{
#pragma omp single copyprivate(num)
{
scanf("%d", &num);
}
num = num + 1;
printf("%d ", num);
}
} |
network.h | // == mojo ====================================================================
//
// Copyright (c) gnawice@gnawice.com. All rights reserved.
// See LICENSE in root folder
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation... |
pseudoprojector.c | #include <stdio.h>
#include <stdlib.h>
#include <complex.h>
#include <math.h>
#include <omp.h>
#include <time.h>
#include "pseudoprojector.h"
#include "utils.h"
void vc_pseudoprojection(pswf_t* wf_ref, pswf_t* wf_proj, int BAND_NUM, double* results) {
clock_t start = clock();
kpoint_t** kpts = wf_ref->kpts;
kpoint... |
snoop.c | /*
* compute the duplex structure of two RNA strands,
* allowing only inter-strand base pairs.
* see cofold() for computing hybrid structures without
* restriction.
*
* Ivo Hofacker
* Vienna RNA package
*/
#if... |
convolution_7x7_pack1ton.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 ... |
libvoodoo.c | #include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <omp.h>
#include <math.h>
__attribute__((target(mic)))
void voodoo(double* a, double* b, double* c, int nelem, int offload)
{
/*
#pragma offload_transfer \
target(mic:0) \
noco... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- 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
//
//===---------------------------... |
reduction-12.c | /* { dg-do run } */
struct A { int t; };
struct B { char t; };
struct C { unsigned long long t; };
struct D { long t; };
void
add (struct B *x, struct B *y)
{
x->t += y->t;
}
void
zero (struct B *x)
{
x->t = 0;
}
void
orit (struct C *x, struct C *y)
{
y->t |= x->t;
}
#pragma omp declare reduction(+:struct A:omp_... |
gemver.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... |
GB_binop__second_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
psd.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
top_k_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... |
convolution_sgemm_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
//
//... |
pdf_fmt.c | /**
* Copyright (C) 2006 Henning Norén
*
* This program 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 2
* of the License, or (at your option) any later version.
*
* This program is dis... |
omp_taskyield.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
#include "omp_my_sleep.h"
int test_omp_taskyield()
{
int i;
int count = 0;
int start_tid[NUM_TASKS];
int current_tid[NUM_TASKS];
for (i=0; i< NUM_TASKS; i++) {
start_tid[i]=0;
current_tid[i]=0;
}
#pr... |
par_gsmg.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... |
c_func.c | #include "c_func.h"
#include <time.h>
// 卷积神经网络
double
dot_sum(double * t1, double * t2, int length)
{
// 点乘
// 这里不存在内存泄漏的问题
double result = 0;
int i;
for (i = 0; i < length; i++) {
result += t1[i] * t2[i];
}
return result;
}
double *
__sample_conv(double * strided_sample, int sha... |
trsm_x_dia_n_lo_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include <memory.h>
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, cons... |
GB_unaryop__minv_bool_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_false_sharing.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define NUM_THREADS 4
#define ITER_LOOP 400000000
int cnt_sheep[NUM_THREADS];
int count_sheep(int);
int main()
{
int i;
#ifdef _OPENMP
omp_set_num_threads(NUM_THREADS);
#endif
#pragma omp parallel for
for (i=0; i<NUM_THREADS; i++) {
count_sheep(i);
}
retu... |
par_coarsen.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)
**************************************... |
explicit_solver_strategy.h | //
// Authors:
// Miguel Angel Celigueta maceli@cimne.upc.edu
// Miquel Santasusana msantasusana@cimne.upc.edu
//
#if !defined(KRATOS_EXPLICIT_SOLVER_STRATEGY)
#define KRATOS_EXPLICIT_SOLVER_STRATEGY
// Project includes
#include "utilities/timer.h"
#include "custom_elements/Particle_Contact_Element.h"
#include "inc... |
GB_unaryop__ainv_bool_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... |
GB_binop__bor_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
nvector_openmp.c | /* -----------------------------------------------------------------
* Programmer(s): David J. Gardner and Carol S. Woodward @ LLNL
* -----------------------------------------------------------------
* Acknowledgements: This NVECTOR module is based on the NVECTOR
* Serial module by Scott D. Cohen,... |
GB_binop__isgt_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
findSubGraphs.c | #include "defs.h"
double findSubGraphs(graph* G,
edge* maxIntWtList, int maxIntWtListSize) {
VERT_T* S;
LONG_T *start;
char* visited;
LONG_T *pSCount;
#ifdef _OPENMP
omp_lock_t* vLock;
#endif
LONG_T phase_num, numPhases;
LONG_T count;
double elapsed_time = get_seconds();... |
mtimesx_RealTimesReal.c | /*************************************************************************************
*
* MATLAB (R) is a trademark of The Mathworks (R) Corporation
*
* Filename: mtimesx_RealTimesReal.c
* Programmer: James Tursa
* Version: 1.41
* Date: February 23, 2011
* Copyright: (c) 2009, 2010, 2011 by Ja... |
test3.c | int main() {
int x;
#pragma omp parallel
{
0;
if (1) {
2;
if (3) {
x = 0;
4;
#pragma omp barrier
5;
} else {
6;
#pragma omp barrier
7;
}
8;
} else {
9;
if (10) {
11;
#pragma omp barrier
12;
} else {
13;
#pragma omp barrier
x;
14;
}
15;
}
... |
cz.h | /*
###################################################################################
#
# CubeZ
#
# Copyright (C) 2018-2020 Research Institute for Information Technology(RIIT), Kyushu University.
# All rights reserved.
#
###################################################################################
*/
#ifndef _... |
convolution_3x3_packn_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 ... |
utils.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 ... |
hello.c | #include <omp.h>
#include <stdio.h>
int main()
{
#pragma omp parallel
{
int thread_ID = omp_get_thread_num();
printf(" hello world %d\n", thread_ID);
}
}
|
cluster.c | /** Edited by: Shuai Che, David Tarjan, Sang-Ha Lee **/
/** University of Virginia **/
/** **/
/** Description: No longer supports fuzzy c-means clustering; **/
/** only regular k-means clustering. **/
/** No longer performs "validity" function to analyze **/
/** c... |
transform.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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 ... |
convertCloud.h | /**
* $Id$
*
* Copyright (c) 2014, Johann Prankl
* @author Johann Prankl (prankl@acin.tuwien.ac.at)
*/
#ifndef KP_CONVERT_CLOUD_HPP
#define KP_CONVERT_CLOUD_HPP
#include <float.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#in... |
test_task_barrier.c | //===-- test_task_barrier.cc - Test task execution at barriers ---*- C -*-===//
//
// Part of the LOMP project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
fixed_version.c | #include<stdio.h>
int main(){
int i;
int j = 10;
#pragma omp parallel for firstprivate(j)
for (i = 0; i < 10; i++)
printf("%d\n", j);
}
|
MCarloX.c | /*
Project: mpi_monte_carlo
File: mpi_monte_carlo.cpp
Created By: James Williams
Date: 11/14/15.
Purpose: Estimate Pi by simulation of throwing darts at a dart board.
Program will use MPI for distributed computing across nodes.
1. Process 0 should read in the total num... |
fc_compute.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... |
nvptx_device_math_complex.c | // REQUIRES: nvptx-registered-target
// RUN: %clang_cc1 -verify -internal-isystem %S/Inputs/include -fopenmp -x c -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
// RUN: %clang_cc1 -verify -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang... |
api.c | // RUN: %libomp-compile-and-run
// RUN: %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#define XSTR(x) #x
#define STR(x) XSTR(x)
#define streqls(s1, s2) (!strcmp(s1, s2))
#define check(condition) ... |
indirectaccess1-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... |
train8.c | #define _GNU_SOURCE
#include <syscall.h>
#include <sched.h>
#include "graph.h"
#include "mainFunctions.h"
#include "powerperformacetracking.h"
#include "print.h"
#include <stdlib.h>
#include<unistd.h>
#define NO_OF_ARGS 2
//#define REPEAT 25
#define REPEAT 15
long long iters[8];
struct timeval start, end;
// We d... |
requires.c | #include <stdio.h>
#include <stdlib.h>
#define N 100
#pragma omp requires reverse_offload
int main() {
int A[N];
for (int i=0; i<N; i++) A[i] = i;
A[N-1]=-1;
return 0;
}
|
mapping.c | /* Generated by Cython 0.29.21 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [],
"extra_compile_args": [
"/Qpar",
"/fp:fast",
"/O2",
"/Oy",
"/Ot"
],
"language": "c",
"name": "IndexMapping.mapping",
... |
trsv_x_sky_n_lo.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, ALPHA_Number *y)
{
ALPHA_Number diag[A->cols];
memset(diag,... |
dnnl_requantize-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 ... |
GB_unaryop__abs_int16_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
iftRadonTransform2D.c | #include "ift.h"
iftMatrix *createRadonMatrix(iftImage *img, int theta)
{
iftMatrix *resMatrix = NULL;
iftVector v1 = {.x = -((float)img->xsize / 2.0), .y = -((float)img->ysize / 2.0), .z = 0.0};
iftMatrix *transMatrix1 = iftTranslationMatrix(v1);
iftMatrix *rotMatrix = iftRotationMatrix(IFT_AXIS_Z, ... |
kmp_stats.h | #ifndef KMP_STATS_H
#define KMP_STATS_H
/** @file kmp_stats.h
* Functions for collecting statistics.
*/
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Ill... |
convolutiondepthwise_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
//
//... |
Ransac.h | /**
* Copyright (c) 2021 Darius Rückert
* Licensed under the MIT License.
* See LICENSE file for more information.
*/
#pragma once
#include "saiga/core/util/Thread/omp.h"
#include "saiga/vision/VisionTypes.h"
namespace Saiga
{
// This seed is used for all ransac classes.
// You can change this in your applicati... |
3d25pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
efs_fmt_plug.c | /* EFS cracker. Hacked together during 2013 monsoons by Dhiru Kholia
* <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms,... |
ellipticBuildJacobi.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitatio... |
AdaptiveRKSolver.h | #include "..//DifferentialSolver.h"
// Runge–Kutta–Fehlberg 45
template<typename Scalar>
class AdaptiveRungeSolver : public DifferentialSolver<Scalar>
{
public:
using DifferentialSolver<Scalar>::timeStep;
using DifferentialSolver<Scalar>::currTime;
using DifferentialSolver<Scalar>::tolerance;
using Differentia... |
GB_unop__one_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
collapse.c | #include <stdio.h>
#include "assert.h"
#include <unistd.h>
void vmul(int*a, int*b, int*c, int N){
#pragma omp target map(to: a[0:N],b[0:N]) map(from:c[0:N*N])
#pragma omp teams distribute parallel for collapse(2)
for(int i=0;i<N;i++)
for(int j=0;j<N;j++){
c[i*N+j]=a[i]*b[j];
}
}
int main(){
const... |
omp_lock.c | #include <omp.h>
#include <stdio.h>
#define THREADS 512
#define WARPSIZE 64
#pragma omp declare target
omp_lock_t lock;
#pragma omp end declare target
int main() {
int error = 0;
unsigned count = 0; // incremented within target region
unsigned expected_count = 0; // incremented on host
#pragma omp t... |
GB_unop__abs_fp32_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... |
ckernels.c | #include <emmintrin.h>
void kernel4(int L, float* ai, float* ef) {
float* p2 = ef;
float* p1 = ai;
double mag, t;
int i;
for(i = 0; i < L; i++) {
t = *p2++;
mag = t*t;
t = *p2++;
mag += t*t;
*p1++ += mag;
}
}
void kernel5(int L, float* __restrict__ ai, float* __restrict__ ef) {
... |
GB_unop__cimag_fp64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.