source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
ConverterOSG.h | /* -*-c++-*- IfcQuery www.ifcquery.com
*
MIT License
Copyright (c) 2017 Fabian Gerold
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 ... |
generator_spgemm_csc_bsparse.c | /******************************************************************************
** Copyright (c) 2015-2018, Intel Corporation **
** All rights reserved. **
** **
... |
GB_unop__bnot_uint32_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
rt_dasum.c | #include "runtime.h"
void RT_CORE_dasum(Quark *quark, Quark_Task_Flags *task_flags,
PLASMA_enum storev, PLASMA_enum uplo, int M, int N,
const double *A, int lda, int szeA,
double *work, int szeW)
{
plasma_context_t *plasma;
plasma = plasma_context_... |
schur_eliminator_impl.h | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2010, 2011, 2012 Google Inc. All rights reserved.
// http://code.google.com/p/ceres-solver/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
... |
cwa.h | #ifndef METHODS_MD_H
#define METHODS_MD_H
namespace method {
// use your method name to create a subspace for your
// implementation of details
namespace cwa {
namespace details {
template<typename Potential>
arma::mat force(const Potential & potential,
const arma::mat & positions) {
arma::mat resu... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
GB_unaryop__ainv_bool_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... |
pooling_3x3_pack4.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
residualbased_elimination_builder_and_solver_componentwise.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
#if !defined(KRATOS_RESIDUAL... |
GB_unop__sqrt_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
c_patchmatch.c | #include "stdlib.h" /* rand, malloc */
#include "string.h" /* memcpy */
#include "stdio.h" /* printf */
#include "time.h" /* time */
#include "math.h" /* fabs */
#include "omp.h"
#include "c_patchmatch.h"
#define print(a, args...) printf("%s(%s:%d) " a, __func__,__FILE__, __LINE__, ##args)
#define println(a, args...... |
omp2-1.c | #include<math.h>
#include<stdio.h>
int main() {
int i;
double v = 0.0;
#pragma omp parallel for firstprivate(v) lastprivate(v)
for (i = 0; i < 1000000000; i++) {
v += sqrt(i);
}
printf("%lf\n", v);
return 0;
}
|
convolution_1x1_pack4to8_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
pixel-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_3x3_pack1to4_int8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
dot_product.c | /*
* OpenMP implementation of dot product calculation. This program is used as the driving example in the
* Demos in the module Heterogeneous Programming with OpenMP
*
* @author Apan Qasem
*/
#include<stdio.h>
#include<stdlib.h>
#include<sys/time.h>
#include <omp.h>
#define REPS 100000
double t0;
double ... |
sub_omp.c | /*
This file is part of ParTI!.
ParTI! is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
ParTI! is distributed... |
allocation.c | #include <err.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
void init_data(int **data, int n);
void process_data(int *data, int n);
void check_data(int *data, int n, int num_threads, int count);
int main(int argc, char *argv[]) {
const int n = 1000000, nr_steps = 1000;
int num_threads = 1, step;
... |
mpi_file_io.c | /**
* Make sure tracing library traces all MPI File I/O calls in Threads.
*
* Author: Rainer Keller, HS Esslingen, 2020
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd... |
shape.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
dominik-AD.c | #include <stdio.h>
int main()
{
double x[10];
int i;
double *x_d;
double x1[10];
for (i = 0; i < 10; ++i) {
x[i] = 1;
x1[i] = 3;
}
x_d = x1;
printf("2nd arg x1 should be equal to 3rd %p %p %p \n",x, x1, x_d);
#pragma omp target enter data map(to:x)
#pragma omp target map(tofrom:x_d)
{
x_d = x;
printf("x... |
ZQ_OpticalFlow.h | #ifndef _ZQ_OPTICAL_FLOW_H_
#define _ZQ_OPTICAL_FLOW_H_
#pragma once
#include "ZQ_DoubleImage.h"
#include "ZQ_PoissonSolver.h"
#include "ZQ_ImageProcessing.h"
#include "ZQ_BinaryImageProcessing.h"
#include "ZQ_GaussianPyramid.h"
#include "ZQ_OpticalFlowOptions.h"
#include "ZQ_WeightedMedian.h"
#include <math.h>
#inclu... |
GB_binop__pow_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-... |
bert_layer_mb1_fixed_tokens.h | #ifndef BERT_LAYER_H_
#define BERT_LAYER_H_
#include <new>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <mkl.h>
#include <omp.h>
#include <iostream>
#include <immintrin.h>
#include "my_types.h"
//#include "timer.h"
class BertLayer
{
public... |
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... |
colormap.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Searching.202002101535.reorganization.h | //
// Created by Zhen Peng on 11/11/19.
//
#ifndef BATCH_SEARCHING_SEARCHING_H
#define BATCH_SEARCHING_SEARCHING_H
#include <vector>
#include <boost/dynamic_bitset.hpp>
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <immintrin.h>
#include <cstring>
#include <unordered_set>
#include <set>
//#... |
GB_dense_subassign_22_template.c | //------------------------------------------------------------------------------
// GB_dense_subassign_22_template: C += x where C is dense and x is a scalar
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
... |
integral_atomic.c | #include<stdio.h>
#include<omp.h>
#define NUM_THREADS 4
static long num_steps = 100000;
double step;
int main(){
int i, nthreads;
double pi = 0.0, init_time, finish_time;
step = 1.0 / (double)num_steps;
init_time = omp_get_wtime();
omp_set_num_threads(NUM_THREADS);
#pragma omp parallel
{
int i, id, nthrds;
... |
query.h | #ifndef HUBPPR_QUERY_H
#define HUBPPR_QUERY_H
#include "algo.h"
#include "graph.h"
#include "heap.h"
#include "config.h"
// #include "threadpool.hpp"
// #include "thread_pool.hpp"
static Avg avg_bwd;
static Avg avg_hub;
static Avg avg_fwd;
extern iMap<int> hub_used_samples;
extern vector<iMap<int>> mu... |
test-double-libmvec-sincos-main.c | /* Test for vector sincos ABI.
Copyright (C) 2016-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation... |
task-create.c | /*
* task-create.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
/... |
inter_fracture_triangle_utility.h | /*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix... |
utils.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 ... |
empty.c | /*
1. how to include header
2. parallel region
3. runtime routine
4. undeterminated execution order
5. control number of threads
By C. Liao
*/
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int main(void)
{
int i=0;
#pragma omp parallel
{
#ifdef _OPENMP
i=omp_get_thread_num();
#endif
printf(... |
GB_unop__identity_uint16_uint8.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... |
direct.c | /************************************************************/
/* This code is aimmed to calculate the energies of the ground and excied states of Gross-Pitaevskii equation */
/* Euqation is originated from the BEC many-body problems */
/* Using the standard imaginary time propagation method */
/* The origi... |
loss.h | #ifndef LOSS_H
#define LOSS_H
#include "data.h"
#define VECM Vector<typename M::value_type>
enum loss_t { SQUARE, LOGISTIC, HINGE, SQHINGE, SAFE_LOGISTIC, MULTI_LOGISTIC, PPA, INCORRECT_LOSS };
static bool is_loss_for_matrices(const loss_t& loss) {
return loss==SQUARE || loss==MULTI_LOGISTIC;
}
static bool is_... |
GB_binop__rminus_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... |
test1.c | int main () {
int x;
#pragma omp parallel
{
0;
if (1) {
2;
if (3) {
#pragma omp atomic write
x = 10;
4;
#pragma omp barrier
5;
} else {
6;
#pragma omp barrier
7;
}
8;
} else {
9;
if (10) {
11;
} else {
12;
}
13;
#pragma omp barrier
x;
14;
}
15;... |
GB_binop__bget_int32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
dds.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_extractTuples.c | //------------------------------------------------------------------------------
// GB_extractTuples: extract all the tuples from a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Ide... |
PeptideIndexing.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__le_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... |
index.h | #ifndef GBWTGRAPH_CONSTRUCTION_H
#define GBWTGRAPH_CONSTRUCTION_H
#include <cstdlib>
#include <omp.h>
#include <gbwtgraph/gbwtgraph.h>
#include <gbwtgraph/minimizer.h>
/*
index.h: Minimizer index construction from GBWTGraph.
*/
namespace gbwtgraph
{
//------------------------------------------------------------... |
cpd.c | /**
* @file cpd.c
* @brief Tensor factorization with the CPD model using AO-ADMM.
* @author Shaden Smith <shaden@cs.umn.edu>
* @version 2.0.0
* @date 2016-05-14
*/
/******************************************************************************
* INCLUDES
***********************************************************... |
test.c | #include <stdint.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include "omp.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int changeA(int a) {
return a + 1;
}
int find(int answer[5], int found) {
... |
gimple.h | /* Gimple IR definitions.
Copyright (C) 2007-2013 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundati... |
threading-query.c | #include <omp.h>
#include "mpi.h"
#include <stdio.h>
/* Help pretty-print some strings for the MPI_THREAD_* constants */
const char* mpi_thread_strings[4] = { "MPI_THEAD_SINGLE",
"MPI_THREAD_FUNNELED",
"MPI_THREAD_SERIALIZED",
... |
as400_des_fmt_plug.c | // AS/400 DES plugin for JtR
// This software is Copyright (c) 2016 Rob Schoemaker (@5up3rUs3r) and Bart Kulach (@bartholozz)
// 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.
//
// See http... |
7z_fmt_plug.c | /* 7-Zip cracker patch for JtR. Hacked together during June of 2013 by Dhiru
* Kholia <dhiru at openwall.com>. Unicode support and other fixes by magnum.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>
* and Copyright (c) 2013 magnum, and it is hereby released to the general
* public u... |
GB_binop__lxor_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
omp_counters.h | /*
* Copyright (c) 2020, Arm Limited and Contributors.
*
* SPDX-License-Identifier: Apache-2.0
*
* 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/... |
GB_unaryop__ainv_uint32_int32.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_select_phase2.c | //------------------------------------------------------------------------------
// GB_select_phase2: C=select(A,thunk)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0... |
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 "mxnet/ndarray.h"
namespace mxnet {
namespace kvstore {
/**
* \brief multiple device commmunication
*/
class ... |
GrB_Vector_size.c | //------------------------------------------------------------------------------
// GrB_Vector_size: dimension of a sparse vector
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: ... |
Calculate_HFs.c | #include "num_of_threads.h"
#include<omp.h>
#include"utils.h"
#include"structs.h"
#include"matrix_ops.h"
void Calculate_HFs(int *tlist,double *vlist,int nfac,int nvert,double *angles,HFstruct *HFs,double *offset,double *D,int dm,int dn,double *Weight,int Nfft,double A,double Gamma,double *scale,double *FT,double *FTd... |
keepass_fmt_plug.c | /* KeePass cracker patch for JtR. Hacked together during May of
* 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* Support for cracking KeePass databases, which use key file(s), was added by
* m3g9tr0n (Spiros Fraganastasis) and Dhiru Kholia in September of 2014.
*
* Support for all types of keyfile within K... |
sparseBlas.h | //==============================================================================
//
// Copyright 2018 The InsideLoop 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 Lic... |
sections-2.c | /* { dg-do compile } */
extern void bar(int);
void foo(void)
{
#pragma omp sections
bar (0); // { dg-error "expected" }
#pragma omp sections
{
} // { dg-error "expected" }
#pragma omp sections
{
bar (1);
}
#pragma omp sections
{
#pragma omp section
bar(2);
ba... |
master_taskloop_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 -triple x86_64-unknown-unknown %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify=expected,omp50 -triple x86_64-unknown-unknown %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -v... |
t_factorize_cpu_parallel.c | /* ========================================================================== */
/* === GPU/t_factorize_cpu_parallel ========================================= */
/* ========================================================================== */
/* -------------------------------------------------------------------------... |
n_partition.c | #include <stdlib.h>
#include <assert.h>
#include "n_partition.h"
#include "threads.h"
// calculates the number of partions of a given natural number
//
// let n be the number we want to count partitions for.
//
// let M = (1 + x + x^2 + ...) * (1 + (x^2) + (x^2)^2 + ...) * ... * (1 + (x^n) + (x^n)^2 + ...)
//
// We c... |
reduction_max.c | #include <stdio.h>
#include <omp.h>
int main()
{
int result = 0;
#pragma omp parallel reduction(max:result)
{
result = omp_get_thread_num();
}
printf("Result: %d\n", result);
}
|
omp4.c | // RUN: mlir-clang %s --function=* -fopenmp -S | FileCheck %s
int get(int);
void square(double* x, int ss) {
int i=7;
#pragma omp parallel for private(i)
for(i=get(ss); i < 10; i+= 2) {
x[i] = i;
i++;
x[i] = i;
}
}
// CHECK: func @square(%arg0: memref<?xf64>, %arg1: i32)
// C... |
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... |
ft_ao.c | /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required ... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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
//
//===---------------------------... |
saxpy-omp1.c | /**
* @file saxpy.c
*
* @brief saxpy performs the \c axpy computation in single-precision on both
* host and accelerator. The performance (in MFLOPS) on host and accelerator is
* compared and the numerical results are also verified for consistency.
*
* The \c axpy computation is defined as:
*
* y := a * x + y
... |
main.c | #include <stdio.h>
#include<omp.h>
#include<math.h>
#include <stdlib.h>
int main()
{
// Define the domain
double x_len = 2.0;
double y_len = 2.0;
int x_points = 201;
int y_points = 201;
double del_x = x_len/(x_points-1);
double del_y = y_len/(y_points-1);
double x[x_poin... |
example-omp.c | // PWR005: Disable default OpenMP scoping
// https://www.appentra.com/knowledge/checks/pwr005
void example(int* result, unsigned size) {
// Default data scoping is used which may not be correct
#pragma omp parallel for
for (int i = 0; i < size; i++) {
result[i] = i;
}
}
|
dmml.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @file src/backends/mpi/blrm/dmml.c
* @version 0.3.0
* @autho... |
BFEgg_fmt_plug.c | /*
* This file is part of Eggdrop blowfish patch for John The Ripper.
* Copyright (c) 2002 by Sun-Zero <sun-zero at freemail.hu>
* This is a free software distributable under terms of the GNU GPL.
*
* This format has collisions for repeated patterns (eg. "1" vs. "11",
* or "hey" vs. "heyheyheyhey") - you can run ... |
transpose.c | /*
Copyright (c) 2013, Intel Corporation
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 copyright
notice, this list of conditions and the following disclaimer... |
IJMatrix_parcsr.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)
**************************************... |
jacobikernel-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... |
broadcast_reduce-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 ... |
integrate.c | /*
* integrate.c: Example of numerical integration in OpenMP.
*
* (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com>
*/
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
const double PI = 3.14159265358979323846;
const double a = -4.0;
const double b = 4.0;
const int nsteps = 40000000;
doub... |
PeptideIndexing.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
convolutiondepthwise_5x5_pack4.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 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 ... |
target-19.c | extern void abort (void);
__attribute__((noinline, noclone)) void
foo (int *p, int *q, int *r, int n, int m)
{
int i, err, *s = r;
int sep = 1;
#pragma omp target map(to:sep)
sep = 0;
#pragma omp target data map(to:p[0:8])
{
/* For zero length array sections, p points to the start of
already map... |
GB_unaryop__minv_uint16_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
edge_dali.h | #include <cmath>
double edge_dali_ae(double **row_mat, double **col_mat, int i, int k, int j, int l);
double ****edge_dalix(double **row_mat, double **col_mat, int nb_row, int nb_col) {
double ****align_edge = new double ***[nb_row];
#pragma omp parallel for schedule(dynamic)
for (int row1 = 0; row1 < nb_row;... |
MiniBow.h | /**
* Original File: TemplatedVocabulary.h
* Original Author: Dorian Galvez-Lopez
*
* Modified by: Darius Rückert
* Modifications:
* - Moved everything into this single header file
* - Removed support for non-ORB feature descriptors
* - Optimized loading, saving, matching
* - Removed dependency to opencv
... |
mg.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB MG code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
PDEPar.c | /*Universidad del Valle de Guatemala
Computacion Paralela y Distribuida
Jennifer Sandoval 18962
Luis Quezada 18028
Esteban del Valle 18221
Proyecto 1
Programa paralelo
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <omp.h>
// Compilación y ejecución:
//... |
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... |
munit.c | /* Copyright (c) 2013-2017 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... |
mscash2_fmt_plug.c | /* MSCASH2 patch for John the Ripper written by S3nf in 2010, 2011
* a slow but working version
*
* Cracking Domain Cached Credentials for modern Windows operating systems, supporting:
* - Windows Vista
* - Windows 7
* - Windows Server 2008
*
* This software was written by S3nf in 2010, 2011. No cop... |
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_binop__ge_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
kernel_prng.h | //////////////////////////////////////////////////////////////////////////////////
// //
// trueke //
// A multi-GPU implementation of the exchange Monte Carlo method. ... |
lotus85_fmt_plug.c | /*
* This software is Copyright (c) 2013 Sébastien Kaczmarek <skaczmarek@quarkslab.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 permitted.
*
* Fixed the format to crack multiple hashes + ... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
cg.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - CG
This benchmark is an OpenMP C version of the NPB CG code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
04_loop_decompose_broken.c | //IMPORTANT NOTE! THIS CODE DOESN'T WORK PROPERLY
#include <stdio.h>
#include <omp.h>
#define MAX_ITS 10000
int main()
{
int nproc, i, sum, thread_id;
nproc = omp_get_max_threads();
int its_per_proc[nproc];
for (i = 0; i< nproc; ++i){
its_per_proc[i] = 0;
}
#pragma omp parallel for
for (i = 0; i< MA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.