source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
part2.c | #include <stdio.h>
#include <omp.h>
#define NUMSTEPS 10
#define NUM_THREADS 2
int main (int argc, const char * argv[])
{
static long num_steps = 10000000000;
int i, nthreads;
double pi;
double step;
double x;
double sum = 0.0;
step =(1.0/ (double) num_steps);
/******************** SERIE... |
optimizer.h | #pragma once
#include <cmath>
#include "ps/server/param.h"
namespace ps {
template <typename V>
class Param;
template <typename V>
class Param2D;
template <typename V>
class CacheTable;
enum OptType {
SGD,
Momentum,
NesterovMomentum,
AdaGrad,
Adam,
None,
};
template <typename V>
class Optim... |
hw2b_time(static).c | #ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#define PNG_NO_SETJMP
#include <sched.h>
#include <assert.h>
#include <png.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <mpi.h>
#include <pthread.h>
void write_png(const char* filename, int iters, int width, int height, const int... |
constructs.c | // Load the OpenMP functions library
#include<omp.h>
int main()
{
// Set variables
int num_threads=0, tnum=0, i=0, total=0;
// Create parallel block
//#pragma omp parallel
// {
//Create a section block
//#pragma omp sections private(tnum, i) nowait
// {
// Ask an available thread to... |
GB_binop__bxor_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
DenseMatrix.h | //=================================================================================================
/*!
// \file blaze/math/smp/openmp/DenseMatrix.h
// \brief Header file for the OpenMP-based dense matrix SMP implementation
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This file is part of th... |
ocp_nlp_sqp.c | /*
* Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
* Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
* Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
* Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
*
* This file is part o... |
GB_AxB_dot3_template.c | //------------------------------------------------------------------------------
// GB_AxB_dot3_template: C<M>=A'*B via dot products
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com... |
GB_binop__ge_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... |
Concat.h | #ifndef CONCAT
#define CONCAT
/*
* Concat.h:
* concatenatation operation.
*
* Created on: Apr 22, 2017
* Author: mszhang
*/
#include "MyLib.h"
#include "Node.h"
#include "Graph.h"
#if USE_GPU
#include "n3ldg_cuda.h"
#endif
#include "profiler.h"
class ConcatNode : public Node {
public:
vector<int> inDims... |
GB_unop__erfc_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
pentagon_cmap.h | // This is the c-map implementation for pentagon
#pragma omp parallel for schedule(dynamic,1) reduction(+:counter)
for (vidType v0 = 0; v0 < g.V(); v0++) {
auto tid = omp_get_thread_num();
auto &cmap = cmaps[tid];
for (auto v1 : g.N(v0)) {
for (auto u : g.N(v1)) {
if (u >= v0) break;
cmap[u] = 1;
... |
openmp_wrapper.h | /*!
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_OPENMP_WRAPPER_H_
#define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP
#include <exception>
#include <memory>
#include <mutex>
#includ... |
GB_binop__first_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
matrix_op-inl.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
phylokernelmixture.h | /*
* phylokernelmixture.h
*
* Created on: Dec 19, 2014
* Author: minh
*/
#ifndef PHYLOKERNELMIXTURE_H_
#define PHYLOKERNELMIXTURE_H_
#include "model/modelmixture.h"
/************************************************************************************************
*
* Highly-optimized vectorized likeliho... |
GB_subassign_02.c | //------------------------------------------------------------------------------
// GB_subassign_02: C(I,J) = A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com See Grap... |
DynamicMatrixSpecialization.h | #pragma once
//include cstring for memcpy
#include <cstring>
#include <core.math/core.math.h>
#include <core.math/matrix.dslib/DynamicMatrix.h>
NS_BEGIN(CORE_MATH_NAMESPACE)
template<typename T> SpecializeMatrixDynamicSizeColumns(::core::math::matrix::dslib::DynamicMatrix<T>);
template<typename T> SpecializeMatrixDyn... |
60.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... |
blockchain_fmt_plug.c | /* blockchain "My Wallet" cracker patch for JtR. Hacked together during June of
* 2013 by Dhiru Kholia <dhiru at openwall.com>.
*
* See https://blockchain.info/wallet/wallet-format
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>,
* and it is hereby released to the general public under... |
collapse_2.c | #include<stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int a[11][11];
int main(void)
{
int i, j;
int m = 10;
int n = 10;
for(i = 0; i < 11; i ++)
{
for(j = 0; j < 11; j ++)
{
a[i][j] = 0;
}
}
#pragma omp target map(in: m, n) map(inout:a[0:11][0:11])
#pragma omp parallel for co... |
sp_vector.h | #ifndef SP_VECTOR_H
#define SP_VECTOR_H
#include <fstream>
#ifdef WINDOWS
#include <string>
#else
#include <cstring>
#endif
#include "../declare_structures.h"
/// Sparse vector class
template <typename floating_type, typename I> class SpVector {
friend class Matrix<floating_type>;
friend class SpMatrix<floati... |
tree.h | #ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/meta.h>
#include <LightGBM/dataset.h>
#include <string>
#include <vector>
#include <memory>
namespace LightGBM {
#define kMaxTreeOutput (100)
/*!
* \brief Tree model
*/
class Tree {
public:
/*!
* \brief Constructor
* \param max_leaves The n... |
omp-hello-world.c |
/*****************************************************************************
Example : omp-hello-world.c
Objective : OpenMP program to print "Hello World"
This example demonstrates the use of
omp_get_thread_num()
omp_... |
comm.h | /**
* Copyright (c) 2015 by Contributors
*/
#ifndef MXNET_KVSTORE_COMM_H_
#define MXNET_KVSTORE_COMM_H_
#include <string>
#include <algorithm>
#include <utility>
#include <limits>
#include <vector>
#include <tuple>
#include "mxnet/ndarray.h"
namespace mxnet {
namespace kvstore {
/**
* \brief multiple device commmuni... |
convolution_4x4.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// 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 ... |
ccode_base.h |
void base_3motif(Graph &g, std::vector<std::vector<uint64_t>> &global_counters,
std::vector<std::vector<uint8_t>> &ccodes) {
#pragma omp parallel for schedule(dynamic,1)
for (vidType v0 = 0; v0 < g.V(); v0++) {
auto tid = omp_get_thread_num();
auto &counter = global_counters.at(tid);
... |
target_enter_data_map_messages.c | // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 10... |
simd_utils_avx512_int32.h | /*
* Project : SIMD_Utils
* Version : 0.2.2
* Author : JishinMaster
* Licence : BSD-2
*/
#pragma once
#include <stdint.h>
#include "immintrin.h"
static inline void add512s(int32_t *src1, int32_t *src2, int32_t *dst, int len)
{
int stop_len = len / AVX512_LEN_INT32;
stop_len *= AVX512_LEN_INT32;
if ... |
GB_unop__bnot_int8_int8.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... |
parallelFor.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int sumaglobal=0;
int main(int argc, char *argv[]){
int numeroDeHilos=strtol(argv[1],NULL,10);
long a[20],b[20];
long resultado=0;
int j;
for(j=0;j<20;j++){
a[j]=j*j;
b[j]=j;
}
int i;
#pragma omp parallel for num_threads(numeroDeHilos) \
reduction(+... |
tetrahedron.c | #include "spglib.h"
#include "tetrahedron_method.h"
#include <stdio.h>
#include <stdlib.h>
static void test_tetrahedron_method(void);
static void mat_copy_matrix_d3(double a[3][3], double b[3][3]);
static double mat_get_determinant_d3(double a[3][3]);
static int mat_inverse_matrix_d3(double m[3][3],
double a[3][3... |
9_matrix_row_and_col_sum.c | /*
Program : 9
Author : Soumili
Topic : Write a C program using OpenMP features to find the row wise/column
wise sum of a matrix in linear time complexity.
*/
#include<stdio.h>
#include<omp.h>
int main()
{
int i,j,k,m,sum,sum1;
int A[3][3]={1,2,3,
4,5,6,
7,... |
GB_unop__identity_fp32_bool.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
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... |
mpm_boundary_rotation_utility.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ \.
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Bodhinanda Chandra
//
#ifndef KRATOS_MPM_BOUND... |
GB_unop__identity_fp32_fp64.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... |
zbjac2.c | #include "zbjac2.h"
#include "dzjac2.h"
#ifdef Z8JAC2_PARAMS
#error Z8JAC2_PARAMS already defined
#else /* !Z8JAC2_PARAMS */
#define Z8JAC2_PARAMS \
DZJAC2_PARAMS; \
register const VD huge = _mm512_set1_pd(DBL_MAX); \
register const VD be... |
matrix_op-inl.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
reduction.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char * argv[])
{
float x=0;
#pragma omp parallel for reduction(+:x)
for(int i=0;i<100;i++)
{
x += i;
}
printf("%e\n", x);
}
|
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
//
//===---------------------------... |
hypre_prefix_sum.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)
**************************************... |
3mm.c | /**
* 3mm.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students.ic.... |
gemm_winograd.h | /*******************************************************************************
* Copyright (c) Malith Jayaweera - All rights reserved. *
* This file is part of the MARLIN library. *
* ... |
a.5.1.c | /* { dg-do run } */
#include <omp.h>
int
main ()
{
omp_set_dynamic (1);
#pragma omp parallel num_threads(10)
{
/* do work here */
}
return 0;
}
|
GB_unop__identity_int64_uint32.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... |
GB_binop__min_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-... |
sapB_fmt_plug.c | /*
* this is a SAP-BCODE plugin for john the ripper.
* tested on linux/x86 only, rest is up to you.. at least, someone did the reversing :-)
*
* please note: this code is in a "works for me"-state, feel free to modify/speed up/clean/whatever it...
*
* (c) x7d8 sap loverz, public domain, btw
* cheers: see test-ca... |
ZQ_CNN_MTCNN.h | #ifndef _ZQ_CNN_MTCNN_H_
#define _ZQ_CNN_MTCNN_H_
#pragma once
#include "ZQ_CNN_Net.h"
#include "ZQ_CNN_BBoxUtils.h"
#include <omp.h>
namespace ZQ
{
class ZQ_CNN_MTCNN
{
public:
using string = std::string;
ZQ_CNN_MTCNN()
{
min_size = 60;
thresh[0] = 0.6;
thresh[1] = 0.7;
thresh[2] = 0.7;
nms_thr... |
GB_AxB_dot3_phase1_template.c | //------------------------------------------------------------------------------
// GB_AxB_dot3_phase1_template: analysis phase for dot3 (C<M> = A'*B)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
task_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fopenmp-version=50 -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c -triple x86_64-apple-darwin10 -include-p... |
test.c |
#include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (1024*3)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
int main(void) {
check_offloa... |
fc3.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* This file is part of phonopy. */
/* 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 abo... |
ompreduce.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
const int n = 1024;
double* array = (double*) malloc(sizeof(double) * n);
int i = 0;
for(i = 0; i < n; ++i) {
array[i] = i;
}
printf("Performing an OpenMP reduction...\n");
double total = 0;
#pragma omp parallel for reduction(+:tot... |
voxelize.h | #pragma once
#include "radix_grouper.h"
#include "grid_meta.h"
#include <opencv2/opencv.hpp>
#include <vector>
template <typename TValueVec, unsigned int TNumDimensions, typename TCellIndex>
int averageGridCells(
RadixGrouper<TCellIndex, cv::Vec<uint,4>> radixGrouper,
const std::vector<TValueVec>& points,
... |
FreeEquilibriumsGreensFunction.h | /***************************************************************************
* Copyright (C) 2009 - 2013 by Florian Goth *
* fgoth@wthp095 *
* *
* All rights reserved. *
* ... |
GB_binop__ne_uint8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
streamTriad.c | /*
* =======================================================================================
*
* Author: Jan Eitzinger (je), jan.eitzinger@fau.de
* Copyright (c) 2019 RRZE, University Erlangen-Nuremberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of th... |
kpoint.c | /* Copyright (C) 2008 Atsushi Togo */
/* All rights reserved. */
/* This file is part of spglib. */
/* 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 abov... |
convolution_3x3_pack8to4_int8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
serial_tree_learner.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_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <LightGBM/dataset.h>
#include <Ligh... |
jacobi-ompacc-opt1.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,(struct timezone*)NULL);
time = t.tv_sec + 1.0e-6*t.tv_usec;
return time;
}
double time1, time2;
void driver(void);
vo... |
omp_smithW-v3-master-ompfor.c | /*********************************************************************************
* Smith–Waterman algorithm
* Purpose: Local alignment of nucleotide or protein sequences
* Authors: Daniel Holanda, Hanoch Griner, Taynara Pinheiro
*
* Compilation: gcc omp_smithW.c -o omp_smithW -fopenmp -DDEBUG // debuggin... |
DRB062-matrixvector2-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... |
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
//
//===---------------------------... |
GB_unop__identity_uint64_uint8.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... |
omp_saxp.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define dt(start, end) ((end.tv_sec - start.tv_sec) + \
1 / 1000000.0 * (end.tv_usec - start.tv_usec))
int main()
{
int i, j, k;
int nra = 150, nca = 200, ncb = 100;
double a[nra][nca], b[nca][ncb], c[nra][ncb];
struct timeval ica... |
ten_tusscher_2004_epi_S1_15.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S1_15.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... |
test_bls.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 may not use ... |
cancel.c | // RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
//omp_set_cancellation(1);
#pragma omp taskgroup
{
int x = 0;
int i;
for(i = 0; i < 2; i++)
{
#pragma omp task shared(x)
... |
conv_dw_kernel_fp16_arm82.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... |
problem.p4.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
GB_binop__ge_uint8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
diagmm_x_csc_n_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSC *mat, const ALPHA_Number *x, const ALPHA_INT c... |
PmlPstd.h | #pragma once
#include "Grid.h"
#include "FieldSolver.h"
#include "PmlSpectralTimeStraggered.h"
#include "Constants.h"
namespace pfc {
class PmlPstd : public PmlSpectralTimeStraggered<GridTypes::PSTDGridType>
{
public:
PmlPstd(SpectralFieldSolver<GridTypes::PSTDGridType>* solver, Int3 sizePML) :
... |
Utilities.h | //
// Utilities.h
// Gauss
//
// Created by David Levin on 1/31/17.
//
//
#ifndef Utilities_h
#define Utilities_h
#ifdef GAUSS_OPENMP
#include <omp.h>
#endif
#include "State.h"
//Eigen Stuff
#include <Eigen/Dense>
#include <Eigen/Sparse>
#define STRINGIFY(s) #s
#define DataDir(s) STRINGIFY(s)
#define Vert(f,... |
render.h | /*
Copyright (c) 2014 hole
This software is released under the MIT License (http://kagamin.net/hole/license.txt).
A part of this software is based on smallpt (http://www.kevinbeason.com/smallpt/) and
released under the MIT License (http://kagamin.net/hole/smallpt-license.txt).
*/
#ifndef _RENDER_H_
#define _RENDER_H_
... |
Proj4.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grb2.h"
#include "wgrib2.h"
#include "fnlist.h"
/* proj4.c interface routines to the Proj.4 library
6/2012 Public Domain Dusan Jovic
8/2014 Public Domain Wesley Ebisuzaki
latlon
lambert conformal
ncep rotated latlon B grid
10/2015 l... |
colorspace.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
DRB010-lastprivatemissing-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
GB_binop__pair_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... |
mandel-omp-taskloop-v2.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.
... |
3d7pt.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
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
declare_variant_ast_print.c | // RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - | FileCheck %s
// expected-no-diagnostics
int foo(void);
#pragma omp declare variant(foo) match(xxx={}, yyy={ccc})
#pragma omp declare variant(foo) match(xxx=... |
boxloop_cuda.h | /******************************************************************************
* 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__ge_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
diagsm_x_coo_u_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT num_thread = alpha_get_thr... |
cp-tree.h | /* Definitions for C++ parsing and type checking.
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
GCC is free software... |
pimonte_VSL_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
//VSL Variables
#include "mkl_vsl.h"
#define BRNG VSL_BRNG_MCG31
#define METHOD 0
#define BLOCK_SIZE 500
int main(){
unsigned int iter=200000000;
int i,j;
double x, y;
double dUnderCurve=0.0;
double pi=0.0;
VSLStreamStatePtr stream; //You n... |
dsacstar_util_rgbd.h | /*
Copyright (c) 2018-2020, Heidelberg University
This code fragment contains adapted sources from PyTorch. See license agreement of PyTorch below.
From PyTorch:
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
Copyright (c) 2011-2014 ... |
GB_unop__acosh_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... |
helper.h | #pragma once
#ifndef BRONKERBOSCHHELPER_H
#define BRONKERBOSCHHELPER_H
#include <string>
#include <set>
#include <vector>
#include <sys/sysinfo.h>
#include <iostream>
#include <fstream>
#include <math.h>
unsigned long BK_CLIQUE_COUNTER;
namespace BkHelper
{
template <typename Set>
void printSet(std::string setNam... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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_update.1.c | /*
* @@name: target_update.1c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@expect: success
* @@version: omp_4.0
*/
extern void init(float *, float *, int);
extern void init_again(float *, float *, int);
extern void output(float *, int);
void vec_mult(float *p, float *v1, float *v2, int N)
{
... |
pr60823-1.c | /* PR tree-optimization/60823 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp-simd" } */
#pragma omp declare simd simdlen(4) notinbranch
int
foo (const double c1, const double c2)
{
double z1 = c1, z2 = c2;
int res = 100, i;
for (i = 0; i < 100; i++)
{
res = (z1 * z1 + z2 * z2 > 4.0) ? (i < r... |
communication.h | /*! @brief Flag for checking if this header has already been included. */
#ifndef YGGCOMMUNICATION_H_
#define YGGCOMMUNICATION_H_
#include "../tools.h"
#include "../datatypes/datatypes.h"
#include "CommBase.h"
#include "IPCComm.h"
#include "ZMQComm.h"
#include "ServerComm.h"
#include "ClientComm.h"
#include "AsciiFile... |
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__le_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-... |
trmv_x_dia_n_lo_trans.c | #include "alphasparse/kernel.h"
#include "alphasparse/opt.h"
#include "alphasparse/util.h"
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_DIA* A,
const ALPHA_Number* x,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.