source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
tinyexr.h | /*
Copyright (c) 2014 - 2018, Syoyo Fujita and many contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this l... |
Volume.h | //note: this class is header-only
#ifndef CT_VOLUME
#define CT_VOLUME
#include <atomic>
//OpenCV
#include <opencv2/core/core.hpp> //core functionality of OpenCV
//Qt
#include <QtCore/QtCore>
#include "types.h"
namespace ct {
enum class Axis {
X,
Y,
Z
};
enum class CoordinateSy... |
rev.h | /* Copyright (c) 2016, Schmidt
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 conditi... |
matrixLib.c | #include<stdio.h>
#include<stdlib.h>
#include <time.h>
#include<math.h>
#include <stdarg.h>
#include<assert.h>
#include <string.h>
#include <gperftools/tcmalloc.h>
#include "matrixLib.h"
#include "memoryLib.h"
#include "qsort-inline.h"
#include<limits.h>
// ---- begin factorial ---
/**
* Returns the factorial of n.
... |
sunmd5_fmt_plug.c | /*
* First cut, which was oSSL only, and done in 2 source files, by
* Bartavelle (please change to proper cite).
* Corrections, and re-write into SSE2, JimF.
*
* This software was written by Bartavelle <cite> and JimF
* jfoug AT cox dot net, in 2012 for CMIYC-12. No copyright is claimed,
* and the software is h... |
trmm_x_sky_u_lo_row.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_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ... |
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
//
//===---------------------------... |
mc_synch.c | /*
This file is for the different functions for emitting and absorbing synchrotron photons
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <glob.h>
#include <unistd.h>
#include <dirent.h>
#include "hdf5.h"
#include <math.h>
#include <time.h>
#include <gsl/gsl_math.h>
#includ... |
vector.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)
**************************************... |
weightedInnerProd.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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 t... |
axhelm.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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... |
GB_unop__identity_uint32_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... |
util.c | #include <math.h>
#include <time.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <gsl/gsl_vector.h>
#include <omp.h>
#include "../include/type.h"
#include "../include/util.h"
#include "../include/global.h"
extern clock_t dur;
extern char *optarg;
extern int optind;
/**
* @brief initiator of ... |
SpatialReflectionPadding.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialReflectionPadding.c"
#else
static void THNN_(SpatialReflectionPadding_updateOutput_frame)(
real *input_p, real *output_p,
int64_t nslices,
int64_t iwidth, int64_t iheight,
int64_t owidth, int64_t oheight,
int pad_l, int pad_r,
int pad_t, int p... |
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
//
//===---------------------------... |
occupancyGridWithColor.h | /*
* Generate 3D occupancy grid from a 3D closed mesh
* by R. Falque
* 07/02/2020
*/
#ifndef OCCUPANCY_GRID_H
#define OCCUPANCY_GRID_H
#include <Eigen/Core>
#include <unsupported/Eigen/CXX11/Tensor>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>... |
GB_binop__rminus_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-... |
tally.h | #ifndef OPENMC_TALLIES_TALLY_H
#define OPENMC_TALLIES_TALLY_H
#include "openmc/constants.h"
#include "openmc/tallies/trigger.h"
#include "pugixml.hpp"
#include "xtensor/xfixed.hpp"
#include "xtensor/xtensor.hpp"
#include <memory> // for unique_ptr
#include <unordered_map>
#include <string>
#include <vector>
namespa... |
LAGraph_BF_full1a.c | //------------------------------------------------------------------------------
// LAGraph_BF_full1a.c: Bellman-Ford single-source shortest paths, returns tree,
// while diagonal of input matrix A needs not to be explicit 0
//------------------------------------------------------------------------------
// LAGraph, (... |
SpatialReflectionPadding.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialReflectionPadding.c"
#else
static void THNN_(SpatialReflectionPadding_updateOutput_frame)(
real *input_p, real *output_p,
int64_t nslices,
int64_t iwidth, int64_t iheight,
int64_t owidth, int64_t oheight,
int pad_l, int pad_r,
int pad_t, int p... |
pi_loop.c | /*
This program will numerically compute the integral of
4/(1+x*x)
from 0 to 1. The value of this integral is pi -- which
is great since it gives us an easy way to check the answer.
The program was parallelized using OpenMP by adding just
four lines
(1) A line to include omp... |
GB_unop__identity_bool_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... |
common.h | /*!
* Original work Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Modified work Copyright (c) 2020 Fabio Sigrist. All rights reserved.
* Licensed under the Apache License Version 2.0 See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define LIGH... |
merge_sect_unnested.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <omp.h>
/* OpenMP Parallel Mergesort - Sections
*
* @author: ANDREW VAILLANCOURT
* 2019
*/
void merge(int a[], int size, int temp[]);
void insertion_sort(int a[], int size);
void mergesort_serial(int a[], int size, int temp[], int thresh);
... |
GB_emult_02_template.c | //------------------------------------------------------------------------------
// GB_emult_02_template: C = A.*B when A is sparse/hyper and B is bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.... |
rose_v1_output_dep2.c | // an example of output dependence preventing parallelization
// loop carried vs. non-loop carried output dependence!
#include <omp.h>
void foo()
{
int i;
int x;
int y;
#pragma omp parallel for private (x,y,i)
for (i = 0; i <= 99; i += 1) {
x = i;
y = i;
y = i + 1;
}
}
/*
output dependence ... |
GB_binop__min_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-... |
kernel.h |
/*
__kernel void pgain_kernel(
__global Point_Struct *p,
__global float *coord_h,
__global float * work_mem_h,
__global int *center_table,
__global char *switch_membership,
__local float *coord_s_acc,
int num,
int dim,
long x,
int K){
*/
/* block ID and... |
fill_ints.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 ... |
GB_unop__log_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
atomic_messages.c | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
int foo() {
L1:
foo();
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop expr' or 'x = expr binop x', where x is an l-value expression w... |
countersomp.c |
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <memory.h>
#include <malloc.h>
#include <papi.h>
#include <omp.h>
#define SIZE 1000
int main(int argc, char **argv) {
float matrixa[SIZE][SIZE], matrixb[SIZE][SIZE], mresult[SIZE][SIZE];
int i,j,k;
in... |
master.c | /*A nasty example of a preprocessing information within a basic block*/
#include <stdio.h>
#include <omp.h>
void foo(int step, int niter)
{
int nthreads ;
#pragma omp parallel firstprivate(niter) private(step)
{
for (step = 1; step <= niter; step++) {
if (step%20 == 0 || step == 1) {
#pragma omp master ... |
tree.h | #ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/meta.h>
#include <LightGBM/dataset.h>
#include <string>
#include <vector>
#include <memory>
#include <map>
namespace LightGBM {
#define kCategoricalMask (1)
#define kDefaultLeftMask (2)
/*!
* \brief Tree model
*/
class Tree {
public:
/*!
* \b... |
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... |
Ray.c | #include <stdio.h>
#include <math.h>
#include "Ray.h"
int cast_ray_triangle(vec_t * ray_ori, vec_t * ray_dir, triangle_t * triangle, vec_t * vec_list, intersect_t * rtn) {
vec_t * A = vec_list + triangle->A;
vec_t * B = vec_list + triangle->B;
vec_t * C = vec_list + triangle->C;
// Legs of the triangle
vec_t... |
GB_binop__lxor_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_binop__ne_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
fibonacci.h | #include <iostream>
#include <chrono>
#include <omp.h>
#include "xitao.h"
using namespace std;
// enable a known trick to avoid redundant recursion for evaluated cases
//#define MEMOIZE
// the maximum number of Fibonacci terms that can fit in unsigned 64 bit
const uint32_t MAX_FIB = 92;
// a global variable to manage... |
otfft_avxdif16omp.h | /******************************************************************************
* OTFFT AVXDIF(Radix-16) of OpenMP Version 6.5
*
* Copyright (c) 2015 OK Ojisan(Takuya OKAHISA)
* Released under the MIT license
* http://opensource.org/licenses/mit-license.php
**********************************************************... |
GB_binop__rdiv_fc32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
problem.c | /**
* J2 precession
*
* This example presents an implementation of the J2 gravitational moment.
* The equation of motions are integrated with the 15th order IAS15
* integrator. The parameters in this example have been chosen to
* represent those of Saturn, but one can easily change them or even
* include hi... |
mytrap.c | /*
Kevin Vega Rodriguez - A01612430
Implementacion basica del metodo del trapecio para aprocimar la integral de una funcion con
el metodo de el calculo del area de trapecio utilizando programacion en paralelo
La aproximacion es de aproximadamente 1.97 con un step de 1000000000
*/
#include <stdio.h>
#include <omp.h>
#... |
mult_impl_block_basic.h | #ifndef _MULT_IMPL_BLOCK_BASIC_H
#define _MULT_IMPL_BLOCK_BASIC_H
//Implementations for meson field contractions
template<typename mf_Policies,
template <typename> class lA2AfieldL, template <typename> class lA2AfieldR,
template <typename> class rA2AfieldL, template <typename> class rA2AfieldR
>
class _mult_i... |
convolution_pack4to1.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 ... |
GB_unaryop__abs_uint64_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
omp3.c | // RUN: mlir-clang %s --function=* -fopenmp -S | FileCheck %s
void square(double* x) {
int i;
#pragma omp parallel for private(i)
for(i=3; i < 10; i+= 2) {
x[i] = i;
i++;
x[i] = i;
}
}
// CHECK: func @square(%arg0: memref<?xf64>)
// CHECK-DAG: %c2 = arith.constant 2 : ind... |
sparseAsyncBlocksJacobi.h | //
// Created by mbarb on 14/02/2018.
//
#ifndef PARALLELITERATIVE_SPARSEASYNCBLOCKJACOBI_H
#define PARALLELITERATIVE_SPARSEASYNCBLOCKJACOBI_H
#include <iostream>
#include "Eigen"
#include "utils.h"
#include "sparseParallelJacobi.h"
#include <omp.h>
namespace Iterative {
template <typename Scalar>
class sp... |
sgemm-openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <emmintrin.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <omp.h>
#define NUM_THREADS 16
void mm_28( int m, int n, int ind1, int ind2, float *An, float *Cn);
void p_tail_4( int m, int r, int a, int x, int ind1, int ind2, float *An, float *Cn);
void ... |
MSCHAPv2_old_fmt_plug.c | /*
* MSCHAPv2_fmt.c -- Microsoft PPP CHAP Extensions, Version 2
*
* Written by JoMo-Kun <jmk at foofus.net> in 2010
* and placed in the public domain.
*
* Modified for performance, OMP and utf-8 support
* by magnum 2010-2011
*
* Support for freeradius-wep-patch challenge/response format
* added by Linus Lüssi... |
c-parser.c | /* Parser for C and Objective-C.
Copyright (C) 1987-2017 Free Software Foundation, Inc.
Parser actions based on the old Bison parser; structure somewhat
influenced by and fragments based on the C++ parser.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the ter... |
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... |
LayerNormOps.h | #pragma once
#include <string.h>
#include <cmath>
#include <algorithm>
#include "General.h"
#include "TensorRef.h"
#include "Vector-inl.h"
OPS_API int TS_LayerNorm(
TensorRef* out_,
TensorRef* in_,
TensorRef* gamma_,
TensorRef* beta_,
float eps,
int rows,
int cols);
OPS_API int TS_LayerNormGrad(
TensorRef *... |
ellipticSerialUpdatePCG.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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 wi... |
RACBVH.h | #ifndef RACBVH_H
#define RACBVH_H
#include "common.h"
#include <queue>
#include "RangeDecoder_File.h"
#include "RangeDecoder_Mem.h"
#include "positionquantizer_new.h"
#include "integercompressorRACBVH.h"
#include "stopwatch.hpp"
//#define DEBUG_CODEC // enable extra codec info to verify correctness
#define USE_D... |
chisquare.h | /*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2014 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
... |
1727.c |
/*
* Compile using the command:
* `cc 27Stencil.c -o oa -fopenmp -lm`
*/
#include <math.h>
#include <omp.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENACC
#include <openacc.h>
#endif
#define DEFAULT_DATASIZE 1048576 /* Default datasize. */
#define DEFAULT_REPS 10 ... |
zher2k.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c
*
**/
#include "plasma.h"
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include "pla... |
GB_binop__fmod_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
dcm.h | //
// Created by yama on 16-4-21.
//
#ifndef LDA_DCM_H
#define LDA_DCM_H
#include <vector>
#include <cassert>
#include <omp.h>
#include <iostream>
#include <numeric>
#include <memory.h>
#include <algorithm>
#include <exception>
#include "types.h"
#include "clock.h"
#include "cva.h"
#include "thread_local.h"
#include ... |
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
//
//===---------------------------... |
convolution_omp.c | #include "convolution.h"
void f(int x)
{
printf("%d\n%", x);
return;
}
// Divides the each pixel value by normalize_amount in 2d array **img to
// normalize pixel values. Integer division is OK.
void normalize_output(image *img, int normalize_amount)
{
for (int r = 0; r < img->height; r++)
{
f... |
bml_normalize_dense_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_add.h"
#include "../bml_allocate.h"
#include "../bml_normalize.h"
#include "../bml_parallel.h"
#include "../bml_types.h"
#include "bml_add_dense.h"
#include "bml_allocate_dense.h"
#include "bml_getters_dense.h"
#include "bml_normalize_dense.h"
#include... |
GB_unop__identity_fp64_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... |
GB_unop__identity_int64_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... |
kvstore_dist_server.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
fwi_core.c | /*
* =============================================================================
* Copyright (c) 2016-2018, Barcelona Supercomputing Center (BSC)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are... |
GB_AxB_saxpy5_bitmap.c | //------------------------------------------------------------------------------
// GB_AxB_saxpy5_bitmap.c: C+=A*B when C is full, A is bitmap, B is sparse/hyper
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserv... |
opencl_strip_fmt_plug.c | /* STRIP Password Manager cracker patch for JtR. Hacked together during
* September of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net>
* and it is hereby released to the general public under the following terms:
* Redistribution and use i... |
cudanetworkexecutor.h | #pragma once
#include "networkexecutor.h"
#include "cudanetworkbatch.h"
namespace NEAT {
//---
//--- CLASS CudaNetworkExecutor
//---
template<typename Evaluator>
class CudaNetworkExecutor : public NetworkExecutor<Evaluator> {
std::vector<class CudaNetworkBatch<Evaluator> *> batches;
p... |
zero_length_array_section.c | // RUN: %libomptarget-compile-generic -fopenmp-version=51
// RUN: %libomptarget-run-fail-generic 2>&1 \
// RUN: | %fcheck-generic
#include <stdio.h>
int main() {
int arr[5];
// CHECK: addr=0x[[#%x,HOST_ADDR:]]
fprintf(stderr, "addr=%p\n", arr);
// CHECK-NOT: Libomptarget
#pragma omp target data map(alloc: ... |
sample-3.c | #include <stdio.h>
#include <omp.h>
#include <stdlib.h>
#include <math.h>
int main() {
int *A, sum
#pragma omp parallel shared(count)
{
}
printf("Sum: %d\n",stats[0]+stats[1]);
} |
par_amgdd_fac_cycle.c | /******************************************************************************
* Copyright (c) 1998 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
***************************************... |
tinyMatrixMul.c | #include <sys/mman.h>
#include <tinyMatrixMul.h>
#include <arm_neon.h>
#include <string.h>
#include <arm_neon.h>
#include <sys/time.h>
#include "asmNeonApi.h"
//#define TIME_PROFILE_ENABLE
//#define NTCOPY_PRT_ENABLE
//#define USE_MALLOC
static inline void* tinyMalloc(uint32_t size)
{
#ifdef USE_MALLOC
return malloc... |
GB_binop__pair_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-... |
nbody_barnes_hut.c | /*
** nbody_barnes_hut.c - nbody simulation that implements the Barnes-Hut algorithm (O(nlog(n)))
**
**/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <math.h>
#include <sys/time.h>
#include <assert.h>
#include <unistd.h>
#ifdef DISPLAY
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#endif
#incl... |
SokobanMP_Andar.c | #include "../common/sort.h"
#include "../common/structures.h"
#include "../common/common.h"
#include "../common/util.h"
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// Quantos estados cada thread deve explorar
#define SIZE_THREAD_LIST 10000
// Quantos estados por threa... |
lockTest1.c | typedef int omp_lock_t;
omp_lock_t my_lock;
void omp_set_lock(omp_lock_t *);
void omp_unset_lock(omp_lock_t *);
int main() {
omp_init_lock(&my_lock);
#pragma omp parallel num_threads(4)
{
int tid = omp_get_thread_num( );
int i, j;
for (i = 0; i < 5; ++i) {
omp_set_lock(&my_lock);
... |
interpolate_v2_op.h | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... |
GB_unop__lnot_fp64_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... |
mkl_quantized_conv_ops.h | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
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) ... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) >... |
postprocess.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <complex.h>
#include <math.h>
#include <assert.h>
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "vars.h"
double deform( double * rho , int nxyz , Lattice_arrays * latt_coords , double ... |
join.c | /* Copyright 2013-2015. The Regents of the University of California.
* Copyright 2015. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013, 2015 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2015 J... |
3rd_compress.h | // compress.c de/compressors into a single-file header
// - rlyeh, public domain
//
// current file format:
// header : [1<<block_size:8][1<<excess:8]
// chunk : [len:32] [fmt:4|lvl:4] [data:X]
//
// @todo: new format
// header : [1<<block_size:8][1<<excess:8]
// chunk : [len:32][fmt|lvl:8][data:X][fmt|lvl:8]... |
NodeMapping.h |
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development unt... |
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
//
//===---------------------------... |
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... |
saxpy.c | /* Copyright 2013. The Regents of the University of California.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013 Martin Uecker <uecker@eecs.berkeley.edu>
*/
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h... |
struct.c | // RUN: %libomptarget-compile-generic -fopenmp-extensions
// RUN: %libomptarget-run-generic | %fcheck-generic -strict-whitespace
// Wrong results on amdgpu
// XFAIL: amdgcn-amd-amdhsa
// XFAIL: amdgcn-amd-amdhsa-newRTL
#include <omp.h>
#include <stdio.h>
#define CHECK_PRESENCE(Var1, Var2, Var3) ... |
convolution_3x3_pack4to1.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 ... |
MPC_SHA256.c | /*
============================================================================
Name : MPC_SHA256.c
Author : Sobuno
Version : 0.1
Description : MPC SHA256 for one block only
============================================================================
*/
#include <stdbool.h>
#include <stdint.h>
... |
image-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% IIIII M M AAA GGGG EEEEE ... |
parallel_for.h | /*!
* Copyright (c) 2021 by Contributors
* \file runtime/container.h
* \brief Defines the container object data structures.
*/
#ifndef DGL_RUNTIME_PARALLEL_FOR_H_
#define DGL_RUNTIME_PARALLEL_FOR_H_
#include <dmlc/omp.h>
#include <algorithm>
#include <string>
#include <cstdlib>
namespace {
int64_t divup(int64_t ... |
DRB034-truedeplinear-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... |
blake2bp-ref.c | /*
BLAKE2 reference source code package - reference C implementations
Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
your option. The terms of these licenses can be found at:
- CC0 1.0 Universal :... |
mm_dist_paral.c | #include <stdio.h>
#include <stdlib.h>
/*
TEMPO SEQUENCIAL:
real 3m30.117s
user 1m15.715s
sys 0m0.127s
TEMPO PARALELO MULTICORE:
real 1m29.670s
user 1m14.390s
sys 0m0.269s
TEMPO PARALELO DISTRIBUTE:
real 3m5.985s
user 2m25.092s
sys 0m40.084s
Invocations ... |
indexreduce.h | /*
* indexreduce.h
*
* Created on: Dec 28, 2015
* Author: agibsonccc
*/
#ifndef INDEXREDUCE_H_
#define INDEXREDUCE_H_
#include <shape.h>
#include <op.h>
#include <omp.h>
#include <dll.h>
#ifdef __CUDACC__
#include <helper_cuda.h>
#include <cuda.h>
#include <cuda_runtime.h>
#endif
#define MAX_FLOAT 1e37
#d... |
criticalConstruct.c | int main() {
int x = 10;
#pragma omp parallel
{
int localX = 20;
#pragma omp critical
{
localX += 20;
localX -= 10;
}
localX = x;
}
x = 20;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.