source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
Trainer.h | /*
* Copyright 2016 [See AUTHORS file for list of authors]
*
* 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 require... |
schedule-clause.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
void main(int argc, char **argv) {
int i, n=16, chunk, a[n], suma=0;
if(argc<2){
fprintf(stderr,"\nFalta chunk \n");
exit(-1);
}
chunk = atoi(argv[1]);
//n = atoi(argv[2]);
for(i=0;i... |
GB_unaryop__lnot_uint16_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GB_binop__land_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... |
box_coder_op.h | /* Copyright (c) 2018 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 ag... |
miniGMG.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
smacof_helper.c | /******************************************************************************
* Copyright (c) 2015 - 2016 Philipp Schubert. *
* All rights reserved. This program and the accompanying materials are made *
* available under the terms of LICENSE.txt. *
... |
pbkdf2-hmac-md5_fmt_plug.c | /*
* This software is Copyright (c) 2015 Dhiru and magnum
* 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 permitted.
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_pbkdf2_hmac_md5;
#elif FMT_R... |
test.c | #include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
// enable tests
#define CHECK 1
#define DEBUG 0
#define N (992)
#define INIT() INIT_LOOP(N, {A[i] = 0; C[i] = 1; D[i] = i; E[i] = -i;})
int ma... |
DRACC_OMP_034_MxV_wrong_update_yes.c | /*
Matrix Vector multiplication with another thread on the host constantly updating the values of a.
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <omp.h>
#define C 512
int *a;
int *b;
int *c;
int init(){
for(int i=0; i<C; i++){
for(int j=0; j<C; j++){
b[j+i*C]=1;
... |
convolution_sgemm_packn.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
updater_basemaker-inl.h | /*!
* Copyright 2014-2022 by XGBoost 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 <rabit/rabit.h>
#include <vector>
#include <algorithm>
#inc... |
parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragma omp parallel for simd
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragma omp parallel for simd foo
void test_no_clause()... |
tree-pretty-print.c | /* Pretty formatting of GENERIC trees in C syntax.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011 Free Software Foundation, Inc.
Adapted from c-pretty-print.c by Diego Novillo <dnovillo@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or... |
GB_unop__minv_uint64_uint64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
Main.c | #include "XSbench_header.h"
#include "cudaHeader.h"
#include <limits.h>
#define ISOTOPES 130
#define ISOTOPES 355
int main( int argc, char* argv[] )
{
// =====================================================================
// Initialization & Command Line Read-In
// ===============================================... |
convolutiondepthwise_5x5_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 ... |
wino_conv_kernel_x86.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_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-2021, All Rights Reserved.
// SPDX... |
Image.h | #pragma once
#include<vector>
#include<fstream>
#include<iostream>
#include<functional>
#include<cmath>
#include<random>
#include "Vec3.h"
#include "PNG.h"
using namespace std;
// Returns the distance between the two vectors projected on the unit sphere
float projectedDistance(float x1, float y1, float x2, float y2... |
omp_taskwait.c | <ompts:test>
<ompts:testdescription>Test which checks the omp taskwait directive. First we generate a set of tasks, which set the elements of an array to a specific value. Then we do a taskwait and check if all tasks finished meaning all array elements contain the right value. Then we generate a second set setting the ... |
sgbsv.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/zgbsv.c, normal z -> s, Fri Sep 28 17:38:04 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#incl... |
GB_binop__isgt_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-... |
MRF-GCO.h | #pragma once
#include "BaseMRF.h"
#include "Log.h"
#include "GCoptimization.h"
#include <vector>
#include <map>
//#include <google/heap-profiler.h>
#include <limits.h>
#include <time.h>
#include <vector>
namespace SRS{
/** \brief
* Wrapper for Olga Vekslers Multilabel graph cut library
*/
template<class TGra... |
helpers.c | /*******************************************************************************
Collective Matrix Factorization
-------------------------------
This is a module for multi-way factorization of sparse and dense matrices
intended to be used for recommender system with explicit feedback data plus
... |
region_layer.c | #include "region_layer.h"
#include "activations.h"
#include "blas.h"
#include "box.h"
#include "dark_cuda.h"
#include "utils.h"
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#define DOABS 1
region_layer make_region_layer(int batch, int w, int h, int n, int classes, int coords, int max... |
parallelDeterminant2.c | // C program to find Deteminant of a matrix
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <omp.h>
// print matrix
void printNxNMatrix(double** matrix, int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
// printf("%f, ",matrix[i][j]);... |
1.race10.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N];
#pragma omp parallel for schedule(guided, 4)
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
A[i][j] = A[i - 1][j - 1];
}
// CHECK: Data Race detected
// END
|
matrixio.c | /// \file
/// Matrix I/O.
#include "matrixio.h"
#include <stdio.h>
#include <math.h>
#include "sparseMatrix.h"
#include "constants.h"
/// \details
/// Write out sparsity from sparse matrix.
void writeSparsePattern(char* fname, struct SparseMatrixSt* spmatrix, real_t hthresh)
{
char hrow[spmatrix->hsize];
FILE*... |
GConvolver.h | #pragma once
//#define GUITARD_CONV_THREAD_POOL
//#define GUITARD_CONV_OPENMP
#ifdef GUITARD_CONV_OPENMP
#include <omp.h>
#endif
#include "../GConfig.h"
#include "./GTypes.h"
/**
* Decide which type the convolution will use
*/
#ifndef GUITARD_FLOAT_CONVOLUTION
#define FFTCONVOLVER_TYPE guitard::sample
#else
... |
J2OrbitalSoA.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 ... |
SpVec.h | /******************************************************************************
* ** Copyright (c) 2016, Intel Corporation **
* ** All rights reserved. **
* ** ... |
client_utils.h | // Copyright (c) 2020 - present Advanced Micro Devices, Inc. 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 r... |
pr26943-1.c | /* PR c++/26943 */
/* { dg-do run } */
extern void abort (void);
extern void omp_set_dynamic (int);
int n = 6;
int
main (void)
{
int i, x = 0;
omp_set_dynamic (0);
#pragma omp parallel for num_threads (16) firstprivate (n) lastprivate (n) \
schedule (static, 1) reduction (+: x)
for (i = 0; i < 16; i++)
... |
GB_binop__isgt_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
semi_restrict.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
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 <cinttypes>
#include <fstream>
#include <functional>
#include <type_traits>
#include <utility>
#include "command_line.h"
#include "ge... |
tinyexr.h | #ifndef TINYEXR_H_
#define TINYEXR_H_
/*
Copyright (c) 2014 - 2020, Syoyo Fujita and many contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain th... |
dqp3.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @file src/backends/mpi/blrm/dqp3.c
* @version 1.3.0
* @autho... |
krb5_tgs_fmt_plug.c | /*
* Based on the work by Tim Medin
* Port from his Pythonscript to John by Michael Kramer (SySS GmbH)
*
* This software is
* Copyright (c) 2015 Michael Kramer <michael.kramer@uni-konstanz.de>,
* Copyright (c) 2015 magnum
* Copyright (c) 2016 Fist0urs <eddy.maaalou@gmail.com>
*
* Modified by Fist0urs to improv... |
task5.h | #pragma once
#include <iostream>
#include <string>
#include <random>
#include <algorithm>
#include <vector>
#include <chrono>
std::string randomString(const int& size, const int& seed)
{
std::string result;
const std::string VALID_CHARS = "a b c d e f ghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,... |
MS_Hybrid_dynamic.c | /*
MPI Dynamic Mandelbort sort
*/
#include <stdlib.h>
#include <mpi.h>
#include <X11/Xlib.h>
#include <stdio.h>
#include <omp.h>
#define data_tag 100
#define result_tag 101
#define terminate_tag 110
struct timeval tv1, tv2;
double t = 0;
typedef struct complextype
{
double real, imag;
} Compl;
int main(int ar... |
fitness.h | void calFit(Chromo *population, int N, int inicio, int fin)
{
int errores;
int k, i, j;
#pragma omp for
for (k = inicio; k < fin; k++)
{
errores = 0;
for (i = 0; i < N; i++)
{
for (j = 0; j < N; j++)
{
if (i != j)
{
... |
GB_binop__first_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
GB_binop__min_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... |
naive_math_impl.h | // Copyright (c) 2019 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... |
net_md5_fmt_plug.c | /* Cracker for RIPv2 MD5 authentication hashes.
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.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 permitted.
*
* ... |
silly-sort.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main()
{
int i, j, n = 10000;
int nthreads = 2;
// Allocate input, output and position arrays
int *in = (int *)calloc(n, sizeof(int));
int *out = (int *)calloc(n, sizeof(int));
int **pos = (int **)calloc(nthreads, sizeof(int *));
// Ini... |
shear.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
DRB038-truedepseconddimension-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
GB_unop__one_int16_int16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
KadabraBetweenness.h | /*
* KadabraBetweenness.h
*
* Created on: 18.07.2018
* Author: Eugenio Angriman, Alexander van der Grinten
*/
#ifndef KADABRA_H_
#define KADABRA_H_
#include <atomic>
#include "../auxiliary/SortedList.h"
#include "../base/Algorithm.h"
#include "../components/ConnectedComponents.h"
#include "../graph/Graph.h"
... |
bml_import_ellpack_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_allocate.h"
#include "../bml_logger.h"
#include "../bml_types.h"
#include "bml_allocate_ellpack.h"
#include "bml_import_ellpack.h"
#include "bml_types_ellpack.h"
#include <complex.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#ifdef _O... |
multigrid_par.c | /**
* A parallel multigrid program for solving partial differential equations.
*
* Authors: Lucas Villarroel, Erik Hanstad
* Language: C using the OpenMP API
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#define MAX_ITERATIONS 100000000
#define MAX_SIZE 10000
#define MAX_WORKERS 4
#d... |
omp_reduce.c | /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... |
dropout_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... |
taskloop_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}}
#pragma omp taskloop simd
// expected-error@+1 {{unexpected Ope... |
declare_reduction_ast_print.c | // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -fopenmp-simd -emit-pch... |
image.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/image.c"
#else
#undef MAX
#define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
#undef MIN
#define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
#undef TAPI
#define TAPI __declspec(dllimport)
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#undef temp_t
#if defined(TH_... |
nr_direct.c | /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... |
GB_binop__isle_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-... |
GB_binop__first_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... |
omp_device_memory.c | // RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda
// REQUIRES: nvptx64-nvidia-cuda
#include <omp.h>
#include <stdio.h>
int main() {
const int N = 64;
int *device_ptr =
omp_alloc(N * sizeof(int), llvm_omp_target_device_mem_alloc);
#pragma omp target teams distribute parallel for is_device_ptr... |
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 ... |
RayleighMixtureSummedAreaTableCFAR.h | #pragma once
#include <iostream>
#include <opencv2\opencv.hpp>
#include "TileManager.h"
#include "SummedAreaTableTargetDetector.h"
#include "TargetDetectorConsoleLogger.h"
#include "targetDetectors\AbstractCFAR.h"
using namespace std;
using namespace cv;
class RayleighMixtureSummedAreaTableCFAR : publ... |
guide.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
float gaussian(float x, float y, float v, float k, float c)
{
return 1-v + v*k*exp(-(x*x+y*y)/(2*c*c));
}
//unsigned char *forward_warping(const void *src, const void *idx, const void *idy, const void *z, int h, int w)
void build_guide(const void *flow_x, cons... |
Dijkstra.c | // OpenMP example program: Dijkstra shortest-path finder in a
// bidirectional graph
// serves as a tutorial to OpenMP; see notes in comments at the end of
// the file
// each thread handles one chunk of vertices
// usage: dijkstra
#include <stdio.h>
#define LARGEINT 2<<30-1 // "infinity"
#define NV 6
// glob... |
gt.mapset.c | /*
* PROJECT: GEM-Tools library
* FILE: gt.mapset.c
* DATE: 08/11/2012
* AUTHOR(S): Santiago Marco-Sola <santiagomsola@gmail.com>
* DESCRIPTION: Utility to perform set operations {UNION,INTERSECTION,DIFFERENCE} over alignment files {MAP,SAM}
*/
#include <getopt.h>
#ifdef HAVE_OPENMP
#include <omp.h>
#endif
#inc... |
GB_binop__band_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-... |
hipc.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <sys/time.h>
inline void scanint(int *x)
{
register char c = getchar_unlocked();
*x = 0;
for(; (c<48)||(c>57);c = getchar_unlocked());
for(; (c>47)&&(c<58);c = getchar_unlocked())
*x = (int)((((*x)<<1) + ((*x)<<3)) + c -... |
52be1f6a69174a0f7f7a7579802eab93d6429221.c | #define _POSIX_C_SOURCE 200809L
#include "stdlib.h"
#include "math.h"
#include "sys/time.h"
#include "omp.h"
struct dataobj
{
void *restrict data;
int * size;
int * npsize;
int * dsize;
int * hsize;
int * hofs;
int * oofs;
} ;
struct profiler
{
double section0;
} ;
int padfunc(struct dataobj *restri... |
RPN.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
#include "grb2.h"
#include "wgrib2.h"
#include "fnlist.h"
/*
* RPN reversed polish notation
*
* 4/2009 Public Domain by Wesley Ebisuzaki
*
* operations:
*
* + - * /
* == != < <= > >=
*
* sqrt, sq, abs, 1... |
_kdtree_core.c | /*
pykdtree, Fast kd-tree implementation with OpenMP-enabled queries
Copyright (C) 2013 - present Esben S. Nielsen
This program 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 Lic... |
critical.c | #include <omp.h>
#include <stdio.h>
main()
{
int x;
x = 0;
#pragma omp parallel shared(x)
{
#pragma omp critical
x = x + 1;
} /* end of parallel section */
printf("x = %d \n", x);
}
|
gemm_blis.c | /**
* This file is part of convGemm
*
* Copyright (C) 2021-22 Universitat Politècnica de València and
* Universitat Jaume I
*
* 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 ... |
copyin-1.c | /* { dg-do run } */
/* { dg-require-effective-target tls_runtime } */
#include <omp.h>
#include <stdlib.h>
int thr = 32;
#pragma omp threadprivate (thr)
int
main (void)
{
int l = 0;
omp_set_dynamic (0);
omp_set_num_threads (6);
#pragma omp parallel copyin (thr) reduction (||:l)
{
l = thr != 32;
thr... |
GB_unop__isnan_bool_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
SumaVectoresC-parallel.c | /*Para compilar usar (-lrt: real time library):
gcc -O2 SumaVectores.c -o SumaVectores -lrt
Para ejecutar use: SumaVectoresC longitud
*/
#include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free()
#include <stdio.h> // biblioteca donde se encuentra la función printf()
#include <time.h> // biblioteca donde... |
utils.h | #ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
#include "pixman-private.h" /* For 'inline' definition */
#include "utils-prng.h"
#if defined(_MSC_VER)
#define snprintf _snprintf
#define strcasecmp _stricmp
#endif
#define ARRAY_LENGTH(A) ((int) (sizeof (A) / sizeof ((A) [0])))
/* A primitive pse... |
7316.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... |
GB_unop__identity_int16_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... |
Helm3dkaczswp_mex.c | #include <stdlib.h> /* for getenv */
#include <stddef.h> /* for size_t type */
#include <string.h> /* for memcpy */
#include <omp.h>
#include "math.h"
#include "mex.h"
#include "matrix.h"
#include <assert.h>
#include "Helm3d_27pt.h"
#ifdef DERIV
#undef DERIV
#endif
/*
*
* 27pt stencil Helmholtz matrix-vector produ... |
conv3x3s1_winograd64_neon5_AoA.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_unaryop__lnot_uint16_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
pooling2x2s2_max_neon.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 ... |
perfect_number_stubs.c | /* vim: set ft=c sw=2 ts=2: */
/* perfect_number_stubs.c
* code stubs for perfect number calculation in C
* to be called by OCaml */
#include <stdio.h>
#include <caml/alloc.h>
#include <caml/memory.h>
#include <caml/mlvalues.h>
/** c implementation of perfect number predicate */
int is_perfect(int n) {
int sum ... |
GB_unaryop__identity_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... |
matrix.c |
void normalize_evectors(double complex *evecs);
void reigenvalues(double complex *A, double complex *Q, double complex *evals, double complex *evecs, int nA, int generalized)
{
/* Computes the eigenvalues and right eigenvectors of the complex matrix A which is NxN.
A . evecs = evals Q . evecs
This is essentially a ... |
matVec-mpi.c | # include <math.h>
#ifdef USE_MPI
# include <mpi.h>
#endif
# include <stdio.h>
# include <stdlib.h>
# include <time.h>
//#ifdef _OPENMP
# include "omp.h"
//#endif
int main ( int argc, char *argv[] );
void timestamp ( );
/******************************************************************************/
int main ( int... |
tinyexr.h | /*
Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this l... |
openmp-ex05.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
int main(void)
{
int orig_num_threads, orig_my_thread;
orig_num_threads = omp_get_num_threads();
orig_my_thread = omp_get_thread_num();
printf ("\"You're all individuals!\" said %d of %d.\n", orig_my_thread, orig_num_threads);
#pragma omp parallel
{... |
blake2sp-ref.c | /*
BLAKE2 reference source code package - reference C implementations
Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
your option. The terms of these licenses can be found at:
- CC0 1.0 Univers... |
GB_unaryop__minv_fp32_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
main.c | #include <stdio.h>
#include <omp.h>
int main () {
int numberOfThreads, threadID;
printf("Setting a fixed number of threads. In this case 8\n");
omp_set_num_threads(8);
numberOfThreads = omp_get_num_threads();
printf("The total number of threads is %d\n", numberOfThreads);
#pragma ... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
atomic-1.c | /* { dg-do run } */
/* { dg-options "-O2 -fopenmp" } */
/* { dg-options "-O2 -fopenmp -march=pentium" { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -fopenmp" { target lp64 } } */
#ifdef __i386__
#include "../../../gcc/testsuite/gcc.dg/i386-cpuid.h"
#define bit_CX8 (1 << 8)
#endif
extern void abort (void);
... |
3d25pt.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-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
CPULauncher.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
drhook.c | /**
* (C) Copyright 2014- ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an in... |
GB_binop__rminus_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-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.