source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
squareddifference_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... |
tnlDirectEikonalMethodBase2D_impl.h | #pragma once
template< typename Real,
typename Device,
typename Index >
void
tnlDirectEikonalMethodsBase< Meshes::Grid< 2, Real, Device, Index > >::
initInterface( const MeshFunctionPointer& _input,
MeshFunctionPointer& _output,
InterfaceMapPointer& _interfaceMap,
const StaticV... |
gi_conforming_discrete_gradient.h | /*
*
* Copyright (C) 2018 Attila Gyulassy <jediati@sci.utah.edu>
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#ifndef CONFORMING_DISCRETE_GRADIENT_H
#define CONFORMING_DISCRETE_GRADIENT_H
#include "gi_labeling.h"
#... |
thread_pool.h | /**
* Non-metric Space Library
*
* Main developers: Bilegsaikhan Naidan, Leonid Boytsov, Yury Malkov, Ben Frederickson, David Novak
*
* For the complete list of contributors and further details see:
* https://github.com/nmslib/nmslib
*
* Copyright (c) 2013-2018
*
* This code is released under the
* Apache Li... |
nodal_two_step_v_p_strategy.h | //
// Project Name: KratosPFEMFluidDynamicsApplication $
// Last modified by: $Author: AFranci $
// Date: $Date: June 2018 $
// Revision: $Revision: 0.0 $
//
//
#ifndef KRATOS_NODAL_TWO_STEP_V_P_STRATEGY_H
#define KRATO... |
general_basis_get_vec.h | #ifndef _GENERAL_BASIS_GET_VEC_H
#define _GENERAL_BASIS_GET_VEC_H
#include "general_basis_core.h"
#include "numpy/ndarraytypes.h"
#include "misc.h"
#include "openmp.h"
namespace basis_general {
template<class T,class P>
bool inline update_out_dense(std::complex<double> c, P phase, npy_intp n_vec,const std::complex<... |
sphintegrator.h | #ifndef SPHINTEGRATOR_H
#define SPHINTEGRATOR_H
#include "sph.h"
#include "omp.h"
// Derived integrators
class SPHIntegrator {
private:
float penalty;
public:
SPHIntegrator(float penalty) : penalty(penalty) {}
void integrate(SPHSystem& system, float timestep) {
vector<Particle*>* ps = system.getP... |
program_evaluator.h | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... |
party.h | //
// Created by liqinbin on 10/13/20.
//
#ifndef FEDTREE_PARTY_H
#define FEDTREE_PARTY_H
#include "FedTree/dataset.h"
#include "FedTree/Tree/tree_builder.h"
//#include "FedTree/Encryption/HE.h"
#include "FedTree/DP/noises.h"
#include "FLparam.h"
#include "FedTree/booster.h"
#include "FedTree/Tree/gbdt.h"
#include <a... |
2562.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... |
parallel_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// Denis Demidov... |
DRB005-indirectaccess1-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... |
binary_move_generator.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_NEIGHBORHOOD_BINAR... |
false_sharing_intel_problem.c | #include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#define N 1000
int main() {
const int nr_threads = 2;
const int n = N;
const int nr_runs = 20000000;
double a[n], sum = 0.0;
int j;
omp_set_dynamic(0);
omp_set_num_threads(nr_threads);
#pragma ... |
symv_x_csc_u_hi.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include <memory.h>
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
symv_csc_u_hi_unroll(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSC *A,
const ALPHA_Number *x,
const ALPHA_Number beta,
... |
colorManagement.h | #include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <limits>
#include <cstdint>
//This header also implements the Knoll-Yilluoma dither algorithm
//as described in Biqswit's article here:
//https://bisqwit.iki.fi/story/howto/dither/jy/
struct TrueColor{
uint8_t R, G,... |
graphcoloring.c | #include <omp.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
struct node{
int color;
int vertex; // unique id
struct node* next;
};
struct graph{
int numVertices;
struct node** adjLists; // stores adjacent nodes to a given node
struct node** adjListsCopy; // we can... |
shared-modificado.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
main()
{
int i, n = 7;
int a[n];
for (i=0; i<n; i++)
a[i] = i+1;
#pragma omp parallel for shared(a,n),default(none)
for (i=0; i<n; i++) a[i] += i;
printf("Después de parallel for:\n");
for (i=0; i<n; i++)
printf("a[%d] = %d\n",i,a[i]);
}
|
GB_unaryop__abs_uint64_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ParticleBConds3DSoa.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeongnim ... |
GB_unop__sin_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
ll_data_source.c | #include"llama/ll_data_source.h"
virtual bool ll_simple_data_source::pull(ll_writable_graph* graph, size_t max_edges) {
size_t num_stripes = omp_get_max_threads();
ll_la_request_queue* request_queues[num_stripes];
for (size_t i = 0; i < num_stripes; i++) {
request_queues[i] = new ll_la_request_qu... |
GB_binop__le_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-... |
ast-dump-openmp-target-teams-distribute-parallel-for-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 teams distribute parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target team... |
DRB011-minusminus-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... |
target_teams_distribute_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
//... |
omp_reduce.c | #include <assert.h>
#include <omp.h>
#include <stdio.h>
int main () {
int n = 5;
int arr[5] = {5,3,9,1,7};
// Reduction combiners
int max = -10;
int min = 10;
int sum = 0;
int sub = 30;
int prod = 1;
_Bool land = 1; /* TRUE */
int band = ~(arr[0] & 0);
_Bool lor = 0; /* FALSE */
int bor = (arr[... |
ark_brusselator1D_omp.c | /*---------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds @ SMU
*---------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2022, Lawrence Livermore National Security
* and Southern Methodist University.
* All rights ... |
axpy_ompacc_mpi.c | // Experimental test input for directive-guided MPI code generation
// simplest scalar*vector operations
// Testing extensions for MPI processes
// Liao 10/27/2015
// vector = vector + vector * scalar
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <assert.h>
#include <omp.h>
#d... |
GB_binop__land_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
LifeAPI.h | //LifeAPI provide comfortable functions (API) to manipulate, iterate, evolve, compare and report Life objects. This is mainly done
//in order to provide fast (using C) but still comfortable search utility.
//Contributors Chris Cain, Dongook Lee.
//Written by Michael Simkin 2014
#pragma once
#include <stdio.h>
#includ... |
logics.c | //int logics[1000];
//another regular array types, not from a parameter list
int main()
{
int logic_or = 0;
int i;
int logics[1000];
#pragma omp parallel
{
#pragma omp for schedule(dynamic,1)
for (i = 0; i < 1000; ++i)
{
logic_or = logic_or || logics[i];
}
}
return 0;
}
|
ast-dump-openmp-target-parallel.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(void) {
#pragma omp target parallel
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump... |
logit_loss.h | /**
* Copyright (c) 2015 by Contributors
*/
#ifndef DIFACTO_LOSS_LOGIT_LOSS_H_
#define DIFACTO_LOSS_LOGIT_LOSS_H_
#include <vector>
#include <cmath>
#include "difacto/base.h"
#include "difacto/loss.h"
#include "dmlc/data.h"
#include "dmlc/omp.h"
#include "common/spmv.h"
namespace difacto {
/**
* \brief the logistic... |
GB_unop__identity_int8_int8.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_bitmap_add_template.c | //------------------------------------------------------------------------------
// GB_bitmap_add_template: C = A+B, C<M>=A+B, and C<!M>=A+B, C bitmap
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
DRB116-target-teams-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... |
ccsd_t.c | /*
*
*/
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "np_helper/np_helper.h"
#include "vhf/fblas.h"
typedef struct {
double *cache[6];
short a;
short b;
short c;
short _padding;
} CacheJob;
/*
* 4 * w + w.transpose(1,2,0) + w.transpose(2,0,1)
* - 2 ... |
special_accumulation_ops.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
pointcloud.h | #ifndef POINTCLOUD_H_
#define POINTCLOUD_H_
#include <omp.h>
#include <cmath>
#include <string>
#include <vector>
#include "compile_constants.h"
#include "vector.h"
namespace dive {
template <size_t N>
class PointCloud_minimal {
public:
// base
std::vector<size_t> pid;
std::vector<Vector<N>> pos;
std::vector... |
dualpivot_tasks_adaptive.h | #ifndef QUICKSORTMP_DUALPIVOT_TASKS_ADAPTIVE_H
#define QUICKSORTMP_DUALPIVOT_TASKS_ADAPTIVE_H
#include <omp.h>
#include <stddef.h>
#include "partition.h"
#include "order.h"
#include "insertion_sort.h"
static
void sort_parallel_adaptive(
void* restrict array,
ptrdiff_t lower_index,
ptrdiff_t higher_index,... |
openmp-ex35.c | /* ... and task parallelism */
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(void)
{
#pragma omp parallel
{
int id = omp_get_thread_num();
#pragma omp single
{
int i, count;
printf("I am %d and I am the dispatcher\n",id);
count = 0;
for (i = 0; i < 20; i++) {... |
serial_tree_learner.h | #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/dataset.h>
#include <LightGBM/tree.h>
#include "feature_histogram.hpp"
#include "spli... |
colormap.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
rt_dpltmg.c | #include "runtime.h"
void RT_CORE_dpltmg( Quark *quark, Quark_Task_Flags *task_flags,
PLASMA_enum mtxtype, int m, int n, double *A, int lda,
int gM, int gN, int m0, int n0, unsigned long long int seed )
{
plasma_context_t *plasma;
plasma = plasma_context_self();
if ... |
deconvolution_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 ... |
ctl_fragment.c | /********************************************************************[libaroma]*
* Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Lic... |
gather_int.c | // create a list of 64 numbers, and only sum the even ones
#include <stdio.h>
#include <stdlib.h>
#define N 32000
int main() {
srand(time(NULL));
int *numbers = malloc(sizeof(int)*N);
int *mask = malloc(sizeof(int)*N);
// Init the numbers
for (int i = 0; i<N; i++) numbers[i] = rand() % 10;
... |
palshop_fmt_plug.c | /* This format is reverse engineered from InsidePro Hash Manager!
*
* This software is Copyright (c) 2016, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without modification,
* are ... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
cs-enforcer.c | int main() {
int X;
#pragma omp parallel
{
int i;
#pragma omp sections
{
#pragma omp section
X = X + 1;
#pragma omp section
X = X - 1;
#pragma omp section
for (i = 0; i < 10; i++)
X++;
}
}
}
|
dmul_eq_omp.c | /*
This file is part of ParTI!.
ParTI! is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
ParTI! is distributed... |
nusPerfect.cpp.dapt.c | #pragma warning(disable : 4996)
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define _CRT_SECURE_NO_WARNINGS
#define min(x,y) ((x) < (y) ? (x) : (y))
#define max(x,y) ((x) > (y) ? (x) : (y))
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) (((n)<0) ? -((-(n)+(... |
kmp_num_teams.c | // RUN: %libomp-compile-and-run
// UNSUPPORTED: gcc
// Linking fails for icc 18/19
// UNSUPPORTED: icc-18, icc-19
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define NT 8
#ifdef __cplusplus
extern "C" {
#endif
typedef int kmp_int32;
typedef struct ident {
kmp_int32 reserved_1;
kmp_int32 flags;
kmp_... |
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
//
//===---------------------------... |
data.c | // SPDX-License-Identifier: BSD-2-Clause
/*
Copyright 1999-2016 Bernard Parent
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
condit... |
y_solve-brisbane.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB BT code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
2761.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[200 + 0][200 + 0][200 + 0], double B[200 + 0][200 + 0][200 + 0])... |
GB_unop__abs_fp32_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... |
conv_op.h | /* Copyright (c) 2016 PaddlePaddle 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... |
13.c | #include<stdio.h>
#include<stdlib.h>
#include<omp.h>
int main()
{
int i, j, N, NoOfthreads, total_threads;
printf("Enter number of threads: ");
scanf("%d", &NoOfthreads);
printf("Matrix size: ");
scanf("%d", &N);
if ((NoOfthreads!=1) && (NoOfthreads!=2) && (NoOfthreads!=4) && (NoOfthreads!=8) ... |
utils.c | /**
* \file utils.c
* \brief Generic tool utilities
*
* \author J.R.Versteegh <j.r.versteegh@orca-st.com>
*
* \copyright (C) 2017 SURFnet. All rights reserved.
* \license This software may be modified and distributed under the
* terms of the BSD license. See the LICENSE file for details.
*/
#include <stdio.... |
GB_binop__ne_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:... |
explicit_strategy.h | /*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix... |
residualbased_elimination_quasiincompresible_builder_and_solver.h | /* *********************************************************
*
* Last Modified by: $Author: anonymous $
* Date: $Date: 2009-01-15 14:50:24 $
* Revision: $Revision: 1.12 $
*
* ***********************************************************/
#if !defined(KRATOS_RESIDUAL_BASED_ELIMINATION_... |
convolution_5x5.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 ... |
GB_assign_zombie3.c | //------------------------------------------------------------------------------
// GB_assign_zombie3: delete entries in C(:,j) for C_replace_phase
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
alcanceDatosI.c | #include <stdio.h>
#include <stdlib.h>
#define TAM 4
void init(float *a, float value){
for(int i=0;i<TAM;++i)
*(a+i)=value;
}
int main() {
float *a = (float *) malloc(sizeof(float)*TAM);
float *b = (float *) malloc(sizeof(float)*TAM);
float *c = (float *) malloc(sizeof(float)*TAM);
int temp=0;
init(a,4.0f... |
SpatialAveragePooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialAveragePooling.c"
#else
static inline void THNN_(SpatialAveragePooling_shapeCheck)(
THTensor *input, THTensor *gradOutput,
int kH, int kW, int dH, int dW, int padH, int padW,
bool ceil_mode) {
THArgCheck(kW > 0 && kH > 0, 5,
"kernel siz... |
GB_unop__identity_int32_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... |
GB_unop__minv_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... |
CDIIS.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <omp.h>
#include "linalg_lib_wrapper.h"
#include "TinyDFT_typedef.h"
#include "CDIIS.h"
#include "utils.h"
void TinyDFT_CDIIS(TinyDFT_p TinyDFT, const double *X_mat, const double *S_mat, const double *D_mat, double *F_mat)
{
int nbf = T... |
omp.c | // RUN: mlir-clang %s --function=* -fopenmp -S | FileCheck %s
void square(double* x, int sstart, int send, int sinc) {
#pragma omp parallel for
for(int i=sstart; i < send; i+= sinc) {
x[i] = i;
}
}
// CHECK: func @square(%arg0: memref<?xf64>, %arg1: i32, %arg2: i32, %arg3: i32) attributes {llvm.... |
GB_unop__tanh_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... |
fig4.70-if-clause.c | /*
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the BSD License("BSD")(the "License").
You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice... |
error-bound.c | // numerical verification of empirical error bound in Eq. (B6) of "Measurement-Based Quantum Metropolis Algorithm"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <complex.h>
// ASSUMPTIONS:
// - residual extrema are assumed to be bracketed on a coarse grid (missed maxima can underestimate maximum e... |
GB_binop__lt_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-... |
threadpool.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... |
dft.c | // Copyright Naoki Shibata and contributors 2010 - 2020.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.... |
sort_reduce.h |
int group_range = omp_get_num_teams();
int group = omp_get_team_num();
int local_range = omp_get_num_threads();
int region_size = ((size / 4) / group_range) * 4;
int block_start = group * region_size;
// Give the last block any extra elements
int block_stop = (group == group_range - 1) ? size : block_start + regio... |
cast_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... |
GB_unop__identity_fp32_int8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
ellipticSchwarzSolverHex3D.c | extern "C" void FUNC(preFDM) (const dlong& Nelements,
const pfloat* __restrict__ u,
pfloat* __restrict__ work1)
{
#define getIdx(k,j,i,e) ((k)*p_Nq_e*p_Nq_e+(j)*p_Nq_e+(i)+(e)*p_Nq_e*p_Nq_e*p_Nq_e)
#define getIdx2(k,j,i,e) ((k-1)*p_Nq*p_Nq+(j-1)*p_Nq+(i-1)+(e)*p_Nq*p_Nq*p_Nq)... |
sketch.h | /**
# Sketching functions for Bwatch
Sketching utilities consist of a few functions and definitions.
*/
#include "bwatch-iterators.h"
/**
## Sketch vof facets
`sketch_vof()` mimics bview's `draw_vof()` a little
*/
typedef struct _sketch_vof {
scalar f;
bool precomp; //precompute normals
material mat;
} _sketch... |
BenchUtils.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <chrono>
#include <functional>
#include <vector>
#include <immintrin.h>
#ifdef _O... |
pi.c | #ifndef _HISTOGRAM_H
#define _HISTOGRAM_H
#include"pi.h"
#endif
int main(int argc, char *argv[]){
double elapsed_time;
double serialPI, parallelPI, step;
if(argc != 3){
printf("Correct way to execute this program is:\n");
printf("./pi stepNum numberOfThreads\n");
return 1;
}
int num_steps = atoi(argv[1]... |
inter_fracture_tetrahedra_utility.h | /*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix... |
openmp_wrapper.h | /*!
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_OPENMP_WRAPPER_H_
#define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP
#include <LightGBM/utils/log.h>
#include <omp.h>
#include <e... |
cudanetworkexecutor.h | #pragma once
#ifndef CUDANETWORKEXECUTOR_H__
#define CUDANETWORKEXECUTOR_H__
#include "networkexecutor.h"
#include "cudanetworkbatch.h"
namespace NEAT {
//---
//--- CLASS CudaNetworkExecutor
//---
template<typename Evaluator>
class CudaNetworkExecutor : public NetworkExecutor<Evaluator> {
... |
BatchNormalization.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/BatchNormalization.c"
#else
void THNN_(BatchNormalization_updateOutput)(
THNNState *state, THTensor *input, THTensor *output,
THTensor *weight, THTensor *bias,
THTensor *running_mean, THTensor *running_var,
THTensor *save_mean, THTensor *save_std,
bool... |
row_wise_v1.c |
/****
Author: Rayhan Shikder,
email: shikderr@myumanitoba.ca
MSc Student,
Department of Computer Science,
University of Manitoba, Winnipeg, MB, Canada
****/
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#include <time.h>
#include "omp.h"
//macros
#define ALPHABET_LENGTH 4
#define max(... |
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
//
//===---------------------------... |
Hugefile.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
void Merge(int *a1,int n1,int *a2,int n2,int *r)
{int i1,i2,i;
for(i1=0,i2=0,i=0;i1<n1&&i2<n2;)
if(a1[i1]<a2[i2])
r[i++]=a1[i1++];
else
r[i++]=a2[i2++];
while(i1<n1)r[i++]=a1[i1++];
while(i2<n2)r[i++]=a2[i2++];
}
void MSort(int *... |
phys.c | /*---------------------------------------------------------------------------------
PHYS.C
-Compute MHD stress-energy tensor
-Obtain conserved variables and/or fluxes from primitives
-Compute Lorentz factor
-Compute 4 velocities from primitives
-Calculate components of magnetosonic velocity
-Calculate s... |
triplet.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* These codes were originally parts of spglib, but only develped */
/* and used for phono3py. Therefore these were moved from spglib to */
/* phono3py. This file is part of phonopy. */
/* Redistribution and use in source and binary forms, with or witho... |
target-28.c | extern void abort (void);
int g;
#pragma omp declare target (g)
#pragma omp declare target
int
foo (void)
{
static int s;
return ++s + g;
}
#pragma omp end declare target
int
bar (void)
{
static int s;
#pragma omp declare target to (s)
return ++s;
}
#pragma omp declare target (bar)
int
main ()
{
int r;
... |
task-taskwait-nested.c | /*
* task-taskwait-nested.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-excep... |
im2collifted.c | #include <stdlib.h>
#include "im2collifted.h"
void im2collifted(float* x,float* w,int RR,int W,int K,int B,int A,float*output){
float* tmp2 = (float*) calloc(1,(W) * (RR) * sizeof (float));
for (int H10 = 0; H10 < W; H10++) {
for (int H11 = 0; H11 < RR; H11++) {
if (H10 + H11 < K) {
tmp2[(RR) * (H10) + H11]... |
pr59669-2.c | /* PR middle-end/59669 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
#pragma omp declare simd uniform(a) aligned(a:32)
void
bar (int *a)
{
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.