source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
reduction-clauseModificado.c | #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 = atoi(argv[1]);
if (n>20) {n=20; printf("n=%d",n);}
for (i=0; i<... |
spark-integration.h | #ifndef __SPARK_INTEGRATION_H
#define __SPARK_INTEGRATION_H
#include <mpi.h>
#include <vector>
#include <cstring>
#include <functional>
#include <cassert>
#include <sstream>
#include <fstream>
#include <sys/mman.h>
#include <fcntl.h>
#include <cstdio>
#include <omp.h>
#include <unistd.h>
#include <cerrno>
#include "hd... |
NLmean_propag2dirs_sspacing4_tspacing6_sim12_acc12_neighbor5_tau0100.c | /*
* compile: gcc -O3 -std=c99 -o [filename_out] -fopenmp [filename].c -lm -I/usr/include/netcdf-3/ -L/usr/lib64/ -lnetcdf -lnetcdf_c++
* in the terminal: export OMP_NUM_THREADS=3
*/
#include<stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <netcdf.h>
#include <omp.h>
/* This is the name ... |
sink-1.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -Wunknown-pragmas -Werror" } */
extern void bark (void);
int i,j,k;
int array[555];
int
main()
{
#pragma omp parallel for ordered(2)
for (i=0; i < 100; ++i)
for (j=0; j < 100; ++j)
{
/* OUT variant does not apply to ORDERED construct. */
#pragma omp order... |
omptest-modified.c | #include <nautilus/nautilus.h>
#include <nautilus/shell.h>
#include <nautilus/libccompat.h>
#include <nautilus/random.h>
#include <nautilus/math.h>
#include "gomptestdata.h"
#define ERROR(fmt, args...) ERROR_PRINT("omptest: " fmt, ##args)
#define DEBUG(fmt, args...) DEBUG_PRINT("omptest: " fmt, ##args)
#define INFO(fm... |
matmul.c | /*
* In His Exalted Name
* Title: Matrix Multiplication Sequential Code
* Author: Ahmad Siavashi, Email: siavashi@aut.ac.ir
* Date: 15/11/2015
*/
/*
* Parallelization: Ali Gholami
*/
// Let it be.
#define _CRT_SECURE_NO_WARNINGS
#define NUM_THREADS 8
// Global variable to check the summation of the elements of ... |
dsutil.h | /* dsutil.h */
/*
* Copyright (C) 1995-2001 Dynasim AB.
* All rights reserved.
*
*/
/* Utility macros and functions for DSblock.
Author: Hilding Elmqvist, Dynasim AB, 1995-02-21
Version: 1.8, 1996-09-30
1.9, 1996-10-19: Added support for non-root finder.
1.10 1996-10-24: DymosimMessa... |
c99-omp-dekker.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#ifdef _OPENMP
# include <omp.h>
#else
# error No OpenMP support!
#endif
#if ( _OPENMP < 201307 )
# error You need OpenMP 4+ for seq_cst atomics.
#else
# define OMP_ATOMIC_LOAD_SC _Pragma("omp atomic read seq_cst")
# define OMP_ATOMIC_STORE_SC _Pragma("omp ... |
GB_binop__min_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-... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <complex.h>
#include "omp.h"
#define MAX_ITER 10000
#define SIZE 1024
#define WIDTH SIZE
#define HEIGHT SIZE
#define NUMTHREADS 8
typedef enum
{
RGB_RED = 0,
RGB_GREEN,
RGB_BLUE,
} rgb_t;
// performs mandelbrot calculation for every pixel
void generate_mandelbrot(... |
batchnorm_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... |
grid.c | #include "grid.h"
#include "debug.h"
#include <stdio.h>
#include <stdlib.h>
/*! Initialize cellular automata grid
*
* \param gd Pointer to grid to initialize
* \param n_rows Number of rows in grid
* \param n_cols Number of cols in grid
* \param err Pointer to cuz error type
*/
void cuz_init_gd(struct cuz_grid *g... |
exm.c | // SPDX-License-Identifier: BSD-2-Clause
/*
Copyright 1998-2002 Bernard Parent
Copyright 2019 Jaehyuk Lee
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright not... |
libimagequant.c | /*
** © 2009-2018 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include ... |
GB_binop__pow_fc32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
gimplify.c | /* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@red... |
REAL.c | /****************************************************************************
*REAL - Rapid Earthquake Association and Location
*
*What you need:
* 1. Traveltime table for P or/and S waves (dist,dep,P arrival,S arrival ...)
* 2. Station information (stlo,stla,net,sta,chan,elev)
* 3. Picks at each station and t... |
parallel_for_ordered.c | // Skip testing on 64 bit systems for now!
#ifndef __LP64__
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
static int last_i = 0;
/*!
Utility function: returns true if the passed argument is larger than
the argument of the last call of this function.
*/
static int
check_i_islarger2 (int i)
{... |
QLA_F3_c1_veq_V_dot_V.c | /**************** QLA_F3_c_veq_V_dot_V.c ********************/
#include <stdio.h>
#include <qla_config.h>
#include <qla_types.h>
#include <qla_random.h>
#include <qla_cmath.h>
#include <qla_f3.h>
#include <math.h>
static void start_slice(){
__asm__ __volatile__ ("");
}
static void end_slice(){
__asm__ __volatile... |
stationary_cython.c | /* Generated by Cython 0.23 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython re... |
optQCCFast.c | #include <mex.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
/* q_c.singleton = optQCMFC(condQB,prediction,Sigma_c,mu_c,c_c,mu_a_b,numColumnsPred,numColumnsShape,columnsPredShapeVec,columnsPredShapeFactorVec);
* */
int min(int A, int B) {
if (A < B) {
return A;
} else {
return B... |
ClassNLLCriterion.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/ClassNLLCriterion.c"
#else
void THNN_(ClassNLLCriterion_updateOutput)(
THNNState *state,
THTensor *input,
THIndexTensor *target,
THTensor *output,
int64_t reduction,
THTensor *weights,
TH... |
parallel.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "matrix_functions.h"
int main(int argc, char const *argv[]) {
if (argc != 3) {
fprintf(stderr, "Error. Entregar el 'n' y el numero de hilos.\nEjemplo: par 400 4\n");
return -1;
}
srand(time(NUL... |
graph.c | /*!
* \file
*
* \brief Various routines with dealing with sparse graphs
*
* \author George Karypis
* \version\verbatim $Id: graph.c 22415 2019-09-05 16:55:00Z karypis $ \endverbatim
*/
#include <GKlib.h>
#define OMPMINOPS 50000
/*************************************************************************... |
ft_ao.c | /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required ... |
dem_structures_coupling_utilities.h | /*
* Author: Miguel Angel Celigueta
*
* maceli@cimne.upc.edu
*/
#ifndef KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
#define KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
// /* External includes */
// System includes
// Project includes
#include "includes/variables.h"
/* System includes */
#include <limits>
#includ... |
test-zrocks.c | /* xZTL: Zone Translation Layer User-space Library
*
* Copyright 2019 Samsung Electronics
*
* Written by Ivan L. Picoli <i.picoli@samsung.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... |
convolution_3x3_pack1to4.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
GB_unaryop__identity_uint16_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
backprop.c | /*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
* Modified by Shuai Che
******************************************************************
*/
#include "backprop.h"
#include <ass... |
target_data_at_exit.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-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-powerpc64-ibm-linux-gnu 2>&1 \
// RUN: |... |
GB_unaryop__lnot_int64_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... |
hmm.c | /*
* Copyright (C) 2017 by Benedict Paten (benedictpaten@gmail.com)
*
* Released under the MIT license, see LICENSE.txt
*/
#include "stRPHmm.h"
// OpenMP
#if defined(_OPENMP)
#include <omp.h>
#define CELL_BUFFER_SIZE 1000
#endif
inline double logAddP(double a, double b, bool maxNotSum) {
/*
* Local func... |
ft.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - FT
This benchmark is an OpenMP C version of the NPB FT code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by NA... |
csr_matvec.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_binop__pow_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
CGOpenMPRuntime.h | //===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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
//
//===---------------------------... |
HardTanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/HardTanh.c"
#else
static int nn_(HardTanh_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor);
THTensor_(resizeAs)(output, input);
if (input->nD... |
fixed_version.c | #include <stdio.h>
int main(){
int sum =0;
int temp[100];
int DATA_MAG = 100;
int H[100];
int scale_factor = 10;
int i;
int LUT[100];
#pragma omp parallel default (none) private(i) shared (temp, LUT, H, scale_factor, sum, DATA_MAG)
{
#pragma omp for
for (i =0; i < DATA_MAG... |
GB_msort_2b.c | //------------------------------------------------------------------------------
// GB_msort_2b: sort a 2-by-n list of integers, using A[0:1][ ] as the key
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
//... |
fused_rowwise_nbit_conversion_ops.h | #pragma once
#include <algorithm>
#include <vector>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
// for param_search_greedy
#include "caffe2/operators/fused_rowwise_nbitfake_conversion_ops.h"
#include "caffe2/... |
cxx-pretty-print.c | /* Implementation of subroutines for the GNU C++ pretty-printer.
Copyright (C) 2003-2020 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Publi... |
GB_unop__identity_uint32_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
mandel-omp-for-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.
... |
GB_binop__eq_fc64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
diffusion_SOR.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#define PI 3.14159265358979323846
void getRHS(const int Nx, const int Ny, double C[][Ny], double RHS[][Ny], double s_source[][Ny],
const double dt, const double ax, const double ay);
void SOR_iteration(const int Nx, const int Ny, d... |
csr_matvec_oomp.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)
**************************************... |
blake2sp.c | /*
BLAKE2 reference source code package - optimized C implementations
Written in 2012 by Samuel Neves <sneves@dei.uc.pt>
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is dist... |
QLA_F3_D_vpeq_spproj_M_times_pD.c | /**************** QLA_F3_D_vpeq_spproj_M_times_pD.c ********************/
#include <stdio.h>
#include <qla_config.h>
#include <qla_types.h>
#include <qla_random.h>
#include <qla_cmath.h>
#include <qla_f3.h>
#include <math.h>
static void start_slice(){
__asm__ __volatile__ ("");
}
static void end_slice(){
__asm__... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
shape.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
GB_binop__second_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
lab2-stephen-stengel.h | #ifndef STEPHEN_STENGEL_LAB2lol
#define STEPHEN_STENGEL_LAB2lol
#include <stdio.h>
#include <omp.h>
#include "mylab1functions.h"
#define MAX_FILENAME_LEN 500
#define MAX_STR_LEN 50
//function definitions
void testStringPass(char * dataStr);
void writeDataToFile(char * filename, int m, int n, int t, double time, c... |
ipagerank.c | //------------------------------------------------------------------------------
// SuiteSparse/GraphBLAS/Demo/Source/ipagerank: pagerank using uint64 semiring
//------------------------------------------------------------------------------
// A is a square unsymmetric binary matrix of size n-by-n, where A(i,j) is the... |
measures_linear_threads.c |
#include <numtrd.h>
#include <chaininghp.h>
#include <migrch.h>
#include <fitness/fitness.h>
#include <config.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include "fitness_private.h"
#include "gyration.h"
#define COORD3D(V, AXIS) COORD(V.x, V.y, V.z, AXIS)
#define COORD(X, Y, Z, AX... |
gemm.c | #include "gemm.h"
#include "utils.h"
#include "cuda.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
void gemm_bin(int M, int N, int K, float ALPHA,
char *A, int lda,
float *B, int ldb,
float *C, int ldc)
{
int i,j,k;
for(i = 0; i < M; ++i){
for(k = 0; k < K; ++k){... |
ast-dump-openmp-teams-distribute-parallel-for.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
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp targ... |
Example_target_defaultmap.1.c | /*
* @@name: target_defaultmap.1.c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
*/
#include <stdlib.h>
#include <stdio.h>
#define N 2
int main(){
typedef struct S_struct { int s; int A[N]; } S_struct_t;
int s; //scalar int variable... |
GB_binop__iseq_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
convolution_3x3_pack1to4_int8.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 ... |
cleaned_t_b_one.c | /**
F.H.P.C. Assingment 2
@file cleaned_t_b_one.cc
@brief thread master fills the array, others makes sum.
@author Pietro Morichetti
@date 17/12/2019
@version 1.1
*/
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#define _GNU_SOURCE
#define N 10000000 // size of the problem
int main(int argc... |
scaling_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
#if !defined(KRATOS_SCALING_SO... |
mat_mul_p4a_2000.c | /*
* file for mat_mul.c
*/
#include "./mat_mul.h"
#include "./size.h"
void mat_mul(int *a, int *b, int *c);
void mat_mul(int *a, int *b, int *c)
{
int i, j, k, t;
#pragma omp parallel for private(j, t, k)
for(i = 0; i <= 1999; i += 1)
for(j = 0; j <= 1999; j += 1) {
c[i*2000+j] = 0;
for... |
9460.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... |
cfd-mini-c.test.c | /******************************************************************************
* This is a benchmark written to emulate the behavior of a typical
* computational fluid dynamics benchmark. The physical space being simulated
* is broken into boxes (cubes). All boxes have the same number of cells.
*
* build:
* ... |
GB_unaryop__identity_int32_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... |
gsrb.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
radmin_fmt_plug.c | /* RAdmin v2.x cracker patch for JtR. Hacked together during
* May of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source ... |
tracers.c | /******************************************************************************
* *
* TRACERS.C *
* *
... |
GB_unaryop__identity_uint32_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
private-clauseModificado2.c | /*
* private-clause.c
*
* Created on: 02/04/2014
* Author: Carlos de la Torre
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main() {
int i, n = 7;
int a[n];
int suma=0;
for (i = 0; i < n; i++)
a[i] = i;
#pragma omp parallel private(suma)
{
#p... |
dds.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
amplici.c | /**
* @file amplici.c
* @author Xiyu Peng
*
* AmpliCI: Method to identify true sequences (haplotypes) in a sample of
* Illumina amplicon data (from FASTQ file).
*
* [TODO]
* 1. check reads with unequal lengths and report error
* Note the data structure actually supports reads with unequal leng... |
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... |
GB_binop__remainder_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
begin_declare_variant_messages.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
#pragma omp begin // expected-error {{expected an OpenMP directive}}
#pragma omp end declare... |
polybench.c | // RUN: mlir-clang %s polybench_alloc_data %stdinclude -S | FileCheck %s
// XFAIL: *
/**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.fr>
*
* Web address: http://polybench.sourceforge.net
*/
/* polybench.c: this file is p... |
GB_emult_04.c | //------------------------------------------------------------------------------
// GB_emult_04: C<M>= A.*B, M sparse/hyper, A and B bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licen... |
gbdt.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include... |
for_parallel_transpose.c | #include <stdio.h>
#include <errno.h> // for errno
#include <math.h>
#include <limits.h> // for INT_MAX
#include <stdlib.h> // for strtol
#include <time.h>
#include <omp.h>
int numThreads = 1;
void freeMatrix(double** matrix, long lins){
for (long i = 0; i < lins; ++i) {
free(matrix[i]);
}
free(m... |
OpenMP-doc.c | #error File has not been written to be compiled
/// 21.09.2012
// How To Build: gcc -fopenmp
#include <omp.h>
// Parallel Just:
#pragma omp parallel shared (a) private (j)
{
// will be executed by all threads
}
// Parallel FOR:
int a[] = { };
int j = 0; // integer only
#pragma omp parallel f... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
GB_unaryop__identity_int64_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
rawSHA1_fmt_plug.c | /*
* This software is Copyright (c) 2004 bartavelle, <simon at banquise.net>, 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.
*
* Optimised set_key() and reduced binary size by magnum, 2012
... |
Q5.3-d.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <string.h>
#define MAXIMO 100
int num_aleatorio() {
int numero = random() % MAXIMO;
return numero;
}
void geraMatriz(int * a, int n) {
int i;
for (i = 0; i < n; ++i) {
a[i] = num_aleatorio();
}
}
void imprimeMatriz(int * a, int n) ... |
GB_binop__lxor_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
gbdt.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include... |
GB_unop__carg_fp64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
hoPartialDerivativeOperator.h | /** \file hoPartialDerivativeOperator.h
\brief Partial derivative regularization operator, CPU based.
*/
#pragma once
#include "partialDerivativeOperator.h"
#include "hoNDArray_math.h"
#include "vector_td_utilities.h"
#ifdef USE_OMP
#include <omp.h>
#endif
namespace Gadgetron{
/** \class hoPartialDerivativeOpe... |
GB_binop__lxor_bool.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
matrix.c | /*****************************************************************************
*
* Elmer, A Finite Element Software for Multiphysical Problems
*
* Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland
*
* This library is free software; you can redistribute it and/or
* modify it under the term... |
adagrad_op.h | #pragma once
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename Context>
void adagrad_update(
int N,
const float* g,
const float* h,
float* ng,
float* nh,
float epsilon,
const float* lr,
Context* context) {
// TODO(cxj): use OMP when it is reliable
// #pragma ... |
racf_fmt_plug.c | /* RACF cracker patch for JtR. Hacked together during March of 2012 by
* Dhiru Kholia <dhiru.kholia at gmail.com> .
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and b... |
GB_emult_03_template.c | //------------------------------------------------------------------------------
// GB_emult_03_template: C<M>= A.*B, M sparse/hyper, A and B bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// S... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
schelude-clause-runtime.c | #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=0;
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 para... |
cxx-pretty-print.c | /* Implementation of subroutines for the GNU C++ pretty-printer.
Copyright (C) 2003-2020 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Publi... |
omp_loop1.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i;
#pragma omp parallel num_threads(2)
#pragma omp for
for (i = 0; i < 8; i++) {
printf("[%d] Hello OpenMP (%d)\n", i, omp_get_thread_num());
}
return 0;
}
|
GB_binop__bset_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-... |
easyopt.c | /*
This implementation does some easy optimization on the baseline code.
*/
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#define L1 2000
#define L2 2000
#define LT 100
#define SEED 0
#define LS (L1 * L2)
char world[L1 + 2][L2 + 2];
char result[L1 + 2][L2 + 2];... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.