source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_unaryop__minv_uint64_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__gt_uint64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
single.c | #include <stdio.h>
#include <omp.h>
int main() {
int n = 9, i, a, b[n];
for (i=0; i<n; i++) b[i] = -1;
#pragma omp parallel
{
#pragma omp single
{ printf("Introduce valor de inicialización a: ");
scanf("%d", &a );
printf("Single ejecutada por el thread %d\n",
omp_g... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
matrix_op-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 ... |
omp_schedule.c | #include <unistd.h>
#include <stdlib.h>
#include <omp.h>
#include <stdio.h>
#define THREADS 4
#define CHUNK 3
#define N 20
int main ( ) {
unsigned int i;
// default chunk is N / numthread
#pragma omp parallel for schedule(static, CHUNK) num_threads(THREADS)
for (i = 0; i < N; i++) {
/* wait for i... |
surfmorph_codegen.h |
////////////////////////////////////////////////////////////////////////////////
// This code has been automatically generated with SymPy ///////////////////////
////////////////////////////////////////////////////////////////////////////////
#ifndef SURFMORPH_CODEGEN_H
#define SURFMORPH_CODEGEN_H
namespace surfmorp... |
DRB048-firstprivate-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... |
pr59591-1.c | /* PR tree-optimization/59591 */
/* { dg-additional-options "-fopenmp-simd" } */
#ifndef CHECK_H
#include "tree-vect.h"
#endif
extern void abort (void);
int p[256], q[256], r[256], t[256];
__attribute__((noinline, noclone)) void
foo (void)
{
int i;
#pragma omp simd safelen(64)
for (i = 0; i < 256; i++)
if... |
ast-dump-openmp-declare-variant-extensions.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s
// expected-no-diagnostics
int picked1(void) { return 0; }
int picked2(void) { return 0; }
int picked3(void);
int pic... |
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... |
Euclid_apply.c | /******************************************************************************
* Copyright (c) 1998 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)
***************************************... |
ast-dump-openmp-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 parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp parallel for simd
for (int i = 0;... |
SpMat.h | /******************************************************************************
* ** Copyright (c) 2016, Intel Corporation **
* ** All rights reserved. **
* ** ... |
omp_realloc_size_0.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <omp.h>
int main()
{
omp_alloctrait_t at[2];
omp_allocator_handle_t a;
omp_allocator_handle_t f_a;
void *ptr[2];
void *nptr[2];
at[0].key = omp_atk_pool_size;
at[0].value = 2*1024*1024;
at[1].key = omp_atk_fallback;
at[1].value = omp_atv_de... |
ConverterOSG.h | /* -*-c++-*- IfcQuery www.ifcquery.com
*
MIT License
Copyright (c) 2017 Fabian Gerold
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 ... |
GB_unaryop__lnot_int64_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
Physics.c | /*
* Physics.c
*
* Created on: Feb 24, 2016
* Author: abauville
*/
#include "stokes.h"
void Physics_Memory_allocate(Model* Model)
{
Grid* Grid = &(Model->Grid);
Physics* Physics = &(Model->Physics);
Numerics* Numerics = &(Model->Numerics);
BC* BCStokes = &(Model->BCStokes);
Physics->dt... |
DRB065-pireduction-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... |
eavlSimpleReverseIndexOp.h | // Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information.
#ifndef EAVL_SIMPLE_REVERSE_INDEX_OP_H
#define EAVL_SIMPLE_REVERSE_INDEX_OP_H
#include "eavlOperation.h"
#include "eavlArray.h"
#include "eavlException.h"
/// like reverse-index op, but assume the output counts
/// can only ever be "1", ... |
traversalIntraTask.c | int my2(int a) {
newFunc();
18;
#pragma omp barrier
int q;
// return 1;
im4: return a;
}
int my(int a) {
im4: return a;
}
int foo(int aFoo, int bFoo, int cFoo) {
int tempo;
tempo = 0;
tempo += 1;
if (aFoo > 10) {
testFoo();
}
if (bFoo > 20) {
return aFoo + bFoo + cFoo;
}
g1 = 10;
g2 = 100 + g1;
int a... |
main.c | typedef int T[10];
void foo(T *A) {
#pragma omp parallel default(shared)
{
#pragma omp for
for (int I = 0; I < 10; ++I)
for (int J = 0; J < 10; ++J)
A[I][J] = 0;
}
}
|
pmv-secuencial.c | #include <stdlib.h>
#include <stdio.h>
#include<time.h>
//#define PRINT_ALL
#define VECTOR_GLOBAL
//#define VECTOR_DYNAMIC
#ifdef VECTOR_GLOBAL
#define MAX 32768 //=2^10
double v[MAX], m[MAX][MAX], r[MAX];
#endif
int main(int argc,char** argv){
if (argc<2){
printf("Faltan nº componentes del vector \n");
... |
normalize_ref.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
RecordTable.h | /*
* Souffle - A Datalog Compiler
* Copyright (c) 2020, The Souffle Developers. All rights reserved.
* Licensed under the Universal Permissive License v 1.0 as shown at:
* - https://opensource.org/licenses/UPL
* - <souffle root>/licenses/SOUFFLE-UPL.txt
*/
/*******************************************************... |
7551.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... |
mpi_vector.h | #pragma once
#include <cassert>
#include <thrust/host_vector.h>
#include <thrust/gather.h>
#include "exceptions.h"
#include "exblas/mpi_accumulate.h"
#include "tensor_traits.h"
#include "blas1_dispatch_shared.h"
#include "mpi_communicator.h"
#include "memory.h"
#include "config.h"
//TODO: should we catch the cases wh... |
spectralnorm-4.c | /* The Computer Language Benchmarks Game
* http://benchmarksgame.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>
#includ... |
segment.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
point_outlier.h | /****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Co... |
pt_to_pt_pingping.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
parallel_for.c | #include <stdio.h>
#include <omp.h>
#define N 50
#define CHUNKSIZE 5
int main(int argc, char *argv[]){
int i, chunk, tid;
float a[N], b[N], c[N];
for (i = 0; i < N; i++){
a[i] = b[i] = i * 1.0;
};
chunk = CHUNKSIZE;
#pragma omp parallel for \
shared(a,... |
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... |
matrix_op-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 ... |
saxpy.c | /*
* File: saxpy.c
* Author: Malcolm Davis
* Course: Computer Architecture II
* Created on Feb 24, 2018
* Simple SAXPY(Single-precision Alpha*X Plus Y) operation with OpenMP
*
* Ussage:
* ./argv[0] for default parameters and random vectors or;
* ./argv[0] <array size>
*/
#include <stdio.h>
#include <std... |
convolution_3x3_int8.h | // SenseNets is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2018 SenseNets Technology Ltd. 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 t... |
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... |
GraphBLAS.h | //------------------------------------------------------------------------------
// GraphBLAS.h: definitions for the GraphBLAS package
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identif... |
kernel_cpu_2.c | // #ifdef __cplusplus
// extern "C" {
// #endif
//========================================================================================================================================================================================================200
// DEFINE/INCLUDE
//=============================================... |
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
//
//===---------------------------... |
ompcompress.c | #ifdef _OPENMP
/* compress 1d contiguous array in parallel */
static void
_t2(compress_omp, Scalar, 1)(zfp_stream* stream, const zfp_field* field)
{
/* array metadata */
const Scalar* data = (const Scalar*)field->data;
uint nx = field->nx;
/* number of omp threads, blocks, and chunks */
uint threads = threa... |
AI_model3.c | #include"AI.h"
#include <omp.h>
#define MAXSTEP 4
//#define CHECK_SCORE
//This is for model3
//the simulation function for the branches in the searching tree
int ai_model3_simulate(GameState *gameState, Player *player, int depth)
{
if(depth<=0)return ai_sum_scores(gameState,player);
int MaxScore=-60000;
... |
omp_parallel_for_if.c | <ompts:test>
<ompts:testdescription>Test which checks the omp parallel for if directive. Needs at least two threads.</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp parallel for if</ompts:directive>
<ompts:dependences></ompts:dependences>
<ompts:testcode>
#include <stdio.h>
#includ... |
decoder.c | /*! @file
* @brief
*
* @version 1.0.0
*
* (C) Copyright 2017 GoPro Inc (http://gopro.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 License at
*
* http://www.apache.org/licenses/LICE... |
smod.c |
#ifndef _SMOD_H_
#include "smod.h"
#endif
/*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+--*/
/*
* brinv -
* @param1: description of param1
* @param2: description of param2
*
* version: 20 Aug 2010
*/
/*--+----1----+----2----+----3----+----4----+----5----+----6----+--... |
openmp_all.c | #include <stdio.h>
#include <getopt.h>
#include <omp.h>
#include <math.h>
#include <string.h>
#ifdef __APPLE__
#include <cblas.h>
#define set_num_threads(x) openblas_set_num_threads(x)
#define get_num_threads() openblas_get_num_threads()
#else
#include <mkl.h>
#define set_num_threads(x) mkl_set_num_threads(x)
#defin... |
GB_binop__pow_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
Example_udr.1.c | /*
* @@name: udr.1.c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
#include <stdio.h>
#include <limits.h>
struct point {
int x;
int y;
};
void minproc ( struct point *out, struct point *in )
{
if ( in->x < out->x ) out->x = in->x;
if ( in->y < out->y ) out->y = i... |
seidel-2d.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_unaryop__lnot_fp64_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_binop__islt_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_emult_03.c | //------------------------------------------------------------------------------
// GB_emult_03: C<M>= A.*B, M sparse/hyper, A and B bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Licen... |
DRB048-firstprivate-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... |
stream.c | // Copyright 2009-2020 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2020, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directory... |
nested_parallel_for_block_omp.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See COPYRIGHT in top-level directory.
*/
/* Nested Pragma omp parallel for directives evaluation
* Output: avg time
*/
#include <assert.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#define N... |
LinearAlgebra.h | namespace tom {
/** Devide the given `matrix` by its element-sum, i.e., normalize the matrix to have an element-sum of one, and return the element-sum.
*/
template<typename T>
double normalize(const DenseBase<T> &matrix) {
double mat_sum = matrix.sum();
const_cast< DenseBase<T> & >(matrix) /= mat_sum;
ret... |
ex_static4.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
int main()
{
int i,n,t,chunk;
double wtime;
chunk=4;
t=4;
n=16;
#pragma omp parallel for num_threads(t)
for (i = 0; i < n; i++) {
printf("Thread %d is doing iteration %d.\n", omp_get_thread_num( ), i);
}
printf("------------------------------\n");... |
GB_subref_phase0.c | //------------------------------------------------------------------------------
// GB_subref_phase0: find vectors of C = A(I,J) and determine I,J properties
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
... |
dpapimk_fmt_plug.c | /* DPAPI masterkey file version 1 and 2 cracker by
* Fist0urs <jean-christophe.delaunay at synacktiv.com>
*
* This software is Copyright (c) 2017
* Fist0urs <jean-christophe.delaunay at synacktiv.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in sour... |
parallel_variable_transfer_utility.h | /*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Feli... |
lda.h | #ifndef __LDA
#define __LDA
#include <vector>
#include <random>
#include <omp.h>
#include <algorithm>
#include <chrono>
#include <thread>
#include <mutex>
#include <deque>
#include <mpi.h>
#include <fstream>
#include "glog/logging.h"
#include "types.h"
#include "guide_table.h"
#include "dcm.h"
#include "xorshift.h"
... |
matProduct2.c | /*
OpenMP implementation of matrix multiplication. Each thread takes care
a chunk of rows.
Compile with gcc -O3 -fopenmp omp_matrixmult.c -o omp_matrixmult
*/
// Online source: http://users.abo.fi/mats/PP2012/examples/OpenMP/omp_critical.c
// permission obtained
#include <omp.h>
#include <stdio.h>
#include <st... |
convolution_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.
// Copyright (C) 2019 BUG1989. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
DRB005-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... |
professor_challenge_optmized.c | /*
The number of primes up to 600000 is 49098 and took it 39s to solve it in parallel and 40s sequential
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <omp.h>
static const unsigned int verify_subdomain(const unsigned int start, const unsigned int chunck) {
unsigned int i = ... |
dle.c | /* Author: Christopher Hannon
* cs546 Parallel and Distributed Processing
* Homework 2
* Shared Memory Programming
*
* This Program implements 3 algorithms for solving
* dense linear equations of the
* form A*x=b, where A is an n*n matrix and b is a
* vector. This program performs guassian elimination
* withou... |
target_data.c | #pragma omp target data clause [clauses]
structured-block
|
HABANA_nms_class.h | #ifndef NMS_F_H
#define NMS_F_H
#include <iostream>
#include <vector>
#include <math.h>
#include <synapse_types.h>
#include <algorithm>
#include <atomic>
#include <HABANA_threadedTask.h>
#include <functional>
#include <omp.h>
#define MAX_BOX_NUM (15130UL)
#define MAX_NUM_OF_FINAL_DET (20... |
matrixMultiplication.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#include "mkl.h"
#include "papi.h"
#define THRESHOLD 32768 /* product size below which matmultleaf is used */
double matrixMultiplication_noBlock(int matrix_size, int nthreads){
srand(time(NULL));
double **A;//[matrix_size][matrix_size];
... |
GB_unop__identity_uint16_bool.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... |
nested_loop.c | /*
* This example illustrates nested loop parallelization with OpenMP
*
* @author Apan Qasem
*/
#include<stdlib.h>
#include<stdio.h>
#include <omp.h>
#define M 4
int main(int argc, char *argv[]) {
int N = atoi(argv[1]);
omp_set_num_threads(N);
int j, k;
#pragma omp parallel for private(j) collapse(2... |
GB_unop__identity_int8_uint64.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... |
callback.h | #ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#endif
#include <stdio.h>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#include <omp.h>
#include <omp-tools.h>
#include "ompt-signal.h"
// Used to detect architecture
#include "../..... |
itunes_fmt_plug.c | /* JtR format to crack encrypted iTunes Backup passwords.
*
* This software is Copyright (c) 2017, 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.... |
GB_binop__bclr_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
mhpTest6.c | void foo() {
int x;
#pragma omp barrier
foo();
}
void bar() {
int y;
#pragma omp barrier
bar();
}
int main() {
#pragma omp parallel
{
if (x > 2)
foo();
else
bar();
}
}
|
fvde_fmt_plug.c | /* JtR format to crack FileVault 2 hashes.
*
* This software is Copyright (c) 2017, Dhiru Kholia <kholia at kth.se> 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.
*
* Big thanks to... |
array_out_bound_fix.c | //#include <omp.h>
int main(){
int i = 0;
int *p = &i;
int a[12];
int b[12];
#pragma omp parallel for
for(i=1; i<5; i++){
b[i] = a[*p + i +1];
}
}
|
data.h | /*!
* Copyright (c) 2015 by Contributors
* \file data.h
* \brief The input data structure of xgboost.
* \author Tianqi Chen
*/
#ifndef XGBOOST_DATA_H_
#define XGBOOST_DATA_H_
#include <dmlc/base.h>
#include <dmlc/data.h>
#include <rabit/rabit.h>
#include <cstring>
#include <memory>
#include <numeric>
#include <al... |
Example_affinity_display.2.c | /*
* @@name: affinity_display.2c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
*/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
void socket_work(int socket_num, int n_thrds);
int main(void)
{
int n_sockets, socket_num, n_thrds_on_socket;
omp_... |
eavlDestinationTopologyMapOp.h | // Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information.
#ifndef EAVL_DESTINATION_TOPOLOGY_MAP_OP_H
#define EAVL_DESTINATION_TOPOLOGY_MAP_OP_H
#include "eavlCUDA.h"
#include "eavlCellSet.h"
#include "eavlCellSetExplicit.h"
#include "eavlCellSetAllStructured.h"
#include "eavlDataSet.h"
#include "... |
broadcast_reduce-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 ... |
pi_loop.c | /**
* This program will numerically compute the integral of
* 4/(1+x*x)
* from 0 to 1. The value of this integral is pi -- which
* is great since it gives us an easy way to check the answer.
*
* The program was parallelized using OpenMP by adding just
* four lines
*
* (1) A line to include omp.h -- the... |
trsm_x_bsr_n_hi_col.c | #include "alphasparse/opt.h"
#include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include <memory.h>
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
const ALPHA_INT ... |
DataTypeConversions.h | //
// Created by raver119 on 21.11.17.
//
#ifndef LIBND4J_DATATYPECONVERSIONS_H
#define LIBND4J_DATATYPECONVERSIONS_H
#include <pointercast.h>
#include <helpers/logger.h>
#include <op_boilerplate.h>
#include <array/DataType.h>
#include <types/float16.h>
#include <helpers/BitwiseUtils.h>
namespace nd4j {
template... |
3mm.c | /**
* 3mm.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students.ic.... |
assign_h_by_distance_process.h | /*
==============================================================================
KratosPFEMApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi
pooyan@cimne.upc.edu
rrossi@c... |
3d25pt.c | /*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b)... |
DRB054-inneronly2-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_fc64_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... |
J2OrbitalSoA.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeongnim ... |
diamond_cmap.h | // This is the implementation using the connectivity map (c-map)
std::cout << "Running the c-map implementation\n";
#pragma omp parallel for schedule(dynamic,1) reduction(+:counter)
for (vidType v0 = 0; v0 < g.V(); v0++) {
#if 1
auto tid = omp_get_thread_num();
auto &cmap = cmaps[tid];
for (auto u : g.N(v0)) cmap... |
RCCE_lib.h | //
// Copyright 2010 Intel Corporation
//
// 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 app... |
level.c | // RUN: %compile-run-and-check
#include <omp.h>
#include <stdio.h>
const int MaxThreads = 1024;
const int NumThreads = 64;
int main(int argc, char *argv[]) {
int level = -1, activeLevel = -1;
// The expected value is -1, initialize to different value.
int ancestorTNumNeg = 1, teamSizeNeg = 1;
int ancestorTNu... |
TAD.h | //
// @author Adam Gibson
//
#ifndef LIBND4J_TAD_H
#define LIBND4J_TAD_H
#include <helpers/shape.h>
#include <pointercast.h>
namespace shape {
/**
* Dimension collapse is an algorithm
* for collapsing singular dimensions.
* This algorithm will adjust the dimensions
* wrt the original.
... |
ast-dump-openmp-target-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 teams distribute parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target team... |
k-means.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include <assert.h>
#include <omp.h>
#include <time.h>
#define MAX_CHAR_PER_LINE 128
float** read_file(char *filename,int *numImg,int *numFea)
{
fl... |
flowinfo_metadata.c | /*
* Copyright 2014-2016 Nippon Telegraph and Telephone Corporation.
*
* 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... |
sink-fold-3.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-omplower" } */
/* Test that we fold sink offsets correctly while taking into account
pointer sizes. */
typedef struct {
char stuff[400];
} foo;
void
funk (foo *begin, foo *end)
{
foo *p;
#pragma omp parallel for ordered(1)
for (p=end; p > begi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.