source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
ex_static.c | #include <stdio.h>
#include <omp.h>
#include <unistd.h>
#define THREADS 8
int main()
{
int i,N=10;
printf("First part....\n");
#pragma omp parallel for num_threads(THREADS)
for (i = 0; i < N; i++) {
printf("Thread %d is doing iteration %d.\n", omp_get_thread_num( ), i);
}
printf("\n\nSecond part....\n")... |
nestedFunc.c |
// OpenMP Nested Functions Example
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char** argv ) {
omp_set_nested( 1 ); // Enable Nested Parallelism
omp_set_dynamic( 0 ); // Disable Dynamic Threads
int num = 0; // Thread Number
int threads = 0; // Current Threads
... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
omp_for_collapse_mini.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
/* Utility function to check that i is increasing monotonically
with each call */
static int check_i_islarger (int i)
{
static int last_i;
int islarger;
if (i==1)
last_i=0;
islarger = ((i >= last_i)&&(i - las... |
linalg.h | /* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal
*
* This file is part of SPAMS.
*
* SPAMS 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 of the License, or
* (at your optio... |
scan.c | /**
* scan.c
* Authors: Yizhao Gao <yizhaotsccsj@gmail.com>
* Date: {08/03/2017}
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
void getCCCount(double * x1, double * y1, double * x2, double * y2, int * nCass, int * nCons, int locCount, double wSize, int wCount, int * casInW, int * co... |
gather_nd_op_cpu_impl.h | /* Copyright 2016 The TensorFlow 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 a... |
openmp_demo.c | #include <stdio.h>
#include <omp.h>
int main(int argc, char const *argv[])
{
int val = 10;
#pragma omp parallel
{
printf("Starting Thread %d --- %d\n", omp_get_thread_num(), val);
printf("Finishing Thread %d --- %d\n", omp_get_thread_num(), val);
}
return 0;
}
|
ast-dump-openmp-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() {
#pragma omp sections
{}
}
void test_one() {
#pragma omp sections
{ ; }
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
//... |
y_solve.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB BT code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
tinyexr.h | /*
Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this l... |
GB_unop__acosh_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... |
test.c |
#include <stdlib.h>
#include <stdio.h>
#pragma omp requires unified_shared_memory
int main(int argc, char *argv[])
{
int dep = 0;
#pragma omp target device(2) nowait map(tofrom: dep) depend(out: dep)
{
dep++;
}
#pragma omp target device(3) nowait map(tofrom: dep) depend(in: dep)
{
dep++;
}
... |
MinMax.h | #ifndef DDM__ALGORITHM__MIN_MAX_H__
#define DDM__ALGORITHM__MIN_MAX_H__
#include "../../ddm/internal/Config.h"
#include "../../ddm/Allocator.h"
#include "../../ddm/algorithm/LocalRange.h"
#include "../../ddm/util/Config.h"
#include "../../ddm/util/Trace.h"
#include "../../ddm/util/UnitLocality.h"
#include "../../d... |
9857.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])... |
convolution_1x1_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
//
//... |
main.c | double foo(int N, double *restrict A) {
double S = 0;
#pragma omp parallel default(shared)
{
#pragma omp for reduction(+ : S)
for (int I = 0; I < N; ++I) {
S += A[I];
A[I] = I;
}
}
return S;
}
|
pooling_3x3.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 copy ... |
tutorial_region_prof.c | /*
* Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, 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,... |
GraphBuilder.h | /*
* GraphBuilder.h
*
* Created on: 15.07.2014
* Author: Marvin Ritter (marvin.ritter@gmail.com)
*/
#ifndef GRAPH_BUILDER_H
#define GRAPH_BUILDER_H
#include <vector>
#include "../Globals.h"
#include "Graph.h"
namespace NetworKit {
/*
* The GraphBuilder helps to speed up graph generation by minimizing t... |
update_ops_single.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
void single_qubit_Pauli_gate(UINT target_qubit_index, UINT Pauli_operator_type, CTYPE *state, ITYPE dim) {
switch(Pauli_operator_... |
sparseAsyncOverlappingJacobi.h | //
// Created by mbarb on 16/02/2018.
//
#ifndef PARALLELITERATIVE_SPARSEASYNCOVERLAPPINGJACOBI_H
#define PARALLELITERATIVE_SPARSEASYNCOVERLAPPINGJACOBI_H
#include "Eigen"
#include "utils.h"
#include "sparseParallelJacobi.h"
#include <typeinfo>
#include <iostream>
namespace Iterative {
template <typename Sca... |
Scan.h | /*
This file is part of the implementation for the technical paper
Field-Aligned Online Surface Reconstruction
Nico Schertler, Marco Tarini, Wenzel Jakob, Misha Kazhdan, Stefan Gumhold, Daniele Panozzo
ACM TOG 36, 4, July 2017 (Proceedings of SIGGRAPH 2017)
Use of this source code is granted via a BSD-style l... |
target_data.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-fail-aarch64-unknown-linux-gnu 2>&1 \
// RUN: | %fcheck-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-fail-powerpc64-ibm-linux-gnu 2>&1 \... |
GB_unaryop__lnot_uint8_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... |
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)
#... |
sections_dispatch.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: intel-15.0, intel-16.0, intel-17.0, intel-18.0
// GCC generates code that does not distinguish between sections and loops
#include "callback.h"
#include <omp.h>
int main()
{
#pragma omp parallel sections num_threads(2)
... |
GB_binop__pow_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
phylokernelmixture.h | /*
* phylokernelmixture.h
*
* Created on: Dec 19, 2014
* Author: minh
*/
#ifndef PHYLOKERNELMIXTURE_H_
#define PHYLOKERNELMIXTURE_H_
#include "model/modelmixture.h"
/************************************************************************************************
*
* Highly-optimized vectorized likeliho... |
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... |
gcc-ping-pong.c | /* Guessing what compilers are sufficient here... */
/* On Blue Gene/Q, we tried 4.7.2 and 4.4.7 only. */
#if (defined(__GNUC__) && (__GNUC__ >= 5)) || \
(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || \
(defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 3)) || \
(defi... |
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_binop__bor_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
DRB045-doall1-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
single_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
void foo();
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp single'}}
#pragma omp single
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp single'}}
#pragma omp single foo
void test_no_clause() {
int i;
#pragma omp single
foo();
... |
Wparentheses-2.c | /* PR c/70436 */
/* { dg-additional-options "-Wparentheses" } */
int a, b, c;
void bar (void);
void baz (void);
void f1 (void);
#pragma omp declare target to (bar, baz, f1, a, b, c)
void
f1 (void)
{
int i, j;
if (a) /* { dg-warning "ambiguous" } */
#pragma omp distribute
for (i = 0; i < 10; i++)
if... |
softmax_layer.c | #include "softmax_layer.h"
#include "blas.h"
#include "dark_cuda.h"
#include "utils.h"
#include "blas.h"
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#define SECRET_NUM -1234
void softmax_tree(float *input, int batch, int inputs, float temp, tree *hier... |
convolution_pack16to4.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 ... |
ext_sweep.h | #pragma once
#pragma omp declare target
typedef struct
{
unsigned int i,j,k;
} cell;
void sweep_octant(
const unsigned int timestep,
const unsigned int oct,
const unsigned int ndiag,
const cell* cells,
const int* num_cells,
const unsigned int num_groups_todo);
... |
net_md5_fmt_plug.c | /* Cracker for RIPv2 MD5 authentication hashes.
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>,
* 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.
*
* ... |
test.c |
#include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (992)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
int main(void) {
check_offloading... |
hypre_prefix_sum.c | /*BHEADER**********************************************************************
* Copyright (c) 2017, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* Written by Jongsoo Park et al. CODE-LLNL-738-322.
* This file is part of AMG. See files README and COPYRIGHT ... |
GB_binop__band_uint8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
ocp_nlp_common.c | /*
* Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
* Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
* Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
* Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
*
* This file is part o... |
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... |
forConstruct.c | int main() {
int x = 5;
#pragma omp parallel
{
int localX;
localX = x;
int i;
#pragma omp for private(i)
for(i = 0; i < 10; i++) {
localX = 10;
}
localX = 10;
}
}
|
c55c7aec73df0f31d67fbe39510946453b899e1d.c | #define _POSIX_C_SOURCE 200809L
#include "stdlib.h"
#include "math.h"
#include "sys/time.h"
#include "omp.h"
struct dataobj
{
void *restrict data;
int * size;
int * npsize;
int * dsize;
int * hsize;
int * hofs;
int * oofs;
} ;
struct profiler
{
double section0;
double section1;
double section2;
} ... |
time.h | /*===---- time.h - OpenMP time header wrapper ------------------------ 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
*
*===----------------------------... |
prepress.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
par_vector.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)
**************************************... |
GB_unaryop__lnot_bool_int32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
OpenMPWrapper.h | #ifndef PICMDK_OPENMPWRAPPER_H
#define PICMDK_OPENMPWRAPPER_H
/* This file should be included everywhere instead of <omp.h>.
If the code is build with OpenMP it just includes <omp.h>, otherwise it
provides wrappers for OpenMP functions and #pragma omp.
The code including this file can use OpenMP functions and
... |
GB_unaryop__identity_int8_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... |
3d7pt_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 7 point stencil with variable coefficients
* Adapted from PLUTO and Po... |
maiorelemento.c | // compilar: make
// executar: make run tam=100
//
// original por: Profº. Dr. Paulo Sérgio Lopes de Souza
//
// modificado por:
// Gustavo T. Mastrobuono NUSP 10734411, Henrique de S. Q. dos Santos NUSP 10819029,
// Jhordan P. V. Pesantes NUSP 11733353, Witor M. A. de Oliveira NUSP 10692190 e Yorvin A. R. Carrion ... |
reduction-clause-Modificado.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=10;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n ... |
sip_fmt_plug.c | /* SIP cracker patch for JtR. Hacked together during March of 2012 by
* Dhiru Kholia <dhiru.kholia at gmail.com> .
*
* Copyright (C) 2007 Martin J. Muench <mjm@codito.de>
* SIP digest authentication password (hash) cracker
* See doc/SIPcrack-LICENSE */
#if FMT_EXTERNS_H
extern struct fmt_main fmt_sip;
#elif FMT_... |
floyd_warshall.c | // Implementation based on
// http://www.cs.virginia.edu/~pact2006/program/pact2006/pact139_han4.pdf
// mixed with BLIS macro kernel.
// New features:
// - Only lower triangle of blocks is considered.
// - Next diagonal block is scheduled as soon as possible, since it is the slowest (real F-W algorithm)
// - Last d... |
ParSHUM_SBBD_util.c | #include <math.h>
#include <string.h>
#include <limits.h>
#include "ParSHUM_enum.h"
#include "ParSHUM_auxiliary.h"
#include "ParSHUM_SBBD_util.h"
/* TODO: instead od using proc 0 as master, define a master
and use it in the rest of the code. This makes it possible to
call ParSHUM SBBD in a subset of... |
limits_threads.c | /*
1. how to include header
2. parallel region
3. runtime routine
4. undeterminated execution order
5. control number of threads
By C. Liao
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int main(void)
{
int i=0;
#pragma omp parallel
{
#ifdef _OPENMP
i=omp_get_thread_num();
#endif
printf("... |
test.c | #include <stdio.h>
#include "../utilities/check.h"
#define N 100
int test_aligned(){
int a[N], aa[N];
int i, error = 0;
// initialize
for(i=0; i<N; i++)
aa[i] = a[i] = -1;
int *b = a;
// offload
#pragma omp target map(tofrom: b[0:100])
{
#pragma omp teams distribute simd aligned(b: 8*size... |
trsm_x_coo_u_lo_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT m = A->rows;
int num_t... |
bfs.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include "graphio.h"
#include "graph.h"
#include <time.h>
char gfile[2048];
void usage(){
printf("./bfs <filename> <sourceIndex>\n");
exit(0);
}
/*
You can ignore the ewgths and vwghts. They are there as the read function expects those ... |
ast-dump-openmp-teams-distribute-parallel-for-simd.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
#pragma omp teams distribute parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp... |
BKTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_BKTREE_H_
#define _SPTAG_COMMON_BKTREE_H_
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h"
#i... |
backprop.c | /*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
* Modified by Shuai Che
******************************************************************
*/
#include <omp.h>
#include <stdio.h>... |
Par-07-ParallelOmpForNestedOmpParallelFor.c |
int main(int argc, char **argv) {
int a[4] = {1,2,3,4};
int b[4] = {0, 0, 0, 0};
#pragma omp parallel
{
#pragma omp for
for (int i = 0; i < 4; ++i) {
a[i] = 3*a[i];
#pragma omp parallel for
for (int j = 0; j < 4; ++j) {
b[j] += a[i];
}
}
}
return 0;
}
|
GB_binop__isle_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
pubkeylp.h | /**
* @file pubkeylp.h -- Public key type for lattice crypto 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 permi... |
GB_unop__abs_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... |
sequencial.c | // Autor Roland Teodorowitsch
// Data: ago. 2018
//
// Adaptado Cesar De Rose - set. 2018
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h>
#define SIZE 2500
void InicializaMatriz(void);
void VerificaMatriz(void);
// ESTRUTURA DE DADOS COMPARTILHADA
int m1[SIZE][S... |
Square.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/Square.c"
#else
void THNN_(Square_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output)
{
THTensor_(resizeAs)(output, input);
if (THTensor_nDimensionLegacyAll(input) == 1 || !THTensor_(isContiguous)(input) || !T... |
GB_unop__identity_uint64_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... |
roi_align.c | #include <TH/TH.h>
#include <math.h>
#include <omp.h>
void ROIAlignForwardCpu(const float* bottom_data, const float spatial_scale, const int num_rois,
const int height, const int width, const int channels,
const int aligned_height, const int aligned_width, const float * botto... |
activations.c | #include "activations.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
char *get_activation_string(ACTIVATION a)
{
switch(a){
case LOGISTIC:
return "logistic";
case LOGGY:
return "loggy";
case RELU:
retur... |
pmv-OpenMP-b.c | // Compilar con -O2 y -fopenmp
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main(int argc, char** argv){
int i, j, f, c;
double t1, t2, total;
srand(time(NULL));
//Leer argumento de entrada (no de componentes del vector)
if (argc<2){
printf("Falta tamaño de matriz y vector\n");
exit(-1);
}
... |
bls.c | /* Licensed under a 3-clause BSD style license - see LICENSE.rst */
#include <math.h>
#include <float.h>
#include <stdlib.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
#ifndef INFINITY
#define INFINITY (1.0 / 0.0)
#endif
void compute_objective(
double y_in,
double y_out,
double ivar_in,
double iva... |
sol1.c | /**
* \file
* \brief [Problem 14](https://projecteuler.net/problem=14) solution
* \author [Krishna Vedala](https://github.com/kvedala)
*
* Since the computational values for each iteration step are independent,
* we can compute them in parallel. However, the maximum values should be
* updated in synchrony so tha... |
spmm_blocking_libxsmm.h | /*!
* Copyright (c) 2021 Intel Corporation
* \file array/cpu/spmm.h
* \brief SPMM CPU kernel function header.
* \author Sanchit Misra <sanchit.misra@intel.com>,
* Ramanarayan Mohanty <ramanarayan.mohanty@intel.com>,
* Vasimuddin Md <vasimuddin.md@intel.com>,
* Sasikanth Avancha <sasikant... |
trsm_c_sky_n_hi_row_conj.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include <memory.h>
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, const ALPHA_INT ldy)
{
ALPHA_INT m = A->rows;
ALPHA_Complex diag... |
opal_test.c | // Copyright 2009-2020 Sandia Corporation. Under the terms
// of Contract DE-NA0003525 with Sandia Corporation, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2020, Sandia Corporation
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONT... |
dsacstar_derivative.h | /*
Based on the DSAC++ and ESAC code.
https://github.com/vislearn/LessMore
https://github.com/vislearn/esac
Copyright (c) 2016, TU Dresden
Copyright (c) 2010, Heidelberg University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the fo... |
opencl_krb5pa-sha1_fmt_plug.c | /*
* Kerberos 5 "PA ENC TIMESTAMP" by magnum & Dhiru
*
* Pcap file -> input file:
* 1. tshark -r capture.pcapng -T pdml > ~/capture.pdml
* 2. krbng2john.py ~/capture.pdml > krb5.in
* 3. Run john on krb5.in
*
* http://www.ietf.org/rfc/rfc4757.txt
* http://www.securiteam.com/windowsntfocus/5BP0H0A6KM.html
*
*... |
ft_single.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - FT
This benchmark is an OpenMP C version of the NPB FT code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS... |
pp_collision.c | /* Copyright (C) 2017 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... |
profiler_interface.h | /*
# =============================================================================
# Copyright (c) 2016 - 2021 Blue Brain Project/EPFL
#
# See top-level LICENSE file for details.
# =============================================================================
*/
#pragma once
#include <initializer_list>
#include <type_... |
window.c | /********************************************************************[libaroma]*
* Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/)
*
* 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 Lic... |
sageInterface.h | #ifndef ROSE_SAGE_INTERFACE
#define ROSE_SAGE_INTERFACE
#include "sage3basic.hhh"
#include <stdint.h>
#include <utility>
#include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT
#include "OmpAttribute.h"
#if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference
SgFile* determ... |
bug_proxy_task_dep_waiting.c | // RUN: %libomp-compile-and-run
// The runtime currently does not get dependency information from GCC.
// UNSUPPORTED: gcc, icc-16
// REQUIRES: !abt
// Very flaky on openmp-clang-x86_64-linux-debian.
// https://bugs.llvm.org/show_bug.cgi?id=45397
// UNSUPPORTED: linux
#include <stdio.h>
#include <omp.h>
#include <pth... |
GB_resize.c | //------------------------------------------------------------------------------
// GB_resize: change the size of a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: Apache-... |
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)
#... |
specden.c | /************************************************************************
* This program takes time-data and calculates the
* powerspectrum/fourier transform of the autocorrelation function.
* This is a re-write of the fourier.x code written by Volker Kleinschmidt
* and Harald Forbert as a tcl plugin for VMD by Axe... |
mlp.c | #include <stdio.h>
#include <stdlib.h>
#include "popc.h"
#include "activation.h"
#include "loss.h"
#include "optimization.h"
#include "ann.h"
#include "cell.h"
#include "mlp.h"
#include "training.h"
mlpSingleton ptr mlpSingletonNew () {
static mlpSingleton ptr np = NULL;
if (np == NULL) {
np = (mlpSingleto... |
header.h | /*--------------------------------------------------------------------
c---------------------------------------------------------------------
c
c header.h
c
c---------------------------------------------------------------------
c-------------------------------------------------------------------*/
/*---------------... |
private-clause.c | /*
gcc -fopenmp -O2 private-clause.c -o private-clause
export OMP_DYNAMIC=FALSE
export OMP_NUM_THREADS=2
$ ./private-clause
thread 0 suma a[0] / thread 0 suma a[1] / thread 0 suma a[2] / thread 0 suma a[3] / thread 1 suma a[4] / thread 1 suma a[5] / thread 1 suma a[6] /
* thread 0 suma= 6
* thread 1 suma= 15
*... |
gsrb.ca.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
SynchronizerMPI.h | /*
* SynchronizerMPI.h
* Cubism
*
* Copyright 2018 ETH Zurich. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <map>
#include <vector>
#include <cmath>
#include <algorithm>
#includ... |
GB_unop__identity_uint32_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... |
Matrix.h | #ifndef MATRIX_H_
#define MATRIX_H_
#include "../Toolbox.h"
#include "../Serializable.h"
#include "KTuple.h"
#include <string.h>
#include <stdio.h>
#include <string>
#include <sys/mman.h>
#include <cmath>
#include <type_traits>
#ifdef LINUX
#include <clocale>
#endif
#ifdef OSX
#include <locale.h>
#endif
namespace ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.