source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
2018-simd2-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... |
for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -triple x86_64-unknown-unknown -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -triple x86_64-unknown-unknown -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -f... |
plusplus-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... |
thread_scale.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See COPYRIGHT in top-level directory.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <omp.h>
#include <sched.h>
#include <unistd.h>
#include <pthread.h>
#include "zmtest_abslock.h"
#define TEST_NITER (1<<22)
#define WARMUP_ITER 128
#define CA... |
simd-1.c | /* { dg-do run } */
/* { dg-additional-options "-msse2" { target sse2_runtime } } */
/* { dg-additional-options "-mavx" { target avx_runtime } } */
extern void abort ();
int a[1024] __attribute__((aligned (32))) = { 1 };
int b[1024] __attribute__((aligned (32))) = { 1 };
int k, m;
struct U { int u; };
struct V { int v... |
pcptdesdecryptcbccaomp.c | /*******************************************************************************
* Copyright 2002-2019 Intel Corporation
* All Rights Reserved.
*
* If this software was obtained under the Intel Simplified Software License,
* the following terms apply:
*
* The source code, information and material ("Material") co... |
test.c | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int a = 1;
int b = 2;
#pragma omp parallel
#pragma omp single
{
#pragma omp target enter data nowait map(to: a) depend(out: a)
#pragma omp task depend(inout: a) shared(b)
{ b++; /* printf("hi alex\n");*/ }
#pragma omp ... |
ResultHandler.h | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
* Structures that collect search results from distance computations
*/
#pragma once
#include <faiss/impl/AuxIndexStructures... |
GB_binop__islt_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-... |
GB_unop__identity_uint8_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... |
math.h | #ifndef KUTILITY_MATH_H
#define KUTILITY_MATH_H
#include "kutility/general.h"
// #include "kutility/linear_algebra.h"
#include "kutility/convolution.h"
namespace kutility
{
template<typename T>
inline T distance( T a[2], T b[2] )
{
T d0 = a[0]-b[0];
T d1 = a[1]-b[1];
return sqrt( d0... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
matrix_mul_OMP.c | //usage, $ ./exec < matrix.csv > matrix_out.csv
#include<omp.h>
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
const int CHUNK = 10;
void print_matrix(float *mat, int rows, int cols) {
int i, j;
printf("%d, %d\n", rows, cols);
for (i = 0; i < rows; i++) {
for (j = 0; j < cols; j++)
printf("%f, ... |
GB_binop__isne_fp64.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_unop__identity_uint16_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... |
antidep2-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... |
analyze.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% AAA N N AAA L Y Y ZZZZZ EEEEE ... |
ZAdaptiveNormals.h | /**
* $Id$
*
* Copyright (C) 2012
* Andreas Richtsfeld, Johann Prankl, Thomas Mörwald
* Automation and Control Institute
* Vienna University of Technology
* Gusshausstraße 25-29
* 1170 Vienn, Austria
* ari(at)acin.tuwien.ac.at
*
* This program is free software: you can redistribute it a... |
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... |
stream.c | /*-----------------------------------------------------------------------*/
/* Program: STREAM */
/* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */
/* Original code developed by John D. McCalpin */
/* Programm... |
p_index2.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#define MAXSZ_P 32
#define MAXSZ_S 8
static void
p_merge_(unsigned int* base, unsigned int* l1, unsigned int* h1,
unsigned int* l2, unsigned int* h2)
{
unsigned int* buf;
buf = (unsigned int*) malloc(((h1-l1) + (h2-l2)) * siz... |
model.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_MODEL_MODEL_H__
#d... |
openmp_pi_threshold_dynamic.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int threshold_omp = 100;
void main(int argc, char *argv[]) {
int i;
int count = 0;
double x, y;
int samples, nthreads;
double pi;
samples = atoi(argv[1]);
nthreads = atoi(argv[2]);
omp_set_num_threads(nthreads);
double start = omp_get_wtime();... |
GB_binop__min_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
par_2s_interp.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)
**************************************... |
hello_world_openmp.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
int tid, nthreads;
#pragma omp parallel private(tid, nthreads)
{
tid = omp_get_thread_num();
nthreads = omp_get_num_threads();
printf("Hello, World from thread %d out of %d from process %d out of %d\n",
tid, n... |
GB_subassign_06s.c | //------------------------------------------------------------------------------
// GB_subassign_06s: C(I,J)<M> = A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com See ... |
zpotrf.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma.h"
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include ... |
scaffold.c | /*
Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk)
This file is part of Velvet.
Velvet 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 opt... |
GB_binop__bxor_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-... |
GB_unaryop__ainv_int64_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
PCL_normEst.h | /* License Information
*
* Copyright (C) 2013 Boulch Alexandre, Ecole Nationale des Ponts et Chaussees
* 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, includin... |
GB_unaryop__abs_int64_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
convolutiondepthwise_5x5_pack4.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 ... |
GB_unop__log1p_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
par_ilu_solve.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)
***************************************... |
bin_class_metric.h | /**
* Copyright (c) 2015 by Contributors
*/
#ifndef ZDIFACTO_LOSS_BIN_CLASS_METRIC_H_
#define ZDIFACTO_LOSS_BIN_CLASS_METRIC_H_
#include <algorithm>
#include <vector>
#include <math.h>
#include "zdifacto/base.h"
#include "dmlc/logging.h"
#include "dmlc/omp.h"
#include "zdifacto/sarray.h"
namespace zdifacto {
class... |
GB_emult_02.c | //------------------------------------------------------------------------------
// GB_emult_02: C = A.*B where A is sparse/hyper and B is bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
explicit_residualbased_builder.h | /*
==============================================================================
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@cimne.upc.edu
CIMNE (International Center for... |
ten_tusscher_2006_RS_CPU.c | #include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2006.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO: this should be called only once f... |
7.c | /* Написать программу, в которой определить две параллельные области, каждая из которых
содержит итерационную конструкцию for выполняющую инициализацию элементов
одномерных массивов целых чисел a[12], b[12] и c[12]. Число нитей перед первой областью
задать равным 3, перед второй – равным 4. Первая параллельная область ... |
core_zttlqt.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c d s
*
**/
#include <plasma_core_blas.h>
#include "plasma_types.h"
#include "plasma_internal.h"
#include "core_lapack.h"
#include <omp.h>
// This will b... |
hyantes.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#ifdef USE_FLOAT
typedef float data_t;
#define M_PI 3.141592654f
#define INPUT_FORMAT "%f%*[ \t]%f%*[ \t]%f"
#define OUTPUT_FORMAT "%f %f %f\n"
#else
typedef double data_t;
#define M_PI 3.141592654
#define INPUT_FORMAT "%lf%*[ \t]%lf%*[ \t]%lf"
... |
preGraphConstruction.c | /*
Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk)
This file is part of Velvet.
Velvet 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 opt... |
convolution_3x3_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// author:BUG1989 (https://github.com/BUG1989/) Long-term support.
// author:FuGuangping (https://github.com/fu1899) Implemented the first version of INT8 quantization on ARMv7.
//
// Copyright (C) 2019 BUG1989. All rights reser... |
DRB111-linearmissing-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... |
syncbench.c | /****************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 3.1 *
* *
* ... |
3d_test.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main()
{
int* M = (int*)malloc(2*2*2*sizeof(int));
int*** Matrix = (int***)malloc(2*sizeof(int**));
Matrix[0] = (int**) malloc(2*sizeof(int*));
Matrix[0][0] = M;
Matrix[0][1] = M+2;
Matrix[1] = (int**) malloc(2*sizeof(int*));
Ma... |
reinas0.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <omp.h>
#include <time.h>
/*
Sencilla solución de el problema de las 8 reinas usando recursividad
(backtracking), con arrays dinámicos. (Este código solo imprime una solución)
*/
int *crearVec(int t);
void llenarPositivo(int *v,int... |
mixed_tentusscher_myo_epi_2004_S1_5.c | // Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S1_5.h"
GET_CELL_MODEL_DATA(init_cell_model_data)
{
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_... |
GB_unop__identity_uint64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
hash_table.h | /**
* @file hash_table.h
* @brief HashTable Class.
* @author Yu Peng (ypeng@cs.hku.hk)
* @version 1.0.0
* @date 2011-08-03
*/
#ifndef __CONTAINER_HASH_TABLE_H_
#define __CONTAINER_HASH_TABLE_H_
#include <omp.h>
#include <stdint.h>
#include <cstddef>
#include <functional>
#include <istream>
#include <ostream>
... |
GB_unaryop__ainv_int64_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
elemwise_binary_scalar_op.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 ... |
sections.c | #include <stdio.h>
#include <omp.h>
void funcA() {
printf("En funcA: esta sección la ejecuta el thread %d\n",
omp_get_thread_num());
}
void funcB() {
printf("En funcB: esta sección la ejecuta el thread %d\n",
omp_get_thread_num());
}
int main() {
#pragma omp parallel
{
... |
convolution_3x3_pack8to4_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 ... |
mm.best-seq.c |
#include <stdio.h>
#include <sys/time.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))
#define M NCONT
#define N NCONT
#define K CONT
double A[M][K]... |
IBK_messages.h | /* Copyright (c) 2001-2017, Institut für Bauklimatik, TU Dresden, Germany
Written by A. Nicolai, H. Fechner, St. Vogelsang, A. Paepcke, J. Grunewald
All rights reserved.
This file is part of the IBK Library.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided ... |
generate-score-table.c | #include <glib.h>
#include <gio/gio.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <string.h>
#if HAVE_OPENMP
#include <omp.h>
#else
static int omp_get_thread_num (void) { return 0; }
#endif
#include <sparse.h>
G_DEFINE_AUTOPTR_CLEANUP_FUNC (FILE, fclose)... |
GB_unop__sin_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... |
DRB098-simd2-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... |
proc_uk_graph.c | #include "q_incs.h"
#include "_mmap.h"
#define NODE_TYPE uint32_t
#define MAXLINE 65535
int
main(
int argc,
char **argv
)
{
int status = 0;
char *infile;
char *prefix;
FILE *fp = NULL;
FILE *lbfp = NULL;
FILE *ubfp = NULL;
FILE *tofp = NULL;
char *buf = NULL;
char line[MAXLINE+1];
NODE_... |
634.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... |
2507.c |
/*
* Compile using the command:
* `cc 27Stencil.c -o oa -fopenmp -lm`
*/
#include <math.h>
#include <omp.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENACC
#include <openacc.h>
#endif
#define DEFAULT_DATASIZE 1048576 /* Default datasize. */
#define DEFAULT_REPS 10 ... |
core_dlantr.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zlantr.c, normal z -> d, Fri Sep 28 17:38:21 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
vednnMaxPoolingBackward.c | #include "vednnMaxPoolingBackward.h"
#include "vednn-def.h"
#include <stdint.h>
static inline vednnError_t
vednnMaxPoolingBackward_wrapper(
vednnMaxPoolBackward_t pFunc,
VEDNN_MAXPOOLINGBKW_ARGS )
{
#ifndef VEDNN_USE_OPENMP
return pFunc(VEDNN_MAXPOOLINGBKW_ARGS_LIST);
#else
if ( __vednn_omp_num_threads == ... |
cancel_worksharing.c | // RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// Current GOMP interface implementation does not support cancellation; icc 16 does not distinguish between sections and loops
// XFAIL: icc-16
#include "callback.h"
#include <unistd.h>
int main()
{
int... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
YAKL_atomics.h |
#pragma once
// Included by YAKL.h
namespace yakl {
// These are YAKL's atomic operations: atomicAdd, atomicMin, and atomicMax
// Where possible, hardware atomics are used. Where that's not possible, CompareAndSwap (CAS)
// implementations are used.
template <class T> inline void atomicAdd_host(T &update, ... |
HardTanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/HardTanh.c"
#else
void THNN_(HardTanh_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output,
accreal min_val_,
accreal max_val_,
bool inplace)
{
real min_val = TH_CONVERT_ACCREAL_TO_REAL(... |
schedule.c | /* cc -lm t4.c -qsmp */
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <math.h>
#include <sys/time.h>
#include <unistd.h>
#define FLT double
/* utility routines */
void my_bar();
void explain(char astr[]);
FLT system_clock(FLT *x);
void start_time();
FLT end_time();
/* array used to determine how m... |
getEnv.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
int nthreads, tid, procs, maxt, inpar, dynamic, nested;
/* Start parallel region */
#pragma omp parallel private(nthreads, tid)
{
/* Obtain thread number */
tid = omp_get_thread_num();
/* Only master thread does thi... |
critical.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n=20, a[n],suma=0,sumalocal;
if(argc < 2) {
fprintf(stderr,"\nFalta iteraciones\n"); exit(-1);
}
n = atoi(argv[1]); if (n>20) n=20;
for (i=0; i<n; i++) a[i] = i;
#pragma omp parallel p... |
blas_op.c | /* Copyright (c) 2015 The University of Edinburgh. */
/*
* This software was developed as part of the
* EC FP7 funded project Adept (Project ID: 610490)
* www.adept-project.eu
*/
/* Licensed under the Apache License, Version 2.0 (the... |
ordered.c | /*
* ordered.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===... |
tinyexr.h | #ifndef TINYEXR_H_
#define TINYEXR_H_
/*
Copyright (c) 2014 - 2020, 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 th... |
eavlInfoTopologyGatherMapOp.h | // Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information.
#ifndef EAVL_INFO_TOPOLOGY_GATHER_MAP_OP_H
#define EAVL_INFO_TOPOLOGY_GATHER_MAP_OP_H
#include "eavlCUDA.h"
#include "eavlCellSet.h"
#include "eavlCellSetExplicit.h"
#include "eavlCellSetAllStructured.h"
#include "eavlDataSet.h"
#include "... |
functions.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "functions.h"
//compute a*b mod p safely
unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) {
unsigned int za = a;
unsigned int ab = 0;
while (b > 0) {
if (b%2 == 1) ab = (ab + za) % p;
za = (2 * za... |
prand.c | //------------------------------------------------------------------------------
// GraphBLAS/Demo/Source/prand: parallel random number generator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Lice... |
problem_of_the_roundtable.c | //Compilieren und Ausführen:
// gcc -std=c99 -fopenmp problem_of_the_roundtable.c -o problem_of_the_roundtable
// .\problem_of_the_roundtable 16
//Bei Fehler "cannot find -lpthread" -> mingw32-pthreads-w32 installieren (https://stackoverflow.com/questions/23554716/using-openmp-on-windows-with-mingw-cannot-find-lpthr... |
box2d4r.c | #define BENCH_DIM 2
#define BENCH_FPP 161
#define BENCH_RAD 4
#include "common.h"
double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop)
{
double start_time = sb_time(), end_time = 0.0;
int dimsize = compsize + BENCH_RAD * 2;
SB_TYPE (*A)[dimsize][dimsize] = (SB_TYPE (*)[dimsize][dimsize])A1;... |
GB_unaryop__minv_uint8_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... |
bucle-sections-modificado.c | #include <stdio.h>
#include <omp.h>
void funcA() {
printf("En funcA: esta sección la ejecuta el thread %d\n",
omp_get_thread_num());
}
void funcB() {
printf("En funcB: esta sección la ejecuta el thread %d\n",
omp_get_thread_num());
}
int main() {
int i = 0, j = 5, n = 10;
#pragma omp parallel sections
... |
GB_split_sparse_template.c | //------------------------------------------------------------------------------
// GB_split_sparse_template: split a single tile from a sparse matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
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... |
glove_cython.c | /* Generated by Cython 0.20.1post0 (Debian 0.20.1+git90-g0e6e38e-1ubuntu2) on Sat May 23 21:00:29 2015 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTE... |
loop-14.c | /* { dg-do run } */
volatile int ji = 100, ki = 2;
volatile unsigned int ju = 100, ku = 2;
volatile long long int jll = 100, kll = 2;
volatile unsigned long long int jull = 100, kull = 2;
unsigned long long l;
void
f0 (void)
{
int i, j, k;
unsigned int j2, k2;
#pragma omp for reduction(+: l) schedule(static, 2)... |
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) ... |
CG_MPI_OMP.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <mkl_blas.h>
#include <mpi.h>
#include <hb_io.h>
#include <vector>
#include "reloj.h"
#include "ScalarVectors.h"
#include "SparseProduct.h"
#include "ToolsMPI.h"
#include "exblas/exdot.hpp"
#include "cg_aux.h"
#in... |
matrix_vector_functions_intel_mkl_ext.c | #include <stdio.h>
#include "matrix_vector_functions_intel_mkl.h"
#include "matrix_vector_functions_intel_mkl_ext.h"
#include <math.h>
#include "mkl.h"
/* C = beta*C + alpha*A(1:Anrows, 1:Ancols)[T]*B(1:Bnrows, 1:Bncols)[T] */
void submatrix_submatrix_mult_with_ab(mat *A, mat *B, mat *C,
int Anrows, int Ancol... |
mandel-omp-taskloop-row.c | /*
* Sequential Mandelbrot program
*
* This program computes and displays all or part of the Mandelbrot
* set. By default, it examines all points in the complex plane
* that have both real and imaginary parts between -2 and 2.
* Command-line parameters allow zooming in on a specific part of
* this range.
... |
nodal_two_step_v_p_strategy.h | //
// Project Name: KratosPFEMFluidDynamicsApplication $
// Last modified by: $Author: AFranci $
// Date: $Date: June 2018 $
// Revision: $Revision: 0.0 $
//
//
#ifndef KRATOS_NODAL_TWO_STEP_V_P_STRATEGY_H
#define KRATO... |
image-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% IIIII M M AAA GGGG EEEEE ... |
mapped_im2col.h | #ifndef MAPPED_IM2COL_H_
#define MAPPED_IM2COL_H_
#include <omp.h>
#include <torch/extension.h>
#include "nn/common/mapped_im2col.h"
namespace mapped_conv {
namespace nn {
namespace cpu {
template <typename T>
void MappedIm2Col2D(const int64_t num_kernels, torch::Tensor data_im,
torch::Tensor sa... |
mxnet_op.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 ... |
epir_reply_mock.c |
#include "epir.h"
#define divide_up(a, b) (((a) / (b)) + (((a) % (b)) == 0 ? 0 : 1 ))
size_t epir_reply_size(const uint8_t dimension, const uint8_t packing, const size_t elem_size) {
size_t target_size = elem_size;
for(uint8_t d=0; d<dimension; d++) {
target_size = EPIR_CIPHER_SIZE * divide_up(target_size, packi... |
HelloWorlds.c | #include <stdio.h>
int main()
{
#pragma omp parallel
{
int i;
printf("Hello World\n");
#pragma omp parallel for
for( i = 0; i < 600; i++)
printf("Iter:%d\n",i);
}
printf("GoodBye World\n");
} |
c11_atomic_counter.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h> /* PRIu64 */
#include <assert.h>
#if 0
# include <pthread.h>
# include <unistd.h> /* sleep() */
#else
# ifdef _OPENMP
# include <omp.h>
# else
# error No OpenMP support!
# endif
#endif
#if 0
# ifdef __STDC_NO_ATOMICS__
# error You nee... |
matrix.h | /**
* @file matrix.h This code provide a templated matrix implementation
* @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 permit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.