source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
prob1.c | #include <omp.h>
#include <stdio.h>
#define N 8
int main(int argc, char** argv)
{
int arr[32];
int i;
omp_set_num_threads(N);
#pragma omp parallel shared(arr) private(i)
{
#pragma omp for
for (i = 0; i < 32; i++)
{
... |
nco_rgr.c | /* $Header$ */
/* Purpose: NCO regridding utilities */
/* Copyright (C) 2015--present Charlie Zender
This file is part of NCO, the netCDF Operators. NCO is free software.
You may redistribute and/or modify NCO under the terms of the
3-Clause BSD License with exceptions described in the LICENSE file */
#inc... |
ParallelHashMap.h | /**
* @file ParallelHashMap.h
* @brief A thread-safe hash map supporting insertion and lookup operations.
* @details The parallel hash map is built on top of a fixed-sized hash map
* object and features OpenMP concurrency structures. The underlying
* fixed-sized hash map handles collisions with chaining.
* ... |
trans2d.c | /*Daala video codec
Copyright (c) 2013 Daala project 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
list o... |
CartesianHDF.h | // File : CartesianHDF.h
// Created : Wed Jan 29 2020 10:25:26 AM (+0100)
// Author : Fabian Wermelinger
// Description: HDF IO routines for Cartesian grid types
// Copyright 2020 ETH Zurich. All Rights Reserved.
#ifndef CARTESIANHDF_H_GQ8CNN6W
#define CARTESIANHDF_H_GQ8CNN6W
#include "Cubism/Common.h"
#i... |
jacobi-block-for.c | #include "hclib.h"
#ifdef __cplusplus
#include "hclib_cpp.h"
#include "hclib_system.h"
#ifdef __CUDACC__
#include "hclib_cuda.h"
#endif
#endif
# include "poisson.h"
/* #pragma omp task/taskwait version of SWEEP. */
typedef struct _pragma21_omp_parallel {
int it;
int block_x;
int block_y;
int (*max_bloc... |
cc_bmm_bg_op.h | #ifndef CAFFE2_FB_OPERATORS_CC_BMM_BG_H_
#define CAFFE2_FB_OPERATORS_CC_BMM_BG_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/types.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
using T = float;
using TInd = int;
using Engine = DefaultEngine;
templat... |
convdw5x5s1_pack4_neon.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 ... |
data.c | #include "data.h"
#include "utils.h"
#include "image.h"
#include "dark_cuda.h"
#include "box.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NUMCHARS 37
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
list *get_paths(char *filename)
{
char *path;
FILE *file = fopen(filename, "r");
... |
Lab_2.2.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#define N 10
#define t 10e-6
#define e 10e-9
int main(int argc, char **argv) {
if (argc != 2) {
printf("invalid number of arguments\n");
return 0;
}
int number_of_processes = atoi(argv[1]);
printf("number of pr... |
pmtv.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include <string.h>
// #define TESTING
#define FINAL
int main(int argc, char const *argv[])
{
if (argc < 2) {
fprintf(stderr, "Falta el tamanio de la matriz\n");
exit(-1);
}
int N = atoi(argv[1]);
int *... |
par_mgr.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
enhance.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
simple_knl_test.c | #include "sg.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define TEST_LEN 1073741824
int main() {
struct timespec start, end;
size_t size = 1024;
double *a, *b, *c;
size_t i, m;
double delta;
sg_init(0);
while(size < 1073741824) {
a = malloc(size * sizeof(double));
... |
GB_unop__identity_uint32_int64.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... |
adListShared.h | #ifndef ADLISTSHARED_H_
#define ADLISTSHARED_H_
#include <iostream>
#include <thread>
#include <stdlib.h>
#include <mutex>
#include "omp.h"
#include <cassert>
// #include<memory>
#include "x86_full_empty.h"
#include "stinger_atomics.h"
#include "abstract_data_struc.h"
#include "print.h"
#include "commo... |
RenderTarget.h | #pragma once
#include "Utils.h"
#include "Vector.h"
namespace xitils {
class RenderTargetTileCollection;
class RenderTarget {
public:
std::vector<Vector3f> data;
int width;
int height;
std::shared_ptr<RenderTargetTileCollection> tiles;
RenderTarget(int width, int height) :
data(width* height),
w... |
convolution_1x1_pack8to4_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 ... |
DirectSum.h | /**
* @file DirectSum.h
*
* @date 17 Jan 2018
* @author tchipevn
*/
#pragma once
#include "autopas/containers/CellBorderAndFlagManager.h"
#include "autopas/containers/CompatibleTraversals.h"
#include "autopas/containers/ParticleContainer.h"
#include "autopas/containers/cellPairTraversals/CellPairTraversal.h"
#in... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
SpatialRadialMatching.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialRadialMatching.c"
#else
#define square(x) ((x)*(x))
#define max(x,y) (((x)>(y)) ? (x) : (y))
#define min(x,y) (((x)>(y)) ? (y) : (x))
static int nn_(SpatialRadialMatching_updateOutput)(lua_State *L)
{
// get all params
THTensor *input1 = luaT_checku... |
zpostprocess.c | #include "../include/GL/gl.h"
#include "../include/zbuffer.h"
#include "zgl.h"
void glPostProcess(GLuint (*postprocess)(GLint x, GLint y, GLuint pixel, GLushort z)) {
GLint i, j;
GLContext* c = gl_get_context();
#pragma omp parallel for collapse(2)
for (j = 0; j < c->zb->ysize; j++)
for (i = 0; i < c->zb->xsize; ... |
heat-mpi-ompss.c | /*****************************************************************************\
* ANALYSIS PERFORMANCE TOOLS *
* Extrae *
* Instrumentation package for parallel applications *
**... |
residual_based_implicit_time_scheme.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
#if !defined(KRATOS... |
3d25pt.c | /*
* Order-2, 3D 25 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_unop__identity_fp64_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... |
grid_ao_drv.c | /*
* Author: Qiming Sun <osirpt.sun@gmail.com>
*/
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "config.h"
#include "cint.h"
#include "vhf/fblas.h"
// 2 slots of int param[]
#define POS_E1 0
#define TENSOR 1
// 128s42p21d12f8g6h4i3j
#define NCTR_CART 128
// 72s24p14d10f8g6h5i4j
#de... |
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) >... |
BiOP.h | #ifndef BIOP_H_
#define BIOP_H_
/*
* BiOP.h:
* a simple feed forward neural operation, binary input.
*
* Created on: June 11, 2017
* Author: mszhang
*/
#include "Param.h"
#include "MyLib.h"
#include "Node.h"
#include "Graph.h"
#include "ModelUpdate.h"
class BiParams {
public:
Param W1;
Param W2;
... |
outline2.c | /* Super simple test
* 5/21/2014
* Author: bielsk1
*/
#define NONZER 23
#define NA 7
static int acol[24] = {0,};
double cuf[NA+1];
int qww [NONZER+1] = {2,};
#pragma omp threadprivate(cuf,qww)
void foo(int array[], int s);
/*MAINNNNN*/
int main(int argc, char* argv){
int s;
for(s=0;s <8 ;s++){
cuf[s] = 2;
}... |
3.norace5.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];
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
#pragma omp parallel for
for (int k = 1; k < N; k++)
A[i][j][k] = A[i - 1][j][k];
}
// CHECK: Region is Data Race Free.
//... |
builder.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef BUILDER_H_
#define BUILDER_H_
#include <algorithm>
#include <parallel/algorithm>
#include <cinttypes>
#include <fstream>
#include <functional>
#include <type_traits>
#include <utility>
#include ... |
SSSP.c | // -----------------------------------------------------------------------------
//
// "00_AccelGraph"
//
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2019 All rights reserved
// -----------------------------------------------------------------------------
... |
integrator_leapfrog.c | /**
* @file integrator.c
* @brief Leap-frog integration scheme.
* @author Hanno Rein <hanno@hanno-rein.de>
* @details This file implements the leap-frog integration scheme.
* This scheme is second order accurate, symplectic and well suited for
* non-rotating coordinate systems. Note that the scheme is forma... |
prop2DAcoIsoDenQ_DEO2_FDTD.h | #ifndef PROP2DACOISODENQ_DEO2_FDTD_H
#define PROP2DACOISODENQ_DEO2_FDTD_H
#include <omp.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <fftw3.h>
#include <complex>
#include "propagatorStaticFunctions.h"
#define MIN(x,y) ((x)<(y)?(x):(y))
class Prop2DAcoIsoDenQ_DEO2_FDTD {
... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- 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
//
//===---------------------------... |
pr66199-4.c | /* PR middle-end/66199 */
/* { dg-do run } */
/* { dg-options "-O2 -fopenmp" } */
#pragma omp declare target
int u[1024], v[1024], w[1024];
#pragma omp end declare target
__attribute__((noinline, noclone)) void
f1 (long a, long b)
{
long d;
#pragma omp target teams distribute parallel for default(none) firstpriva... |
core_sttmqr.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_zttmqr.c, normal z -> s, Fri Sep 28 17:38:25 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
nested_serialized.c | // RUN: %libomp-compile-and-run | FileCheck %s
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s
// REQUIRES: omp
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8
#include "callback.h"
#include <omp.h>
int main()
{
omp_set_nested(0);
#pragma omp parallel num_threads(4)
{
... |
mapper_vertex_morphing_matrix_free.h | // ==============================================================================
// KratosShapeOptimizationApplication
//
// License: BSD License
// license: ShapeOptimizationApplication/license.txt
//
// Main authors: Baumgaertner Daniel, https://github.com/dbaumgaertner
//
// ========... |
weightedNorm1Many.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... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Example_barrier_regions.1.c | /*
* @@name: barrier_regions.1c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
*/
void work(int n) {}
void sub3(int n)
{
work(n);
#pragma omp barrier
work(n);
}
void sub2(int k)
{
#pragma omp parallel shared(k)
sub3(k);
}
void sub1(int n)
{
int i;
#pragma omp parallel private(i... |
computeGraph.c | #include "defs.h"
double computeGraph(graph* G, graphSDG* SDGdata)
{
mcsim_skip_instrs_begin();
VERT_T* endV;
LONG_T *degree, *numEdges, *pos, *pSums;
WEIGHT_T* w;
double elapsed_time;
#ifdef _OPENMP
omp_lock_t *vLock;
LONG_T chunkSize;
#endif
elapsed_time = get_seconds();
#ifdef _OPENM... |
convolution_3x3_pack8_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 ... |
hmm_classify.c | /* hmm.classify.c -- ECOZ System
*/
#include "hmm.h"
#include "utl.h"
#include "list.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <float.h>
#include <assert.h>
//#undef PAR
#define PAR 1
#ifdef PAR
#include <omp.h>
#endif
#define GREEN(s) "\x1b[32m" s "\x1b[0m"
#define... |
enhance.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_dense_subassign_25_template.c | //------------------------------------------------------------------------------
// GB_dense_subassign_25_template: C<M> = A where C is empty and A is dense
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
/... |
GB_binop__gt_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... |
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__isne_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
main.c | /****************************************************
* Luis Humberto Sanchez Vaca
* A01638029
*
* Program to calcule area under the curve
* by with trapezoidal rule using OpenMP
* Ex. sin(x) from 0 to 1
*
* To compile:
* gcc -omp main.c -o main -lm
************************************************... |
GB_binop__isne_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__bxor_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
otfft_sixstep0r.h | /******************************************************************************
* OTFFT Sixstep of Rectangle Version 6.5
*
* Copyright (c) 2015 OK Ojisan(Takuya OKAHISA)
* Released under the MIT license
* http://opensource.org/licenses/mit-license.php
****************************************************************... |
grade.h | #ifndef __GRADE_H__
#define __GRADE_H__
#include <stdio.h>
#include <sstream>
#include <iomanip>
#include <chrono>
#include <type_traits>
#include <utility>
#include <float.h>
#include <omp.h>
#include "mic.h"
#include "graph.h"
#include "graph_internal.h"
// Epsilon for approximate float comparisons
#define EPSI... |
rhs.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB BT code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
pi-v11.c | /*
* Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x)
* between 0 and 1.
*
* parallel version using OpenMP
*/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h> /* OpenMP */
#if _DEBUG_
#define _DEBUG_ 1
#else
#define _DEBUG_ 0
#endif
int main(int argc, char *argv[]) {
do... |
Jacobi2D-NaiveParallel-OMP_dyn.test.c | /******************************************************************************
* Jacobi2D benchmark
* Basic parallelisation with OpenMP
*
* Usage:
* make omp
* export OMP_NUM_THREADS=8
* bin/Jacobi2D-NaiveParallel-OMP \
* `cat src/Jacobi2D-NaiveParallel-OMP.perfexecopts`
* For a run on 8 threads
********... |
sapG_fmt_plug.c | /*
* this is a SAP PASSCODE (CODEVN G) plugin for john the ripper.
* tested on linux/x86 only, rest is up to you.. at least, someone did the reversing :-)
*
* please note: this code is in a "works for me"-state, feel free to modify/speed up/clean/whatever it...
*
* (c) x7d8 sap loverz, public domain, btw
* cheer... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_3x3_pack8_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 ... |
close_modifier.c | // RUN: %libomptarget-compile-run-and-check-generic
// REQUIRES: unified_shared_memory
// UNSUPPORTED: clang-6, clang-7, clang-8, clang-9
// amdgpu runtime crash
// UNSUPPORTED: amdgcn-amd-amdhsa
// UNSUPPORTED: amdgcn-amd-amdhsa-newRTL
#include <omp.h>
#include <stdio.h>
#pragma omp requires unified_shared_memory... |
fem_2d.h | #include <taichi/common/util.h>
#include <taichi/math.h>
#include <taichi/system/timer.h>
#include <taichi/common/dict.h>
#include <taichi/system/profiler.h>
TC_NAMESPACE_BEGIN
template <int dim>
constexpr int ke_size() {
return pow<dim>(2) * dim;
}
class Material {
public:
float64 E; // Young's modulus
... |
yael_fisher_elem.c | /* *** Not tested yet on an image set *** */
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <sys/time.h>
#include <yael/vector.h>
#include <yael/gmm.h>
#include <yael/machinedeps.h>
#include "mex.h"
#define PARAM_V prhs[0]
#define PARAM_W prhs[1]
#define PARAM_M... |
x86_functions_fp32.h | // Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
// 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,... |
kernel.h | #include <immintrin.h>
#include <omp.h>
// p for points (column majored)
// i_d for intermediate_distance
// c for centers (column majored)
// kernel size k * n = 4 * 8
// k = 4, n = 8
void kernel(
int k,
int n,
__m256d *ymm0, __m256d *ymm1, __m256d *ymm2, __m256d *ymm3,
__m256d *ymm4, __m256... |
GB_binop__minus_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_unop__lnot_uint16_uint16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
Example_target_unstructured_data.1.c | /*
* @@name: target-unstructured-data.1.c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.5
*/
#include <stdlib.h>
typedef struct {
double *A;
int N;
} Matrix;
void init_matrix(Matrix *mat, int n)
{
mat->A = (double *)malloc(n*sizeof(doubl... |
GB_binop__bset_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... |
cg.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - CG
This benchmark is an OpenMP C version of the NPB CG code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS.
... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- 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
//
//===---------------------------... |
dlantr.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zlantr.c, normal z -> d, Fri Sep 28 17:38:08 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
GB_binop__isge_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... |
countSorting.c | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <omp.h>
#define SIZE 100000
void count_sort(int a[], int n)
{
int i, j, count;
int *temp = malloc(n*sizeof(int));
#pragma omp parallel for num_threads(100) private(i, j, count)
for(i=0; i<n; i++){
count = 0;
for(j=0; j<... |
relu_ref.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
drivers.c | // Driver routines for the harmonic polynomial connection problem.
#include "fasttransforms.h"
#include "ftinternal.h"
static void chebyshev_normalization_2d(double * A, const int N, const int M) {
for (int i = 0; i < N; i++)
A[i] *= M_SQRT1_2;
for (int j = 0; j < M; j++) {
A[j*N] *= M_SQRT1_2... |
convolution_1x1_pack4to1.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 ... |
array_multiply_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
int main(int argc, char **argv) {
struct timespec ts_start, ts_end;
int size = 1e8;
int multiplier = 2;
int *a, *c;
int i;
float time_total;
/* Allocate memory for arrays */
a = malloc(size*sizeof(int));
c = malloc(size*sizeof(int));
... |
gemm.c | #include "gemm.h"
#include "utils.h"
#include "cuda.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
void gemm_bin(int M, int N, int K, float ALPHA,
char *A, int lda,
float *B, int ldb,
float *C, int ldc) {
int i, j, k;
for (i = 0; i < M; ++i) {
for ... |
coordinate_common.h | /*!
* Copyright 2018 by Contributors
* \author Rory Mitchell
*/
#pragma once
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include <limits>
#include "xgboost/data.h"
#include "xgboost/parameter.h"
#include "./param.h"
#include "../gbm/gblinear_model.h"
#include "../common/random.h"
#i... |
declare2.c | /* Example of the linear and uniform clauses on the
declare simd directive
The SIMD variant of the cosScaled function may assume that ptr
and scale are loop invariant and that idx is incremented by 1
each time through the loop from where the function is called.
*/
#include <math.h>
#pragma omp decl... |
bug-nested.c | // RUN: %libomp-compile && env KMP_AFFINITY=compact %libomp-run
// REQUIRES: openmp-4.0
#include <stdio.h>
#include <stdint.h>
#include <omp.h>
#include "omp_testsuite.h"
int test_nested_affinity_bug() {
int a = 0;
omp_set_nested(1);
#pragma omp parallel num_threads(2) shared(a)
{
#pragma omp parallel num... |
random_walk.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "omp.h"
/*
Basado en el tutorial:
http://openmp.org/mp-documents/omp-hands-on-SC08.pdf
*/
int walk(double barrier, int seed);
double *reserva(int n_points);
void print(double *x, int n_points);
void main (){
double *A;
int i;
int n_walkers... |
convolutiondepthwise_3x3.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
hamming.c | /*
Copyright © INRIA 2009-2014.
Authors: Matthijs Douze & Herve Jegou
Contact: matthijs.douze@inria.fr herve.jegou@inria.fr
This file is part of Yael.
Yael 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 Founda... |
matmul2.c | #include <stdlib.h>
#include <sys/time.h>
#include <stdio.h>
#include <math.h>
//#define _OPENACCM
#ifdef _OPENACCM
#include <openacc.h>
#endif
#ifdef _OPENMP
#include <omp.h>
#endif
#ifndef _N_
#define _N_ 512
#endif
#ifndef VERIFICATION
#define VERIFICATION 1
#endif
int N = _N_;
int M = _N_;
int P = _N_;
double ... |
pngquant.c | /* pngquant.c - quantize the colors in an alphamap down to a specified number
**
** © 2009-2019 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997-2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
char *PNGQUANT_USAGE = "\
usage: pngquant [options] [ncol... |
euler.h | #include <iostream>
#include <cmath>
#include <string>
using namespace std;
// This function computes the EC curves...
vector<vector<double> > compute_ec_curve(mesh meshA, vector<vector<double> > directions, double ball_radius, unsigned int n_filtration, string ec_type)
{
// Initialize variables
vector<vector... |
Example_metadirective.1.c | /*
* @@name: metadirective.1c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
*/
#define N 100
#include <stdio.h>
int main()
{
int v1[N], v2[N], v3[N];
for(int i=0; i<N; i++){ v1[i]=(i+1); v2[i]=-(i+1); }
#pragma omp target map(to:v1,v2) map(from:v3) device(0)
#... |
data.c | /*
* Copyright (c) 2017, Marcel Heing-Becker, University of Hamburg
*
* 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 u... |
lattice.h | /*****************************************************************************
*
* ALPS/looper: multi-cluster quantum Monte Carlo algorithms for spin systems
*
* Copyright (C) 1997-2016 by Synge Todo <wistaria@comp-phys.org>
*
* This software is published under the ALPS Application License; you
* can use, redistribute ... |
tree-vect-stmts.c | /* Statement Analysis and Transformation for Vectorization
Copyright (C) 2003-2020 Free Software Foundation, Inc.
Contributed by Dorit Naishlos <dorit@il.ibm.com>
and Ira Rosen <irar@il.ibm.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GN... |
xm.c | /*
* Copyright (c) 2014-2018 Ilya Kaliman
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISC... |
TemporalRowConvolution.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/TemporalRowConvolution.c"
#else
static inline void THNN_(TemporalRowConvolution_shapeCheck)(
THNNState *state,
THTensor *input,
THTensor *gradOutput,
THTensor *weight,
THTensor *bias,
int kW,
int dW,
int padW) {
THArgCheck(kW > 0, 5,
"kerne... |
BlockMultiplier.h | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full licence information.
//
#pragma once
#include "BlockMultiplierPlatform.h"
#include <malloc.h>
#include <xmmintrin.h>
#include <emmintrin.h>
#include <tmmintrin.h>
#include <immintrin.h... |
GB_unop__identity_int16_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
matmul.h | #ifndef MATMUL_H
#define MATMUL_H
#include <stdio.h>
#include <string.h>
#include "libpopcnt.h"
#define MC 256
#define KC 64
#define NC 256
#define MR 4
#define NR 4
#define ENCODE_BIT 32
#define MASK(a) ( (a) + ( -(a) & -((0)>(a)) ) )
const uint32_t UBIT = ~0;
//
// Local buffers for storing panels from A, B an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.