source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
chlpca.h | /*
#
# File : chlpca.cpp
# ( C++ source file )
#
# Description : Example of use for the CImg plugin 'plugins/chlpca.h'.
# This file is a part of the CImg Library project.
# ( http://cimg.sourceforge.net )
#
# Copyright : Jerome Boulanger
# ... |
ourParallelKmeans2.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
typedef struct Point
{
double x;
double y;
} point;
int main(int argc, char **argv)
{
int max_threads = omp_get_max_threads();
printf("Maximum number of Threads = %d\n", max_threads);
srand(69420);
int stdin_input;
... |
GB_binop__atan2_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... |
cosmem.h | #ifndef COS_COS_COSMEM_H
#define COS_COS_COSMEM_H
/**
* C Object System
* COS memory allocator
*
* Copyright 2006+ Laurent Deniau <laurent.deniau@gmail.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 ... |
sgbuf.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "sgtype.h"
#include "sgbuf.h"
#include "mt64.h"
#include "vrand.h"
void random_data(sgData_t *buf, size_t len){
#ifdef _OPENMP
int nt = omp_get_max_threads();
#else
int nt = 1;
#endif
#pragma omp parallel for num_threads(nt)... |
GB_AxB_rowscale_meta.c | //------------------------------------------------------------------------------
// GB_AxB_rowscale_meta: C=D*B where D is a square diagonal matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
test_openmp.c | #include <stdbool.h>
#include <stdio.h>
#include <omp.h>
#include "test.h"
#include "gtmp.h"
int main(int argc, char **argv)
{
/* Get the number of barriers to test. */
if (argc < 2) {
printf("usage: %s <threads> <num_barriers>\n", argv[0]);
return -1;
}
/* First argument is number of... |
comm.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 ... |
ldriver_parallel.c | #include "stepper_parallel.h"
#include "shallow2d.h"
#ifdef _OPENMP
#include <omp.h>
#elif defined SYSTIME
#include <sys/time.h>
#endif
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
//ldoc on
/**
* # Driver code
*
* The driver code is where ... |
parser.c | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "parser.h"
typedef struct stack_data_u {
operator_type_t op;
ast_node_t *node;
} stack_data_t;
typedef struct stack_s {
stack_data_t *data;
int size;
int capacity;
} stack_t;
static stack_t *stack_alloc(int capacity) {
stack_t *out = malloc(s... |
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... |
GB_unaryop__minv_int32_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
utils.h | #ifndef _UTILS_
#define _UTILS_
#include "common.h"
// print 1D array
template<typename T>
void print_1darray(T *input, int length)
{
for (int i = 0; i < length; i++)
printf("%i, ", input[i]);
printf("/n");
}
/*struct assembly_timer {
timeval t1, t2;
struct timezone tzone;
void start() {... |
exchange_boundary.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
GB_unaryop__lnot_int8_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
globalsums.c | /*
* Copyright (c) 2015-2019, Triad National Security, LLC.
* All rights Reserved.
*
* Distributed under the OSI Certified Apache License 2.0
*
* GlobalSums, Version 1.0.0 (C16001) -- LA-CC-15-087
*
* Author -- Bob Robey, brobey@lanl.gov
*
* ABSTRACT
* A demonstration code to support a paper Computati... |
dzamax.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 ... |
VolumetricDilatedMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricDilatedMaxPooling.c"
#else
static inline void THNN_(VolumetricDilatedMaxPooling_shapeCheck)(
THNNState *state,
THTensor *input,
THTensor *gradOutput,
TH... |
spi.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
//seed random number generator
// Q2b: get the number of threads to run with from agrv and
// add OpenMP API code to set number of threads here
int Nthreads = atoi(argv[0]);
struct drand48_data *d... |
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... |
conv_dw_kernel_rv64.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... |
GB_unaryop__identity_int64_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... |
core_zlansy.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c d s
*
**/
#include "core_blas.h"
#include "plasma_types.h"
#include "core_lapack.h"
#include <math.h>
/************************************************... |
shared_private.c | #include <stdio.h>
int main(void)
{
int s = 0;
int p;
#pragma omp parallel shared(s) private(p)
{
p = 0;
s++;
p++;
printf("s = %d\n", s);
printf("p = %d\n", p);
}
return 0;
}
|
DRB047-doallchar-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... |
interpolate_op.h | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... |
main.c | // C Compiler flag: -fopenmp
#include <stdio.h>
#include <omp.h>
#include <stdlib.h>
#include <time.h>
#define N 20
int main(int argc, char *argv[])
{
srand(time(NULL));
omp_set_dynamic(0); // запретить библиотеке openmp менять число потоков во время исполнения
//omp_set_num_threads(2); // установить число поток... |
ejercicio5.c | #include <stdio.h>
#include <omp.h>
int main(){
int n = 9, i, b[n];
for (i=0; i<n; i++) b[i] = -1;
#pragma omp parallel
{ int a;
#pragma omp single //copyprivate(a)
{
printf("\nIntroduce valor de inicialización a: ");
scanf("%d", &a );
printf("\nSingle ejecutada por el th... |
text_parser.h | /*!
* Copyright (c) 2015 by Contributors
* \file text_parser.h
* \brief iterator parser to parse text format
* \author Tianqi Chen
*/
#ifndef DMLC_DATA_TEXT_PARSER_H_
#define DMLC_DATA_TEXT_PARSER_H_
#include <dmlc/data.h>
#include <dmlc/omp.h>
#include <thread>
#include <mutex>
#include <vector>
#include <cstri... |
mlp_mnist_bf16_amx_fused_trans_fused_sgd_numa.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
image-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% IIIII M M AAA GGGG EEEEE ... |
exercise4.c | /*
* BSD 2-Clause License
*
* Copyright (c) 2020, Alessandro Capotondi
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyri... |
GB_unop__identity_int64_int16.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... |
GB_unop__erf_fp64_fp64.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... |
SpatialAveragePooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialAveragePooling.c"
#else
static inline void THNN_(SpatialAveragePooling_shapeCheck)(
THTensor *input, THTensor *gradOutput,
int kH, int kW, int dH, int dW, int padH, int padW,
bool ceil_mode) {
THArgCheck(kW > 0 && kH > 0, 5,
"kernel siz... |
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... |
irbuilder_unroll_unroll_partial_factor.c | // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
// RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
#ifnd... |
critical-unrelated.c | /*
Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze
(joachim.protze@tu-dresden.de), Jonas Hahnfeld
(hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir
Rakamaric, Dong H. A... |
GB_unop__ainv_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... |
maxwell_grad.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
jacobi.c | #include <stdio.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
// Add timing support
#include <sys/time.h>
double time_stamp()
{
struct timeval t;
double time;
gettimeofday(&t, NULL);
time = t.tv_sec + 1.0e-6*t.tv_usec;
return time;
}
double time1, time2;
void driver(void);
void initialize(voi... |
sa.c | #include "common.h"
static void restore_edge(const int groups, const int kind_opt, int* restrict edge, int* restrict restored_line, const int* restrict restored_edge)
{
if(kind_opt != D_1G_OPT && kind_opt != D_2G_OPT)
ERROR("Wrong kind_opt: %d\n", kind_opt);
#pragma omp parallel for
for(int i=0;i<groups*kind_... |
assign_scalar_variable_to_entities_process.h | //
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Josep Maria Carbonell
// Vic... |
bug_nested_proxy_task.c | // RUN: %libomp-compile-and-run
// The runtime currently does not get dependency information from GCC.
// UNSUPPORTED: gcc
// REQUIRES: !abt
#include <stdio.h>
#include <omp.h>
#include <pthread.h>
#include "omp_my_sleep.h"
/*
With task dependencies one can generate proxy tasks from an explicit task
being executed ... |
ques11.c | #include <stdio.h>
#include <omp.h>
int main()
{
int n, a[100], i;
omp_set_num_threads(5);
printf ("Enter n\n");
scanf ("%d", &n);
a[0] = 0;
a[1] = 1;
#pragma omp parallel
{
#pragma omp single
{
for (i = 2; i < n; i++)
{
a[i] = a[i - 1] + a[i - 2];
printf ("Computation thread id = %d,... |
verlet.c | #include <math.h>
#include "cloud_util.h"
#include "verlet.h"
struct _verlet_t
{
double d;
Accel accel;
cse6230rand_t *rand;
};
int
VerletCreate(Verlet *verlet)
{
int err;
Verlet v;
err = safeMALLOC(sizeof(*v),&v); CHK(err);
v->d = 0.;
v->rand = NULL;
v->accel = NULL;
*verlet ... |
pzlantr.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_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include "plasma_types.h"
#in... |
GB_extractTuples.c | //------------------------------------------------------------------------------
// GB_extractTuples: extract all the tuples from a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Ide... |
adj.c | /* This code is part of this project: Donato E, Ouyang M,
* Peguero-Isalguez C. Triangle counting with a multi-core computer.
* Proceedings of IEEE High Performance Extreme Computing Conference
* (HPEC), 2018, 1-7.
*
* Copyright (c) 2018 Ming Ouyang
*
* Permission is hereby granted, free of charge, to any perso... |
conv_kernel_x86.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... |
rose_circuit_OpenMP.c | #include <omp.h>
# include <stdlib.h>
# include <stdio.h>
# include <time.h>
int main(int argc,char *argv[]);
int circuit_value(int n,int bvec[]);
void i4_to_bvec(int i4,int n,int bvec[]);
void timestamp();
/******************************************************************************/
int main(int argc,char *argv[]... |
GB_unop__identity_uint16_uint16.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... |
laplace2d-01.c | /*
* Copyright 2012 NVIDIA 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 applicable law ... |
tm_efficientdet_uint8.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... |
DFA on 8th Round Encryption.c | #include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <omp.h>
#include <inttypes.h>
#include <time.h>
#include "AES.h"
uint8_t ***DFA_round8Phase1(state_t* y, state_t* y_fault, int* SizeKeySet0, int* SizeKeySet1, int* SizeKeySet2, int* SizeKeySet3) {
... |
GraphReconstructor.h | //
// Copyright (C) 2015-2020 Yahoo Japan 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 applicab... |
dataset.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_DATASET_H_
#define LIGHTGBM_DATASET_H_
#include <string>
#include <functional>
#include <memory>
#include <mutex>
#include <unorder... |
degeneracy_matula.h | #pragma once
#ifndef DEGORDERMATULAPAR_H
#define DEGORDERMATULAPAR_H
#include "../general.h"
namespace PpParallel
{
//In Place
template <class SGraph, bool useRankFormat = false, class Set = typename SGraph::Set, class Output = std::vector<NodeId>>
void getDegeneracyOrderingMatula(const SGraph &graph, Output &res)
{... |
produce_consumer.c | #include <stdio.h>
#include <omp.h>
#include <stdlib.h>
int N = 20000;
double *A;
void fill_rand(){
int i;
for (i=0; i<N; i++)
*(A+i) = drand48();
}
double sum_array(){
int i;
double res = 0.0;
for (i=0; i<N; i++)
res += *(A+i);
return res;
}
int main(){
double sum, runtime;
int flag = 0, tmp_flag;
A =... |
iRCCE_irecv.c | //***************************************************************************************
// Synchronized receive routines.
//***************************************************************************************
//
// Author: Rob F. Van der Wijngaart
// Intel Corporation
// Date: 008/30/2010
//
//*********... |
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)... |
GB_unop__lnot_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... |
lin-time.c | #include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char const *argv[])
{
struct timeval TimeValue_Start;
struct timezone TimeZone_Start;
struct timeval TimeValue_Final;
struct timezone TimeZone_Final;
long time_start, time_end;
double time_overhead;
double pi, x;... |
nodeIntMap.h | #ifndef NODE_INT_MAP_H
#define NODE_INT_MAP_H
#include "graph.h"
typedef struct nodeIntMapElement {
node_t key;
int value;
}nodeIntMapElement;
/*
Map data structure.
If the map needs to be thread safe
use nodeIntMapAtomic
*/
typedef struct nodeIntMap {
nodeIntMapElement* list;
int maxSize;
int s... |
GB_binop__max_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:... |
generator_spgemm_csc_bsparse.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
single.c | #include <stdio.h>
#include <omp.h>
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 inicializacion a:");
scanf("%d",&a);
printf("Single ejecutada por el thread%d\n",omp_get_thread_num());
}
#pragm... |
mkl_util.h | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
unpk_0.c | #include <stdio.h>
#include <stddef.h>
#include <limits.h>
#include "wgrib2.h"
#ifdef USE_OPENMP
#include <omp.h>
#else
#define omp_get_num_threads() 1
#endif
/* 1996 wesley ebisuzaki
*
* Unpack BDS section
*
* input: *bits, pointer to packed integer data
* *bitmap, pointer to bitmap (undefined data),... |
GB_unop__identity_fp64_bool.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... |
threadprivate.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int counter=0;
#pragma omp threadprivate(counter)
int main(void)
{
int i;
#pragma omp parallel for ordered
for(i=0;i<100;i++)
counter++;
#pragma omp parallel
printf("counter=%d\n",counter);
return 0;
}
|
dnn.c | //------------------------------------------------------------------------------
// LAGraph/Test/DNN/dnn: run all neural networks from http://graphchallenge.org
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGr... |
debug_test_system.h | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
// Copyright (c) 2013 NVIDIA Corporation
// All rig... |
GB_binop__times_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... |
conv4D_impl_CPU.c | #include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <time.h>
#include "conv4D_impl.h"
conv_ret conv4d_convolve_serial_naive(conv4d_layer layer, featuremap_3d input, featuremap_3d output)
{
//Benchmarking setup
conv_ret ret;
clock_t start_t, end_t;
start_t = clock();
... |
GB_binop__second_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-... |
displacement_residual_contact_criteria.h | // KRATOS ______ __ __ _____ __ __ __
// / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ /
// / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
// / /___/ /_... |
implicit_midpoint.c | /* Generated by Cython 0.29.21 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
"/home/matt/miniconda3/envs/dapy/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h",
"/home/matt/miniconda3/envs/dapy/lib/python3.7/site-packages/numpy/core/include/numpy/ufunc... |
GB_unop__asin_fp64_fp64.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... |
munit.c | /* Copyright (c) 2013-2018 Evan Nemerson <evan@nemerson.com>
*
* 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 rights to use, copy... |
kmeans_clustering.balance.c | #include "hclib.h"
extern int ____num_tasks[32];
/*****************************************************************************/
/*IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. */
/*By downloading, copying, installing or using the software you agree */
/*to this license. If you do n... |
GB_unop__erfc_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... |
tree.h | #ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/meta.h>
#include <LightGBM/dataset.h>
#include <string>
#include <vector>
#include <memory>
#include <map>
namespace LightGBM {
#define kMaxTreeOutput (100)
#define kCategoricalMask (1)
#define kDefaultLeftMask (2)
/*!
* \brief Tree model
*/
clas... |
mapper.h | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and us... |
GB_binop__div_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
vec_default.c | // vec_default.c - default vector implementation
#include <cphis.h>
#include <linalg.h>
#include <stdlib.h>
#include <math.h>
CphisError CphisVecCreate_default(
CphisVec *vec,
CphisIndex numElements,
int numLocalDOF
)
{
(*vec)->vec = malloc(numElements*numLocalDOF*s... |
otfft_sixstepns.h | /******************************************************************************
* OTFFT Sixstep of Normalized Square Version 6.5
*
* Copyright (c) 2015 OK Ojisan(Takuya OKAHISA)
* Released under the MIT license
* http://opensource.org/licenses/mit-license.php
********************************************************... |
effects.c | #define _POSIX_C_SOURCE 200809
#define _XOPEN_SOURCE 700
#include <omp.h>
#include <limits.h>
#include <stdlib.h>
#include <stdbool.h>
#include <dlfcn.h>
#include <string.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <spawn.h>
#include <time.h>
#in... |
convolution_pack8to1_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 ... |
parallel_for_wrapper.h | #pragma once
#include <omp.h>
#include <thread>
#include <opencv2/opencv.hpp>
/*
On OpenCV 3.2.0, cv::parallel_for_ combined with lambda function is not supported (occurring below error).
If version of the library is greater than 3.2.0.
"parallel_for_omp" can be replaced by cv::parallel_for_ without loss o... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) >... |
cluster_list_impl.h | /* The MIT License (MIT)
*
* (c) Jürgen Simon 2014 (juergen.simon@uni-bonn.de)
*
* 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 ... |
grib_bits_fast_big_endian_omp.c | /*
* Copyright 2005-2019 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an int... |
lst.c | #include<stdio.h>
#include "gdal.h"
#include "arrays.h"
#include<omp.h>
/* mod11A1 MODLAND_QC bits [00-11]
[00] = class 0 ; LST produced, good quality, not necessary to examine detailed QA
[01] = class 1 ; LST produced, unreliable or unquantifiable quality, recommend examination of more detailed QA
[10] = class 2 : LS... |
task_types.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
#include <math.h>
int main() {
//initialize the OpenMP runtime
omp_get_num_threads();
// initial task
print_ids(0);
int x;
// implicit task
#pragma omp parallel num_threads(1)
{
print_ids(0);
x... |
restrict_mex.c | #include <inttypes.h>
#include <omp.h>
#include "mex.h"
#include "restrict_mex.h"
void restrictf(float *x2,
const float *x, const uint8_t *G2,
const size_t *sz2, const size_t *sz);
void restrictd(double *x2,
const double *x, const uint8_t *G2,
const size_t ... |
MandelbrotCPU.h | #pragma once
#include "Common.h"
namespace cpu
{
template<typename T>
T init_uint(uint32_t val);
template<typename T>
T init_float(float f);
template<typename T>
T init_row_offsets();
template<typename T>
T reinterpret_vector(__m256i a);
uint32_t min(uint32_t x, uint32_t y)
... |
sample_nested.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See LICENSE.txt in top-level directory.
*/
#include <omp.h>
#include <stdio.h>
#include <sys/time.h>
int main(int argc, char * argv[]) {
int size=(argc>1)?atoi(argv[1]):100;
int i,j,k=0;
int nthreads;
struct timeval t_start, t... |
singleModificadoMaster.c | #include <stdio.h>
#include <omp.h>
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 1 ejecutada por el thread %d\n", omp_get_thread_num());
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.