source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
LAGraphX_bc_batch3.c | //------------------------------------------------------------------------------
// LAGraphX_bc_batch: Brandes' algorithm for computing betweeness centrality
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGraph... |
util.h | /*
* This file is part of Quantum++.
*
* MIT License
*
* Copyright (c) 2013 - 2018 Vlad Gheorghiu (vgheorgh@gmail.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 restr... |
GB_binop__plus_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
convolution_omp.c | #include "convolution.h"
void f(int x)
{
printf("%d\n%", x);
return;
}
// Divides the each pixel value by normalize_amount in 2d array **img to
// normalize pixel values. Integer division is OK.
void normalize_output(image *img, int normalize_amount)
{
for (int r = 0; r < img->height; r++)
{
f... |
GrB_Vector_nvals.c | //------------------------------------------------------------------------------
// GrB_Vector_nvals: number of entries in a sparse vector
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Ide... |
FasterLookup.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "src/FasterLookup.c"
#else
// add two vectors
static inline void nn_(FasterLookup_addVec)(
real *res, real alpha, real *vec, int dim) {
int i;
int m = dim - 3;
for (i = 0; i < m; i += 4) {
res[i] += alpha * vec[i];
res[i+1] += alpha * vec[i+1];
res[i+... |
nr_numint.c | /* Copyright 2014-2020 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 ... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
net_sha1_fmt_plug.c | /* Cracker for "Keyed SHA1" network authentication hashes.
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permit... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
geometry_para.c | /*
* Copyright 2010 (c) SINTEF ICT, Applied Mathematics.
* Jostein R. Natvig <Jostein.R.Natvig at sintef.no>
*/
#include <omp.h>
#include <math.h>
#include <stdio.h>
#include "geometry.h"
/* ------------------------------------------------------------------ */
static void
cross(const double u[3], const double v[3],... |
GB_transpose_bucket.c | //------------------------------------------------------------------------------
// GB_transpose_bucket: transpose and optionally typecast and/or apply operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserve... |
spmv.c | /***************************************************************************
*
* (C) Copyright 2010 The Board of Trustees of the
* University of Illinois
* All Rights Reserved
*
* SPMV: Sparse-Matrix Dense-Vector Multiplication
* Computes the produc... |
quebra_md5.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <omp.h>
#include <openssl/md5.h>
#include <locale.h>
char *hash;
int len;
clock_t begin;
float tempo;
int fim = 0;
char res[10];
const char charset[] = "@$#?!=+%abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
const i... |
ic0_csc_inspector.h | //
//
#include <cstdio>
#include <vector>
#include <assert.h>
#include<set>
#undef MIN
#define MIN(x,y) ((x) < (y) ? (x) : (y))
#undef MAX
#define MAX(x,y) ((x) > (y) ? (x) : (y))
/*
* Computes the DAG of dependency after simplification
*/
void ic0_csc_inspector(int n, int *colPtr, int *rowIdx, std::vector<s... |
attention.c | #include "darknet.h"
#include <sys/time.h>
#include <assert.h>
void extend_data_truth(data *d, int n, float val) {
int i, j;
for (i = 0; i < d->y.rows; ++i) {
d->y.vals[i] = realloc(d->y.vals[i], (d->y.cols + n) * sizeof(float));
for (j = 0; j < n; ++j) {
d->y.vals[i][d->y.cols + j... |
oskar_dftw_c2c_3d_omp.c | /*
* Copyright (c) 2013, The University of Oxford
* All rights reserved.
*
* 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 notice,
* this list ... |
conv_direct_hcl_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... |
GB_binop__band_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-... |
opencl_7z_fmt_plug.c | /*
* This software is Copyright (c) 2015 magnum
* 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.
*/
#ifdef HAVE_OPENCL
#if FMT_EXTERNS_H
extern struct fmt_main fmt_opencl_sevenzip;
#eli... |
p_kernel.c |
/*
Author: Mohammed Al Farhan
Email: mohammed.farhan@kaust.edu.sa
*/
#include <petscmat.h>
#include <petscsnes.h>
#include <petscvec.h>
#include <omp.h>
#include "inc/geometry.h"
#include "inc/ktime.h"
#include "inc/ker/kernel.h"
#include "inc/ker/phy.h"
/*
Evaluate Function F(x): Functional form used to conv... |
par_mgr.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)
**************************************... |
mutex.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
omp_lock_t lock;
printf("%" PRIu64 ": &lock: %lli\n", ompt_get_thread_data()->value, &lock);
omp_init_lock(&lock);
omp_set_lock(&lock);
omp_unset_lock(&lock);
omp_destroy_lock(&lock);
om... |
cross.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.
*
*... |
plot.h | #ifndef OPENMC_PLOT_H
#define OPENMC_PLOT_H
#include <unordered_map>
#include <sstream>
#include "pugixml.hpp"
#include "xtensor/xarray.hpp"
#include "hdf5.h"
#include "openmc/position.h"
#include "openmc/constants.h"
#include "openmc/cell.h"
#include "openmc/geometry.h"
#include "openmc/particle.h"
#include "openmc... |
charge_deposition.h | #ifndef XFIELDS_CHARGE_DEPOSITION_H
#define XFIELDS_CHARGE_DEPOSITION_H
//include_file atomicadd.clh for_context opencl
//include_file atomicadd.h for_context cpu_serial cpu_openmp
/*gpukern*/ void p2m_rectmesh3d(
// INPUTS:
// length of x, y, z arrays
const int nparticles,
// part... |
w8_e2_output.c | // Checking the output from an openMP program.
#include <stdio.h>
#include <omp.h>
int main(int argc, char const *argv[]) {
int total_sum = 0;
int i;
#pragma omp parallel default(shared) reduction(+:total_sum) num_threads(4)
{
int my_id = omp_get_thread_num();
int my_sum = 0;
#p... |
GB_unop__identity_fp64_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... |
distributiongenerator.h | // @file distributiongenerator.h This code provides basic structure for
// distribution generators. This should be inherited by all other distribution
// generators.
// @author TPOC: contact@palisade-crypto.org
//
// @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT)
// All rights reserved.
// Red... |
GB_unaryop__lnot_bool_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... |
test.c | #include <stdio.h>
#define N 1024
#define TEST_SIMPLE_NW 1
#define TEST_LOOP 1
#define TEST_LOOP_NW 1
int a[N], b[N];
int aa[N], bb[N];
int main() {
int i;
int error, totError = 0;
#if TEST_SIMPLE_NW
for (i=0; i<N; i++) a[i] = b[i] = i;
// alloc, move to
#pragma omp target enter data ... |
annoylib_omp.h | // To use OpenMP replace the content of annoylib.h to this file context
#ifndef ANNOYLIB_H
#define ANNOYLIB_H
#include <stdio.h>
#include <sys/stat.h>
#ifndef _MSC_VER
#include <unistd.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stddef.h>
#include <omp.h>
#if ... |
GB_binop__bor_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-... |
solving_strategy.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
#if !defined(KRATOS_SOLVING... |
gather_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... |
omp_reduction.c | /******************************************************************************
* FILE: omp_reduction.c
* DESCRIPTION:
* OpenMP Example - Combined Parallel Loop Reduction - C/C++ Version
* This example demonstrates a sum reduction within a combined parallel loop
* construct. Notice that default data element scop... |
gemm.c | #include "gemm.h"
#include "utils.h"
#include "im2col.h"
#include "dark_cuda.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <stdint.h>
#ifdef _WIN32
#include <intrin.h>
#endif
#if defined(_OPENMP)
#include <omp.h>
#endif
#define TILE_M 4 // 4 ops
#define TIL... |
libperf_thread.c | /**
* Copyright (C) NVIDIA 2021. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <ucs/debug/log.h>
#include <ucs/arch/bitops.h>
#include <ucs/sys/module.h>
#include <ucs/sys/string.h>
#include <tools/perf/lib/libperf_int.h>
#include <string.h>
#inc... |
matmul_float.c | /*
* Square matrix multiplication
* A[N][N] * B[N][N] = C[N][N]
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <malloc.h>
#define N 512
//#define N 16
// read timer in second
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (do... |
convolutiondepthwise_5x5_packn.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 ... |
DRB061-matrixvector1-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
GB_binop__bset_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
root-threads-affinity.c | // RUN: %libomp-compile && env LIBOMP_NUM_HIDDEN_HELPER_THREADS=0 OMP_PROC_BIND=close OMP_PLACES=cores KMP_AFFINITY=verbose %libomp-run 8 1 4
// REQUIRES: linux
//
// This test pthread_creates 8 root threads before any OpenMP
// runtime entry is ever called. We have all the root threads
// register with the runtime by ... |
1064.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... |
hp16.c | /* 16-bit hash prospector
*
* Unlike the 32-bit / 64-bit prospector, this implementation is fully
* portable and will run on just about any system. It's also capable of
* generating and evaluating 128kB s-boxes.
*
* Be mindful of C integer promotion rules when doing 16-bit operations.
* For instance, on 32-bit i... |
gi_regular_grid_trilinear_function.h | /*
*
* Copyright (C) 2018 Attila Gyulassy <jediati@sci.utah.edu>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#ifndef REGULAR_GRID_TRILINEAR_FUNCTION
#define REGULAR_GRID_TRILINEAR_FUNCTION
#include <algorithm>
#in... |
sections-4.c | /* PR c++/24613 */
/* { dg-do compile } */
#pragma omp section /* { dg-error "may only be used in" } */
int i;
void
foo (void)
{
#pragma omp section /* { dg-error "may only be used in" } */
i++;
}
|
omp_parallel_sections_firstprivate.c | <ompts:test>
<ompts:testdescription>Test which checks the omp parallel sections firstprivate directive.</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp parallel sections firstprivate</ompts:directive>
<ompts:dependences>omp critical</ompts:dependences>
<ompts:testcode>
#include <st... |
ten_tusscher_2004_epi_S2_19.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_19.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... |
opal_test.c | // Copyright 2009-2021 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2021, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directory... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
linked_omp3_tasks.c | #include <omp.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef N
#define N 5
#endif
#ifndef FS
#define FS 38
#endif
struct node {
int data;
int fibdata;
struct node* next;
};
struct node* init_list(struct node* p);
void processwork(struct node* p);
int fib(int n);
int fib(int n)
... |
equation_groupnorm.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
blas_server_omp.c | /*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
/* Redistribution and use in sou... |
Pragma.h | //===--- Pragma.h - Pragma registration and handling ------------*- C++ -*-===//
//
// The LLVM37 Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
mv_tools.h | #ifndef __MV_TOOLS_H
#define __MV_TOOLS_H
namespace blue_sky
{
namespace bos_helper
{
namespace helper
{
template <typename T> struct is_int
{
enum { value = 0};
};
template <> struct is_int <int>
{
enum { value = 1};
};
temp... |
2182.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... |
target_implicit_partial_map.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu
// RUN: %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 \
// RUN: | %fcheck-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu
// RUN: %libomptarget-run-powerpc64-ibm-linux-gnu 2>&1 \
// RUN: | %fcheck-powerpc64-ibm-linux-gnu
// RUN... |
sse.h | /* SPDX-License-Identifier: MIT
*
* 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,
* modify, merge, publish, ... |
GB_unop__identity_fp64_fc32.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... |
dgemm.c | #include "cblas.h"
#include "dgemm_versions.h"
#include <assert.h>
#include <omp.h>
#include <stdio.h>
// #ifndef MYLIB_NUM_THREADS
// #define MYLIB_NUM_THREADS 10
// #endif
#define BLOCK_SIZE 2
#define min(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; })
void cb... |
GB_binop__iseq_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_binop__bxnor_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-... |
main.c | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <PeriodicFMM/FMMWrapper-c.h>
#include <PeriodicFMM/FMMWrapperWall2D-c.h>
int main(int argc, char **argv) {
MPI_Init(&argc, &argv);
int rank = 0, size = 0;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WO... |
GB_unaryop__lnot_uint64_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GB_binop__fmod_fp32.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_select_phase2.c | //------------------------------------------------------------------------------
// GB_select_phase2: C=select(A,thunk)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0... |
enforce_detgammabar_constraint.h |
void enforce_detgammabar_constraint(rfm_struct *restrict rfmstruct,
const paramstruct *restrict params, REAL *restrict in_gfs) {
#include "set_Cparameters.h"
#pragma omp parallel for
for(int i2=0; i2<Nxx_plus_2NGHOSTS2; i2++) {
#include "rfm_files/rfm_struct__read2.h... |
GB_binop__bxor_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
par_mgr.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)
**************************************... |
par_lr_interp.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... |
2.schedule.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h> /* OpenMP */
#define N 12
/* Q1: Which iterations of the loops are executed by each thread */
/* for each schedule kind? */
int main()
{
int i;
omp_set_num_threads(3);
#pragma omp paralle... |
PeptideIndexing.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
bug-nested.c | // RUN: %libomp-compile && env KMP_AFFINITY=compact %libomp-run
#include <stdio.h>
#include <stdint.h>
#include <omp.h>
#include "omp_testsuite.h"
int test_nested_affinity_bug() {
int a = 0;
omp_set_nested(1);
#pragma omp parallel num_threads(2) shared(a)
{
#pragma omp parallel num_threads(2) shared(a) pr... |
matmul.h | /* BSD 3-Clause License
* Copyright (c) 2019-2021, 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:
* 1. Redistributions of source code must retain the above copyright notice, this
* ... |
csr_mult_double.h | // Copyright 2021 Igor Rukhovich
#ifndef MODULES_TASK_2_RUKHOVICH_I_CSR_MULT_DOUBLE_CSR_MULT_DOUBLE_H_
#define MODULES_TASK_2_RUKHOVICH_I_CSR_MULT_DOUBLE_CSR_MULT_DOUBLE_H_
#include <omp.h>
#include <random>
#include <stdexcept>
#include <utility>
#include <vector>
class RandomDouble {
public:
static double Next(... |
tree_stats.h | /**
* This class lets us write methods to gather tree structure statistics once,
* and apply them to many data structures.
*/
#ifndef TREE_STATS_H
#define TREE_STATS_H
#ifdef USE_TREE_STATS
#include <cassert>
#include <sstream>
#include <string>
#include <vector>
#include <limits>
#include "plaf.h"
#define MAX_HE... |
kvstore_dist_server.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 ... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
cgadither.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <omp.h>
#include "common.h"
// FIXME backport fixes to dither_s and dither_m_c here
extern int opt_alt;
static float PI = acos(-1);
typedef struct {
short hue;
float saturation, value;
} hsv_t;
typedef struct {
size_t... |
progress.h | #pragma once
#include <iostream>
inline std::string center(std::string const &s, int n)
{
int l = s.length();
std::ostringstream o;
o << std::string((n - l) / 2, ' ') << s
<< std::string((n - (n - l)/2 - l), ' ');
return o.str();
}
class ProgressBar
{
size_t N, i, j;
std::string txt;
public:
ProgressBa... |
sum_array_in_parallel.c | // sum_array_in_parallel.c
// compile with: /openmp
/* #############################################################################
## DESCRIPTION: Vector sum in parallel with OpenMP.
## NAME: sum_array_in_parallel.c
## AUTHOR: Lucca Pessoa da Silva Matos
## DATE: 10.04.2020
## VERSION: 1.0
## EXEMPLE:
## PS C:\>... |
vector_batched.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)
***************************************... |
GB_unop__identity_fp32_int32.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... |
misc.c | /*******************************************************************************
Copyright (c) 2016 Advanced Micro Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of so... |
morn_list.c | /*
Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com>
Licensed under the Apache License, Version 2.0; 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 agreed to in wri... |
cmat.c | /*
* Cheap maxtrix library for C
*
* Copyright (C) 2019 Hiroshi Kuwagata <kgt9221@gmail.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "cmat.h"
#if defined(ENABLE_NEON) && (!defined(__ARM_NEON) && !defined(__ARM_NEON__))
#error "ARM NEON instruc... |
graph.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef GRAPH_H_
#define GRAPH_H_
#include <algorithm>
#include <cinttypes>
#include <cstddef>
#include <iostream>
#include <type_traits>
#include "pvector.h"
#include "util.h"
/*
GAP Benchmark Suite... |
reg_detect.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... |
choleskies_cython.c | /* Generated by Cython 0.22 */
#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_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#endif
#endif
#i... |
t_initialize.c | #include <stdlib.h> /* malloc */
#include <unistd.h> /* sysconf */
#include <gpt.h>
/*
** Array (1 per thread) of linked lists of timers, and last timer in each list
*/
struct node **timers = NULL;
struct node **last = NULL;
long ticks_per_sec;
/*
** Define lock arrays depending upon the type of threading done
... |
dgbtrs.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/compute/zgbtrs.c, normal z -> d, Fri Sep 28 17:38:04 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
primordial.c | /** @file primordial.c Documented primordial module.
*
* Julien Lesgourgues, 24.08.2010
*
* This module computes the primordial spectra. It can be used in different modes:
* simple parametric form, evolving inflaton perturbations, etc. So far only
* the mode corresponding to a simple analytic form in terms of amp... |
spikebinning.h | #include <pybind11/numpy.h>
#include <pybind11/stl.h>
#include <stdlib.h>
#include <stdint.h>
#include <queue>
#include <memory>
#include "MergeWrapper.h"
#include "NDArrayWrapper.h"
namespace py=pybind11;
template<class T>
using ContigNPArray = py::array_t<T, py::array::c_style | py::array::forcecast>;
int64_t b... |
task_wait2.c | /* input: result
* Based on A.13.4c, p182 of OMP 3.0 spec.
* Liao, 9/15/2008
*/
#include <stdio.h>
#include <assert.h>
unsigned long int input = 40;
unsigned long int fib(unsigned long int n) {
unsigned long int i, j;
if (n<2)
return n;
else
{
#pragma omp task shared(i)
i=fib(n-1);
#pragm... |
matrix.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__eq_fc64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
kpoint.c | /* kpoint.c */
/* Copyright (C) 2008 Atsushi Togo */
#include <stdio.h>
#include <stdlib.h>
#include "mathfunc.h"
#include "kpoint.h"
const int kpt_bz_search_space[KPT_NUM_BZ_SEARCH_SPACE][3] = {
{ 0, 0, 0},
{ 0, 0, 1},
{ 0, 0, 2},
{ 0, 0, -2},
{ 0, 0, -1},
{ 0, 1, 0},
{ 0, 1, 1},
{ 0, 1,... |
pcmemory.c | /*! \file
Copyright (c) 2003, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt
at the top-level director... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.