source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
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... |
TriangularMesh3D.h | /*
* MIT License
*
* Copyright (c) 2018-2019 Benjamin Köhler
*
* 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, c... |
_phonopy.c | /* Copyright (C) 2011 Atsushi Togo */
/* All rights reserved. */
/* This file is part of phonopy. */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions */
/* are met: */
/* * Redistributions of source code must retain the abo... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ast-dump-openmp-target-enter-data.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(int x) {
#pragma omp target enter data map(to \
: x)
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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
//
//===---------------------------... |
test68.c | #include<omp.h>
int main() {
//volatile int arr[1000][1000][2];
//arr[0][0] = 0;
volatile int sh;
#pragma omp parallel
{
long long i, j, k;
//arr[0][0][0] = 0;
for(i = 0; i < 5000; i++)
for(j = 0; j < 100000; j++) {
#pragma omp flush
}
}
}
|
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 ... |
GB_ewise_slice.c | //------------------------------------------------------------------------------
// GB_ewise_slice: slice the entries and vectors for an ewise operation
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// ht... |
matrix.h | /*
Copyright 2016 Waizung Taam
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 agreed to in writing, software
di... |
GB_unaryop__ainv_fp32_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
ScCleanseInput.c | /*@file
Provides functions to cleanse text snippets.
Copyright (C) 2020 Marvin Häuser. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <string.h>
#include <stddef.h>
#include <ScCleanseInput.h>
#include <ScStringMisc.h>
/*
Cleanse the current line from Buffer.
... |
loop_dispatch.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// XFAIL: gcc
// GCC doesn't call runtime for static schedule
#include "callback.h"
#define WORK_SIZE 64
int main() {
int i;
int wait_s = 0;
#pragma omp parallel num_threads(4)
{
int wait_id = 0;
int team_size = omp_get_n... |
GxB_Vector_iso.c | //------------------------------------------------------------------------------
// GxB_Vector_iso: report if a vector is iso-valued or not
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Id... |
GB_unop__log2_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
convolution_3x3_pack8.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 ... |
GB_unaryop__ainv_uint32_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
HTree.h | //
// Created by Bangtian Liu on 6/28/19.
//
#ifndef PROJECT_HTREE_H
#define PROJECT_HTREE_H
#include "Util.h"
#include "../sympiler/HTree.h"
#include "HTree.h"
//#include "hcds.h"
#include <map>
#include <unordered_set>
struct HTree{
int *sidlen;
int *sidoffset;
int *sids;
int depth;
int *levelset;
int *id... |
raytracer.h | #pragma once
#include "type.h"
#include "screen.h"
#include "camera.h"
#include "scene.h"
#include "primitive.h"
namespace render {
class raytracer : public gpu {
public:
enum mode {
RAYTRACING,
PATHTRACING,
};
public:
CPU raytracer(const camera &c, enum mode m = RAYTRACING, vector3f bg = vector3f(0,0,0));
CP... |
shmem_ctx.c | /*
* Copyright (c) 2017 Intel Corporation. All rights reserved.
* This software is available to you under the BSD license below:
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redi... |
pragmaScope2.c | // This example shows the multiple pragmas in the same scope with a following statement without brackets.
int main(){
int i,j;
int n=10, m=10;
int a[n][m];
for(i=0;i<n; i++)
for(j=0;j<n; j++)
a[i][j]= 0;
for (i=0;i<n-1;i++)
#pragma omp parallel
#pragma omp for
for (j=0;j<m-1;j++)
... |
bucle-forModificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n = 9;
if(argc < 2) {
fprintf(stderr,"\n[ERROR] - Falta no iteraciones \n");
exit(-1);
}
n = atoi(argv[1]);
#pragma omp parallel for
for (i=0; i<n; i++)
printf("thread %d ejecuta la iteración %d del bucle\n",... |
kmp_set_dispatch_buf.c | // RUN: %libomp-compile && %libomp-run 7
// RUN: %libomp-run 0 && %libomp-run -1
// RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5
// RUN: %libomp-compile -DMY_SCHEDULE=guided && %libomp-run 7
// RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5
// UNSUPPORTED: clang-11
#include <stdio.h>
#include <omp.h>
#inc... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
constitute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ast-dump-openmp-target-simd.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp target simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target simd
for (int i = 0; i < x; i++)... |
GB_binop__land_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... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
dft.c | #include <time.h>
#include <math.h>
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
#define N (2 << 18)
//Store the FFT of f in F, for n points
void fft(float complex *F, float complex *f, int n, int stride)
{
if(n == 1)
{
F[0] = f[0];
}
else
{
// Split the array and ... |
GB_compiler.h | //------------------------------------------------------------------------------
// GB_compiler.h: handle compiler variations
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apac... |
estimate_dt_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela, Ruben Zorrilla
//
//
#ifndef KRATO... |
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
//
//===---------------------------... |
ast-dump-openmp-target-update.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(int x) {
#pragma omp target update to(x)
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dum... |
core.c | /* Main solver routines for heat equation solver */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "heat.h"
/* Update the temperature values using five-point stencil */
void evolve(field *curr, field *prev, double a, double dt)
{
int i, j;
double dx2, dy2;
/* Det... |
coordinate_common.h | /*!
* Copyright 2018 by Contributors
* \author Rory Mitchell
*/
#pragma once
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include <limits>
#include "../common/random.h"
namespace xgboost {
namespace linear {
/**
* \brief Calculate change in weight for a given feature. Applies l1/l2... |
opi.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
//seed random number generator
// Q2b: get the number of threads to run with from agrv and
// add OpenMP API code to set number of threads here
int Nthreads = atoi(argv[1]);
omp_set_num_threads(Nth... |
GB_binop__lt_uint64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
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... |
gp_rank_openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <time.h>
#include <omp.h>
#define GIG 1000000000
#define CPG 2.4 // Cycles per GHz -- Adjust to your computer
typedef struct ad_vert {
long vertex_num;
struct ad_vert ... |
GB_binop__second_uint8.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_matvec_type_name.c | //------------------------------------------------------------------------------
// GB_matvec_type_name: return the name of the type of a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licen... |
main.c | // ! Requirements
// - Execute the multiplication 15 times,
// - Run the code 5 times for each execution
// - Manage double precision for all the arrays
#include <omp.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define MAX_INPUT_SIZE 100
#define CALCULATIONS 15
... |
2d_simple_v1.c | #include <stdlib.h>
#include <omp.h>
int main()
{
int** arr = malloc(sizeof(int*));
arr[0] = malloc(sizeof(int));
#pragma omp parallel
{
arr[0][0] = 42;
printf("%d\n", arr[0][0]);
}
free(arr[0]);
free(arr);
}
|
bfm_evo.h | /* -*- mode:c++; c-basic-offset:2 -*- */
/****************************************************************************/
/* Aug 2012 */
/* Hantao Yin */
/* ... |
main.c | void baz(int M, int *restrict T, int N, int *restrict A) {
#pragma omp parallel default(shared)
{
#pragma omp for
for (int I = 0; I < N; ++I) {
A[I] = I;
for (int J = 0; J < M; ++J)
A[I] = A[I] + T[J];
}
}
}
void bar(int M, int *restrict T, int N, int *restrict A) { baz(M, T, N, A); }
... |
spmv_int.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>
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millitm / 1000.0;
}
//#d... |
GraphBLAS.h | //------------------------------------------------------------------------------
// GraphBLAS.h: definitions for the GraphBLAS package
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identif... |
GB_unop__identity_fc32_uint32.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=expected,omp45 -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp -fopenmp-version=50 -ferror-limit 100 %s -Wuninitialized
// RUN: %clang_cc1 -verify=expected,omp45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wunin... |
openmp-ex07.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
int main(void)
{
int num_threads, my_thread;
num_threads = omp_get_num_threads();
my_thread = omp_get_thread_num();
printf ("\"You're all individuals!\" said %d of %d.\n", my_thread, num_threads);
#pragma omp parallel private(num_threads,my_thread)
... |
GB_binop__minus_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
edge_data.h | /*
==============================================================================
KratosPFEMApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi
pooyan@cimne.upc.edu
rrossi@cim... |
ConverterOSG.h | /* -*-c++-*- IfcQuery www.ifcquery.com
*
MIT License
Copyright (c) 2017 Fabian Gerold
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... |
mem-consistency-openmp3x.c | /************************************************************************
OpenMP-3.0 Example Codes Beta-v1.0
File : mem-consistency-openmp3x.c
Date : Aug 2011
Description : Simple example program to demonstrates the importance to
maintain the memory con... |
GB_binop__first_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... |
summary.c | #include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> /* getopt */
#include <string.h> /* memset */
#include "../gptl.h"
#ifdef THREADED_OMP
#include <omp.h>
#endif
static int iam = 0;
static int nproc = 1; /* number of MPI tasks (default 1) */
static int nthreads = 1; /* number of thread... |
imd_integrate.c |
/******************************************************************************
*
* IMD -- The ITAP Molecular Dynamics Program
*
* Copyright 1996-2011 Institute for Theoretical and Applied Physics,
* University of Stuttgart, D-70550 Stuttgart
*
**************************************************************************... |
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)... |
DRB024-simdtruedep-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... |
iwbt.c | //iwbt -- compute wet or icebult from air and dewpoint temperatures
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <errno.h>
#include <omp.h>
#include "envphys_c.h"
#include "envphys.h"
#define RH2O 461.5 /* Gas constant for water vapor (J/kg/K) */
#define EPS (MOL_H2O/MOL_AIR) /* Ratio of molecul... |
7025.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... |
DRB013-nowait-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... |
pooling_2x2.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 ... |
axpbyMany.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... |
saturnin-linear-trail-weight-three-rounds.c | #include "saturnin-common.h"
#include "../global-common.h"
#include "../convolution.h"
#include <math.h>
#include <stdbool.h>
#include <omp.h>
#define NUMBER_OF_CANDIDATES 349
#define NUMBER_OF_ELEMENTS (1 << BOX_WIDTH)
#define DT_SIZE (NUMBER_OF_ELEMENTS*NUMBER_OF_ELEMENTS)
#define NUM_THREADS 36
#define BOUND 36
st... |
GB_unop__cos_fc32_fc32.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... |
shape.h | /*
* shape.h
*
* Created on: Dec 28, 2015
* Author: agibsonccc
*/
#ifndef SHAPE_H_
#define SHAPE_H_
#include <cstring>
#include <cstdio>
#include <dll.h>
#include <nd4jmalloc.h>
#include <templatemath.h>
#include "pointercast.h"
#define MAX_DIMENSION 0x7fffffff
#define MAX_NUM_THREADS 1024
#define MAX_RA... |
kncmbpush3.c | /* KNC C Library for Skeleton 3D Electromagnetic Vector PIC Code */
/* written by Viktor K. Decyk, UCLA and Ricardo Fonseca, ISCTE */
#include <stdlib.h>
#include <stdio.h>
#include <complex.h>
#include <math.h>
#include <string.h>
#include <immintrin.h>
#include "kncmbpush3.h"
/*-------------------------------------... |
GB_unop__identity_bool_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... |
3d7pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
test_loops_omp.c | /** @file class.c
* Julien Lesgourgues, 17.04.2011
*/
/* this main calls CLASS several times in a loop, with different input
parameters. It illustrates how the code could be interfaced with a
parameter extraction code. */
/* JL 17.03.2016: implemented here nested openMP loops. The user
chooses how... |
GB_binop__bclr_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
CALPHADFreeEnergyFunctionsTernary.h | #ifndef included_CALPHADFreeEnergyFunctionsTernary
#define included_CALPHADFreeEnergyFunctionsTernary
#include "CALPHADSpeciesPhaseGibbsEnergy.h"
#include "InterpolationType.h"
#include "Phases.h"
#include "datatypes.h"
#include "functions.h"
#include <boost/property_tree/ptree.hpp>
#include <fstream>
#include <iost... |
flush.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main() {
int data=10, flag = 0;
#pragma omp parallel num_threads(4)
{
if (omp_get_thread_num()%2==0) {
data = 5;
#pragma omp flush(flag, data)
/* Set flag to release thread 1 */
flag = 1;
printf("fla... |
hardswish_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... |
irbuilder_unroll_heuristic.c | // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
// RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
#ifnd... |
GB_binop__ldexp_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-... |
omp6.c | #include<stdio.h>
int N;
struct State {
int col[99], d0[99], d1[99];
};
int set(int r, int c, struct State *s) {
if (s->col[c] || s->d0[r+c] || s->d1[N+r-c])
return 0;
s->col[c]++;
s->d0[r+c]++;
s->d1[N+r-c]++;
return 1;
}
void unset(int r, int c, struct State *s) {
s->col[c]--;
s->d0[r+c]--;
s->d... |
GB_binop__pair_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
ams.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)
**************************************... |
asaxpy.c | /**
* @file asaxpy.c
* @brief Function definition for performing the \c saxpy operation on accelerator.
*
* This source file contains function definition for the \c saxpy operation,
* which is defined as:
*
* y := a * x + y
*
* where:
*
* - a is a scalar.
* - x and y are single-precision vectors each with n... |
imutils.c | /*
* Author: Curtis McCully
* October 2014
* Licensed under a 3-clause BSD style license - see LICENSE.rst
*
* Originally written in C++ in 2011
* See also https://github.com/cmccully/lacosmicx
*
* This file contains image utility functions for SCRAPPY. These are the most
* computationally expensive pieces of ... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 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 can ob... |
FillInLinearSystemImpl.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
NeighborhoodGraph.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_NG_H_
#define _SPTAG_COMMON_NG_H_
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "Dataset.h"
#include "FineGrainedLock.h"
#include "QueryResultSet.h"
namespace SPTAG
{
namespace C... |
SE_fgg_expand_all_mex.c | #include "mex.h"
#include "SE_fgg.h"
void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int);
#define X prhs[0]
#define OPT prhs[1]
#define ZX plhs[0] // Output
#define ZY plhs[1] // Output
#define ZZ plhs[2] // Output
#define IDX plhs[3] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
void mexFu... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
GB_unop__cosh_fc32_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... |
GB_binop__pair_uint8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
convolutiondepthwise_3x3_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. 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 of the License at
//
//... |
updater_basemaker-inl.h | /*!
* Copyright 2014 by Contributors
* \file updater_basemaker-inl.h
* \brief implement a common tree constructor
* \author Tianqi Chen
*/
#ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_
#define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_
#include <xgboost/base.h>
#include <xgboost/tree_updater.h>
#include <vector>
#incl... |
GB_binop__ge_bool.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
3_parallel_queue_first_n_push.c | /*
Program : 3
Author : Anish
Topic : Write a C program using OpenMP features to create two parallel threads.
The first thread should insert the first ‘N’ natural numbers into a queue in sequence,
and the second thread should remove the numbers from the queue.
*/
#include<stdio.h>
... |
GB_unop__sqrt_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
_polyprism.c | /* Generated by Cython 0.20.1 on Thu Jul 3 12:41:06 2014 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTER... |
betweennessCentrality.c | #include "defs.h"
double betweennessCentrality(graph* G, DOUBLE_T* BC) {
VERT_T *S; /* stack of vertices in the order of non-decreasing
distance from s. Also used to implicitly
represent the BFS queue */
plist* P; /* predecessors of a vert... |
GB_unop__isnan_bool_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... |
sizeof.c | // Liao, 11/17/2009
// Test SgSizeOfOp::replace_expression()
// Distilled from spec_omp2001/benchspec/OMPM2001/332.ammp_m/atoms.c
int atom()
{
int serial;
#pragma omp parallel
{
int i =sizeof(serial);
}
return 1;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.