source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
blur-effect-openmp.c | #include <stdlib.h>
#include <stdio.h>
#include <cv.h>
#include <omp.h>
#include <opencv2/highgui/highgui.hpp>
#define NUM_THREADS 4
using namespace cv;
int main (int argc, char *argv[]) {
//Vaiables
IplImage* img = 0;
int height,width,step,channels,kernel,hilos;
uchar *data;
double delta,start = omp_get_wtim... |
ten_tusscher_2004_epi_S2_15.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_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... |
convolution_sgemm_pack4to8_fp16s.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 ... |
task_memory.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
#define USE_PRIVATE_TOOL 1
#include "callback.h"
#include <omp.h>
int main() {
int x;
#pragma omp parallel num_threads(2)
{
#pragma omp master
{
#pragma omp task
{ x++; }
#pragma omp task firstpriv... |
core_cgessq.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/core_blas/core_zgessq.c, normal z -> c, Fri Sep 28 17:38:20 2018
*
**/
#include <math.h>
#include <plasma_core_bl... |
comm.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
VGG-16_CPU_cifar.c | /*
Pretrained VGG-16 Convolutional Neural Network in C language and OpenMP API
GitHUB Page: https://github.com/jcanore/vgg16
Author: ZFTurbo/jocare
Compilation: gcc -O3 VGG-16_CPU_cifar.c -lm -fopenmp -o VGG-16_CPU_cifar
Usage: VGG-16_CPU_cifar <weights_path> <file_with_list_of_images> <output file> <output convo... |
coarsen_grid_mex.c | #include <inttypes.h>
#include <omp.h>
#include "mex.h"
#include "coarsen_grid_mex.h"
void coarsen_grid(uint8_t *G2,
const uint8_t *G, const size_t *sz2, const size_t *sz);
#ifdef COARSEN_GRID_MEX
void
mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if ((nrhs != 2) ||... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ordering_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 ... |
integrator.h | #ifndef INTEGRATOR_H
#define INTEGRATOR_H
#include <omp.h>
#include <memory>
#include "camera.h"
#include "film.h"
#include "sampler.h"
#include "timer.h"
#include "util.h"
class Integrator {
public:
std::shared_ptr<Camera> cam;
std::shared_ptr<Sampler> sampler;
Integrator(std::shared_ptr<C... |
kfold.h | //
// Created by Xinyu Zhang on 4/6/21.
//
// TODO: omp_set_num_threads()
#ifndef COSAN_KFOLD_H
#define COSAN_KFOLD_H
#include <cosan/selection/selection.h>
namespace Cosan {
/**
* https://en.wikipedia.org/wiki/Cross-validation_(statistics)
*/
class KFold : public Splitter {
public:
KFold(... |
driver1.c | #include "driver.h"
#include "kernel1.h"
double getTime()
{
double time;
#ifdef ERT_OPENMP
time = omp_get_wtime();
#elif ERT_MPI
time = MPI_Wtime();
#else
struct timeval tm;
gettimeofday(&tm, NULL);
time = tm.tv_sec + (tm.tv_usec / 1000000.0);
#endif
return time;
}
int main(int argc, char *argv[]) {
#... |
GB_unaryop__ainv_uint16_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
color_bruteforcer.c | #include <ctype.h> // isalnum
#include <math.h> // round
#include <omp.h> // omp pragmas
#include <string.h> // memcpy, memset, strlen
#include <stdio.h> // printf, sprintf
#include <stddef.h> // NULL
#include <stdlib.h> // free, malloc, realloc, strtol
#include "color_bruteforcer.h"
const int OFFSET = 0xff;
bool ver... |
GB_unop__identity_uint16_fc32.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... |
coordinator.c | /*
This source file is part of real2GAME, which is released under the MIT license.
Github repository: https://github.com/OpenNWP/real2GAME
*/
/*
This file prepares the horizontal interpolation from the foreign model to GAME.
*/
#include <netcdf.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <g... |
evolve_shared_collisions.c | /*
* Reference integrators with single, global shared time step.
*/
#include <tgmath.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "evolve.h"
#include "integrators_shared.h"
// AMUSE STOPPING CONDITIONS SUPPORT
#include <stopcond.h>
static void set_dt_levels(DOUBLE *dt_le... |
VariableSubSampler.h | /**
* @file
* This file is part of SeisSol.
*
* @author Sebastian Rettenberger (sebastian.rettenberger AT tum.de, http://www5.in.tum.de/wiki/index.php/Sebastian_Rettenberger)
*
* @section LICENSE
* Copyright (c) 2015, SeisSol Group
* All rights reserved.
*
* Redistribution and use in source and binary forms, ... |
GB_binop__lt_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... |
3.norace2.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N][N];
#pragma omp parallel for
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
for (int k = 1; k < N; k++)
A[i][j][k] = A[i][j - 1][k];
}
// CHECK: Region is Data Race Free.
//... |
body.c | /* { dg-do compile } */
/* { dg-options "-fcilkplus -fopenmp" } */
/* { dg-require-effective-target fopenmp } */
int *a, *b, c;
void *jmpbuf[10];
void foo()
{
int j;
#pragma simd
for (int i=0; i < 1000; ++i)
{
if (c == 6)
__builtin_setjmp (jmpbuf); /* { dg-error "setjmp" } */
a[i] = b[i];
}
... |
6862.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... |
diagsm_x_csr_u_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#include <memory.h>
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT num_th... |
common.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_UTILS_COMMON_FUN_H_
#define LIGHTGBM_UTILS_COMMON_FUN_H_
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>... |
segment.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_nvec_nonempty.c | //------------------------------------------------------------------------------
// GB_nvec_nonempty: count the number of non-empty vectors
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Id... |
declare_mapper_messages.c | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
int temp; // expected-note {{'temp' declared here}}
struct vec { // expected-note {{definition of 'struct vec' is not complete until the cl... |
DRB114-if-orig-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__land_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
GB_binop__lt_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... |
collapse-1.c | /* { dg-do run } */
#include <string.h>
#include <stdlib.h>
int
main (void)
{
int i, j, k, l = 0;
int a[3][3][3];
memset (a, '\0', sizeof (a));
#pragma omp parallel for collapse(4 - 1) schedule(static, 4)
for (i = 0; i < 2; i++)
for (j = 0; j < 2; j++)
for (k = 0; k < 2; k++)
a[i][j][k] = i + j... |
GB_unop__identity_uint64_int16.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... |
requires-3.c | #pragma omp requires atomic_default_mem_order(acquire) /* { dg-error "expected 'seq_cst', 'relaxed' or 'acq_rel'" } */
#pragma omp requires atomic_default_mem_order(release) /* { dg-error "expected 'seq_cst', 'relaxed' or 'acq_rel'" } */
#pragma omp requires atomic_default_mem_order(foobar) /* { dg-error "expected 'seq... |
dataset.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_DATASET_H_
#define LIGHTGBM_DATASET_H_
#include <LightGBM/config.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/meta.h>
... |
GB_unaryop__abs_int8_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
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... |
convert.c | /*
This file is part of HiParTI!.
HiParTI! 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.
HiParTI! is distr... |
kernel_bucketprefix.h | #pragma omp target teams distribute parallel for num_teams(globalpre/localpre) thread_limit(localpre)
for (int tid = 0; tid < DIVISIONS; tid++) {
int sum = 0;
for (int i = tid; i < size; i += DIVISIONS) {
int x = d_prefixoffsets[i];
d_prefixoffsets[i] = sum;
sum += x;
}
h_offsets[tid] = sum;
}
|
two_step_v_p_strategy.h | //
// Project Name: KratosPFEMFluidDynamicsApplication $
// Last modified by: $Author: AFranci $
// Date: $Date: January 2016 $
// Revision: $Revision: 0.0 $
//
//
#ifndef KRATOS_TWO_STEP_V_P_STRATEGY_H
#define KRATOS_TWO_... |
test.c | #include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int a = 1;
int b = 2;
#pragma omp parallel
#pragma omp single
{
#pragma omp target enter data nowait map(to: a) depend(out: a)
#pragma omp task depend(inout: a) shared(b)
{ b++; }
#pragma omp target exit data nowait ma... |
bellmanFord.c | // -----------------------------------------------------------------------------
//
// "00_AccelGraph"
//
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2019 All rights reserved
// -----------------------------------------------------------------------------
... |
primitives.h | #pragma once
#include <vector>
#include <cstdint>
#include <omp.h>
#include "local_buffer.h"
using namespace std;
#define CACHE_LINE_ENTRY (16)
#define LOCAL_BUDGET (8*1024*1024)
template<typename T>
void MemSetOMP(T *arr, int val, size_t size) {
size_t tid = omp_get_thread_num();
size_t max_omp_threads =... |
spmv_float.c | ////Example of sparse matrix-vector multiply, using CSR (compressed sparse row format).
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Add timing support
#include <sys/timeb.h>
#define REAL float
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millit... |
Fig_6.10_6.11_mandelbrotSolution.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
# define NPOINTS 1000
# define MXITR 1000
struct d_complex {
double r; double i;
};
void testpoint(struct d_complex);
struct d_complex c;
int numoutside = 0;
int main ()
{
int i, j;
double area, error, eps = 1.0e-5;
#pragma o... |
CALPHADFreeEnergyFunctionsBinary.h | #ifndef included_CALPHADFreeEnergyFunctionsBinary
#define included_CALPHADFreeEnergyFunctionsBinary
#include "CALPHADSpeciesPhaseGibbsEnergy.h"
#include "InterpolationType.h"
#include "Phases.h"
#include "datatypes.h"
#include "functions.h"
#include <boost/property_tree/ptree.hpp>
#include <cassert>
#include <fstrea... |
GB_binop__pair_bool.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
primitives_inl.h | /*
* nvbio
* Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice,... |
GB_binop__first_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
ast-dump-openmp-target-teams.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() {
#pragma omp target teams
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp... |
SpatialSubSampling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialSubSampling.c"
#else
static int nn_(SpatialSubSampling_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_(Tensor_id));
int kW = luaT_getfieldcheckint(L, 1, "kW");
int kH = luaT_getfieldcheckint(L, 1, "kH");
int dW = luaT_... |
declare1.c | /* Example of the declare simd directive
The function my_func() is called from within a simd construct.
The declare simd directive declares that the compiler should
generate a SIMD version of the function.
*/
#pragma omp declare simd
double my_func(double b, double c)
{
double r;
r = b + c;
r... |
GB_unop__identity_fc32_uint64.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... |
frame.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "pix.h"
/*-------------------------------------------------------------------------
*
* Create or delete a frame data structure.
*
*------------------------------------------------------------------------*/
frameloc_t *frameCreate(... |
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) ... |
perftest.c | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
* Copyright (C) The University of Tennessee and The University
* of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#... |
DRACC_OMP_011_Counter_wrong_critical_Inter_yes.c | /*
Concurrent access on a counter with the wrong lock, by utilising OpenMP critical directives. Atomicity Violation.
Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams.
Although they are able to interrupt each other leading to a wrong result. Inter Region.
*... |
Render.h | //
// Render.h
// RayTracer
//
// Created by Aluex on 1/19/15.
// Copyright (c) 2015 Aluex. All rights reserved.
//
#ifndef __RayTracer__Render__
#define __RayTracer__Render__
#include <stdio.h>
#include <cassert>
#include "Frame.h"
#include "Scene.h"
#include "Defaults.h"
#include "Utils.h"
#include <vector>
#in... |
compatibility.h | // -*- C++ -*-
// Copyright (C) 2007-2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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
// Foundation; either version 3... |
local_estimator.h | /*
* estimator.h
*
* Created on: Mar 22, 2012
* Author: aitor
*/
#ifndef REC_FRAMEWORK_LOCAL_ESTIMATOR_H_
#define REC_FRAMEWORK_LOCAL_ESTIMATOR_H_
#include <pcl/apps/3d_rec_framework/feature_wrapper/normal_estimator.h>
#include <pcl/filters/uniform_sampling.h>
#include <pcl/surface/mls.h>
#include <pcl/key... |
SpatialAdaptiveMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/SpatialAdaptiveMaxPooling.c"
#else
#define START_IND(a,b,c) (int)floor((float)(a * c) / b)
#define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b)
// #define START_IND(a,b,c) a * c / b
// #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b > 0)?1:... |
thdat.c | /*
* 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 this list
* of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce t... |
LETKFSolver.h | /*
* (C) Copyright 2020 UCAR.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/
#ifndef OOPS_ASSIMILATION_LETKFSOLVER_H_
#define OOPS_ASSIMILATION_LETKFSOLVER_H_
#include <Eigen/Dense>
#include <cfloat>
#incl... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
target_data_array_extension_at_exit.c | // --------------------------------------------------
// Check extends before
// --------------------------------------------------
// RUN: %libomptarget-compile-aarch64-unknown-linux-gnu \
// RUN: -fopenmp-version=51 -DEXTENDS=BEFORE
// RUN: %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 \
// RUN: | %fcheck-aarch... |
SpatialSubSampling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialSubSampling.c"
#else
static inline void THNN_(SpatialSubSampling_shapeCheck)(
THTensor *input,
THTensor *gradOutput,
THTensor *weight,
int kW, int kH) {
... |
GB_binop__bor_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
blackscholes.c | // Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#ifdef ENABLE_PARSEC_H... |
genericfunctions.h | /*
Copyright (c) 2013, Kai Klindworth
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 of conditions and the... |
spmm_mat.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... |
rankktensor.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... |
middle4r.c | /*
* Date: 11 December 2015
* Contact: Thomas Peyrin - thomas.peyrin@gmail.com
*/
/*
* Simmulation of boomerang analysis for Skinny
* Date: March 21, 2020
* Author: Hosein Hadipour
* Contact: hsn.hadipour@gmail.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#i... |
cp-tree.h | /* Definitions for C++ parsing and type checking.
Copyright (C) 1987-2020 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.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
... |
firstlastprivate.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main() {
int i, n = 7;
int a[n], suma=0;
for (i=0; i<n; i++) a[i] = i;
#pragma omp parallel for firstprivate(suma) lastprivate(suma)
for (i=0; i<n; i++)
{
suma = suma + a[i];
printf(" thread %d suma a[%d] suma=%d \n"... |
time_c2h6.c | /*
* ethane molecule
*/
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include "cint.h"
void run_all(int *atm, int natm, int *bas, int nbas, double *env);
int cint2e_ip1_sph(double *buf, int *shls,
int *atm, int natm, int *bas, int nbas, double *env,
CINTOpt *opt);
... |
Example_lastprivate.2.c | /*
* @@name: lastprivate.2c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_5.0
*/
#include <math.h>
float condlastprivate(float *a, int n)
{
float x = 0.0f;
#pragma omp parallel for simd lastprivate(conditional: x)
for (int k = 0; k < n; k++) {
if (a[k] < 108.5 ||... |
3d7pt_var.c | /*
* Order-1, 3D 7 point stencil with variable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#... |
ej5.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
#define TAM 1024
float* asignarMemoria(){
float *a = (float *) malloc(sizeof(float)*TAM);
return a;
}
void asignarValor(float *v){
for(int i=0;i<TAM;++i)
*(v+i)=1.0f;
}
int main() {
double start;
int numthreads;
float *vector = asig... |
GB_unop__acos_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... |
render2.c | #include "simpleRayTracer.h"
void renderKernel2(const int NI,
const int NJ,
scene_t scene,
const sensor_t sensor,
const dfloat costheta,
const dfloat sintheta,
const dfloat *randomNumbers,
unsigned char *img){
const colour_t bg = sensor.bg;
// unpack contents of scene
grid_t *... |
cancel_taskgroup.c | // RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: clang-3, clang-4.0.0
// Current GOMP interface implementation does not support cancellation; icc 16 has a bug
// XFAIL: gcc, icc-16
#include "callback.h"
#include <unistd.h>
#include <st... |
ordering_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 ... |
array_max_omp.c | /* --- File array_max_omp.c --- */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char **argv) {
struct timespec ts_start, ts_end;
float time_total;
int size = 1e7;
int *rand_nums;
int i;
int curr_max;
time_t t;
rand_nums=malloc(size*sizeof(int));
/* Intialize random number gen... |
collisions_sweep.c | /**
* @file collisions.c
* @brief Collision search using a line sweep algorithm, O(N log(N)).
* @author Hanno Rein <hanno@hanno-rein.de>
*
* @details The routines in this file implement a collision detection
* method called line sweep. It is very fast if all dimensions except one
* are small. The algorithm ... |
jacobi-task.ref.c | #include <sys/time.h>
#include <time.h>
#include <stdio.h>
static unsigned long long current_time_ns() {
#ifdef __MACH__
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), c... |
Pooling2DLayer.h | //
// @author raver119@gmail.com
//
#ifndef PROJECT_POOLING2DLAYER_H
#define PROJECT_POOLING2DLAYER_H
#include <layers/layers.h>
#include <layers/generic/BaseLayer.h>
namespace nd4j {
namespace layers {
// FIXME: we don't need activation function here
template<typename T, typename AF> class Pooling2DLayer: public B... |
rawSHA1_ng_fmt_plug.c | //
// Alternative SSE2 optimised raw SHA-1 implementation for John The Ripper.
//
// This plugin requires -msse4 in CFLAGS.
//
// Copyright (C) 2012 Tavis Ormandy <taviso@cmpxchg8b.com>
// Copyright (c) 2015 magnum (AVX2/AVX512 support)
//
// This library is free software; you can redistribute it and/or
// modify it un... |
GB_binop__isgt_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-... |
hermite_lll.c | /*!
* \file hermite_lll.c
* \author Jun Yoshida
* \copyright (c) Jun Yoshida 2019
* The project is released under BSD3 License.
* \detail
* Compute the Hermite normal forms in the LLL-based method.
* The original "pseudo-code" is found in the paper
* George Havas, Bohdan S. Majewski & K... |
GB_unaryop__lnot_uint32_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__fmod_fp64.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_unop__ainv_int16_int16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
zpoinv.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma.h"
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include ... |
convolution_3x3_pack4_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 ... |
taskyield.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// Current GOMP interface implements taskyield as stub
// XFAIL: gcc
#include "callback.h"
#include <omp.h>
#include <unistd.h>
int main()
{
int condition=0, x=0;
#pragma omp parallel num_threads(2)
{
#pragma omp master
... |
GeneralMatrixMatrix.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You c... |
GB_binop__rdiv_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-... |
PopulationAssignment.h | #pragma once
#include <cassert>
#include <iostream>
#include <random>
#include <vector>
#include "DataStructures/Containers/BitVector.h"
#include "DataStructures/Geometry/CoordinateTransformation.h"
#include "DataStructures/Geometry/Point.h"
#include "DataStructures/Geometry/Rectangle.h"
#include "DataStructures/Grap... |
ParallelUtils.h | // This code is part of the project "Ligra: A Lightweight Graph Processing
// Framework for Shared Memory", presented at Principles and Practice of
// Parallel Programming, 2013.
// Copyright (c) 2013 Julian Shun and Guy Blelloch
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of t... |
blocksort-partition_mat.c | /*
This file is part of HiParTI!.
HiParTI! 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.
HiParTI! is distr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.