source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_unop__log1p_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... |
GB_unop__identity_int32_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... |
tree.h | #ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/meta.h>
#include <LightGBM/dataset.h>
#include <string>
#include <vector>
#include <memory>
namespace LightGBM {
#define kMaxTreeOutput (100)
#define kCategoricalMask (1)
#define kDefaultLeftMask (2)
/*!
* \brief Tree model
*/
class Tree {
public... |
compare.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
VolumetricAdaptiveAveragePooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricAdaptiveAveragePooling.c"
#else
#define START_IND(a,b,c) (int)floor((float)(a * c) / b)
#define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b)
// #define START_IND(a,b,c) a * c / b
// #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b > 0)?... |
GB_unaryop__minv_int16_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
sapG_fmt_plug.c | /*
* this is a SAP PASSCODE (CODEVN G) plugin for john the ripper.
* tested on linux/x86 only, rest is up to you.. at least, someone did the reversing :-)
*
* please note: this code is in a "works for me"-state, feel free to modify/speed up/clean/whatever it...
*
* (c) x7d8 sap loverz, public domain, btw
* cheer... |
BaseDetector.h | #pragma once
#include <memory>
#include "defines.h"
///
/// \brief The BaseDetector class
///
class BaseDetector
{
public:
///
/// \brief BaseDetector
/// \param frame
///
BaseDetector(const cv::UMat& frame)
{
m_minObjectSize.width = std::max(5, frame.cols / 100);
m_minObjectSi... |
ompsimple.c | int myomp;
#pragma omp threadprivate(myomp)
int main1() {
#pragma omp parallel
{
myomp = 1;
/* printf("Thread x= %d\n", myomp); */
}
return 0;
}
|
interop.c | // RUN: %libomptarget-compile-run-and-check-generic
// REQUIRES: nvptx64-nvidia-cuda
#include <assert.h>
#include <omp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
typedef void *cudaStream_t;
int main() {
int device_id = omp_get_default_device();
#pragma omp parallel master
{
double D0, D... |
pkzip_fmt_plug.c | /*
* PKZIP patch for john to handle 'old' pkzip passwords (old 'native' format)
*
* Written by Jim Fougeron <jfoug at cox.net> in 2011. No copyright
* is claimed, and the software is hereby placed in the public domain.
* In case this attempt to disclaim copyright and place the software in the
* public domain is ... |
pooling_sse_x86.h | #include <emmintrin.h>
#include <stdio.h>
#include <assert.h>
#include "pooling_param.h"
#define POOL_GENERIC 0
#define POOL_K2S2 1
#define POOL_K3S2 2
#define POOL_K3S1 3
typedef void (*pooling_kernel_t)(const void* input, void* output, int inc, int inh, int inw, int outh, int outw, int,
... |
omp_parallel_firstprivate.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <stdlib.h>
#include "omp_testsuite.h"
//static int sum1 = 789;
int test_omp_parallel_firstprivate()
{
int sum, num_threads,sum1;
int known_sum;
sum = 0;
sum1=7;
num_threads = 0;
#pragma omp parallel firstprivate(sum1)
{
/*printf("sum1=%d\... |
tsne_random_walks_inl.h | /*
*
* Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above ... |
GB_unop__identity_bool_bool.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... |
test.c | #include <stdlib.h>
#include <stdio.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define N 100
#define TEST_BROKEN 0 /* disable tests reardless of value below */
#define TEST1 1
#define TEST1 1
#define TEST2 1
#define TEST3 1
#define TEST4 1
#define TEST5 1
#define TEST6 1
#define T... |
GB_binop__isle_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
CalcFolderSize.c | #include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
int isFile(char *path);
int isDir(char *path);
long long fileSize(char *path);
void concatPath(char *dest, char *p, char *fn);
long long newDir(char *path);
... |
relu.c | #include <omp.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
void print(const float *x, const int len)
{
assert(x && len>0);
for(int idx=0; idx<len; ++idx)
{
printf("%.2f ", (float)x[idx]);
}
printf("\n");
return;
}
float *relu(float *x, const int len... |
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>
//
// Eigen 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 Soft... |
GB_unaryop__lnot_int16_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... |
example.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
int nthreads, tid;
/* Fork a team of threads giving them their own copies of variables */
#pragma omp parallel private(nthreads, tid)
{
/* Obtain thread number */
tid = omp_get_thread_num();
... |
hello-omp.c | #include <omp.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
void main (){
#pragma omp parallel
{
int thread_id =omp_get_thread_num();
char* hostname = (char*) malloc(256*sizeof(char));
gethostname(hostname,256*sizeof(char));
printf("Hello world from thread %d on node %s\n",thread_id,hostname... |
otfft_avxdit8omp.h | // Copyright (c) 2015, OK おじさん(岡久卓也)
// Copyright (c) 2015, OK Ojisan(Takuya OKAHISA)
// Copyright (c) 2017 to the present, DEWETRON GmbH
// OTFFT Implementation Version 9.5
// based on Stockham FFT algorithm
// from OK Ojisan(Takuya OKAHISA), source: http://www.moon.sannet.ne.jp/okahisa/stockham/stockham.html
#pragma... |
is.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - IS
This benchmark is an OpenMP C version of the NPB IS code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS... |
thread.h | #ifndef __thread_h__
#define __thread_h__
#define THREAD_QUEUE_SIZE 1024
inline void add_to_queue(int* thread_queue, int& thread_queue_size,
int* queue_next, int& queue_size_next, int vert);
inline void empty_queue(int* thread_queue, int& thread_queue_size,
int* queu... |
normalize_cpu.h | // Copyright (c) 2020, NVIDIA CORPORATION. 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 ... |
4530.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... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) >... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "omp.h"
#include "aux.h"
int sequential_reduction(int *x, int n);
int parallel_reduction(int *x, int n);
int main(int argc, char **argv){
int n, i, result;
long t_start, t_end;
int *x;
// Command line argument: array l... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
pre_utilities.h | #ifndef PRE_UTILITES_H
#define PRE_UTILITES_H
/* System includes */
#include <limits>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <stdlib.h>
#include <time.h>
#include <string>
/* External includes */
#ifdef _OPENMP
#include <omp.h>
#endif
/* Project includes */
#include "inc... |
seeta_aip_affine.h | //
// Created by kier on 2020/11/14.
//
#ifndef SEETA_AIP_SEETA_AIP_AFFINE_H
#define SEETA_AIP_SEETA_AIP_AFFINE_H
#include "seeta_aip_graphics2d.h"
#include "seeta_aip_struct.h"
#include <iostream>
namespace seeta {
namespace aip {
namespace _ {
/*
* +-+-+
* |0|1|
... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__identity_uint64_uint16.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... |
segment.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
CSR_impl.h | #pragma once
#include <Benchmarks/SpMV/ReferenceFormats/Legacy/CSR.h>
#include <TNL/Containers/VectorView.h>
#include <TNL/Algorithms/scan.h>
#include <TNL/Math.h>
#include <TNL/Algorithms/AtomicOperations.h>
#include <TNL/Exceptions/NotImplementedError.h>
#include <TNL/Atomic.h>
#include <vector> // for blocks in CSR... |
9500.c |
/*
* Compile using the command:
* `cc 27Stencil.c -o oa -fopenmp -lm`
*/
#include <math.h>
#include <omp.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENACC
#include <openacc.h>
#endif
#define DEFAULT_DATASIZE 1048576 /* Default datasize. */
#define DEFAULT_REPS 10 ... |
cofold.c | /*
* minimum free energy
* RNA secondary structure prediction
*
* c Ivo Hofacker, Chrisoph Flamm
* original implementation by
* Walter Fontana
*
* Vienna RNA package
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#i... |
SimulatorBase.h | /*
Menge Crowd Simulation Framework
Copyright and trademark 2012-17 University of North Carolina at Chapel Hill
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/licen... |
ordering_op-inl.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_binop__eq_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... |
mandel_omp_nox_dynamic_512.c | /* Sequential Mandlebrot program */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <omp.h>
#include <time.h>
#define X_RESN 1000 /* x resolution */
#define Y_RESN 1000 /* y resolution */
#define MAX_ITER (2000)
// ref: https://stackoverflow.com/questions/6749621/how-to-create-a... |
omp-loop-invert.c |
/*****************************************************************************
Example : omp-loop-invert.c
Objective : Write an OpenMP Program to demonstrate Performance improvement
by doing the loop inverting.
Input : a) Num... |
GB_unaryop__abs_fp32_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
evolve.c | /**
@file evolve.c
@brief This file contains all the core VPLANET integration routines including the
timestepping algorithm and the Runge-Kutta Integration scheme.
@author Rory Barnes ([RoryBarnes](https://github.com/RoryBarnes/))
@date May 2014
*/
#define NUM_THREADS 4
#include "vplanet.h"
void ... |
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... |
quicksort.c | /*
* quicksort.c: Example of QucikSort in OpenMP.
*
* (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com>
*/
/*Многопоточная программа, реализующая алгоритм быстрой сортировки.
Входными данными для программы является неотсортированный числовой массив a,
заполненный случайными значениями. Результат выполнения программы ... |
9a2cf_so4.c | #define _POSIX_C_SOURCE 200809L
#include "stdlib.h"
#include "math.h"
#include "sys/time.h"
#include "xmmintrin.h"
#include "pmmintrin.h"
#include <stdio.h>
#include "omp.h"
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
struct dataobj
{
void *restrict data;
int *size;
in... |
blocked.c | //
// blocked.c
//
// Created by Hussian Alamri on April 2013
//
#include "blocked.h"
/******* BCRS functions *******/
int countBlocks(MATRIX* my_m) {
int i, j, nblocks = 0;
int nrows = my_m->nrows;
int ncols = my_m->ncols;
double** mal = my_m->mel;
for (i = 0; i < nrows; ++i) {
... |
GB_dense_subassign_05d_template.c | //------------------------------------------------------------------------------
// GB_dense_subassign_05d_template: C<M> = x where C is as-if-full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
sections.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
#pragma omp parallel sections num_threads(2)
{
#pragma omp section
{
printf("%uld: section 1\n", ompt_get_thread_data()->value);
}
#pragma omp section
{
printf("%uld:... |
randFeature.c | #include <math.h>
#include <time.h>
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include "ReadLibSVM.h"
#include "WriteLibSVM.h"
#include "Feature_matrix.h"
#include "Random.h"
typedef enum { Gaussian, Laplace, ProdLaplace } KERNEL;
int main(int argc, char* argv[])... |
generator_gemm_common.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
GB_unop__round_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
GB_add_phase0.c | //------------------------------------------------------------------------------
// GB_add_phase0: find vectors of C to compute for C=A+B or C<M>=A+B
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
updateSwap.c | int main() {
int A = 10;
int B;
B = A;
B = B + A;
/*
* Testing no-swap for shared update.
*/
int C = 10;
int D;
D = C;
int X = D;
#pragma omp parallel
{
#pragma omp atomic
D = D + 1;
}
/*
* Testing swap for private update.
*/
int Y = 10;
int Z;
Z = Y;
#pragma omp parallel
{
int C1 = 10;
in... |
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) ... |
opencl_gpg_fmt_plug.c | /*
* Modified by Dhiru Kholia <dhiru at openwall.com> for GPG format.
*
* This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net>
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without
* modification, are per... |
c-tree.h | /* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of t... |
3d7pt_var.c | /*
* Order-1, 3D 7 point stencil with variable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#... |
omptl_algorithm.h | // Copyright (C) 2006 Fokko Beekhof
// Email contact: Fokko.Beekhof@cui.unige.ch
// The OMPTL library 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 2.1 of the License, or (at your... |
GB_binop__minus_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... |
SPH.c | #include "SPH.h"
void initSPH( SPH *_sph )
{
clearVec3( &_sph->gravity );
_sph->gravity.y = SPH_GRAVITY;
_sph->time = 0;
_sph->nt = 0;
_sph->num_particles = 0;
}
void loadSPHParameters( char *_filename, SPH *_sph )
{
FILE *file;
char buf[256];
if( (file=fopen( _filename, "r" ) ) != NULL ){
w... |
GB_unop__minv_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
BMSimFit.h | //! BMSimFit.h
/*!
Contains derived classed for fit and simulation
Author: Kai Herz <kai.herz@tuebingen.mpg.de>
Copyright 2021 Kai Herz
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 r... |
phantom_monte_carlo.h | #pragma once
#include <random>
#include <functional>
namespace Common {
/// Executes Monte-Carlo for given \c Phantom and \c Detector classes
////
/// This is wrapper class that executes Monte-Carlo on abstract \c Phantom that
/// has to implement \c gen_event and \c Detector that has to implement \c
/// exact_detec... |
omp-num-thread.c |
#include <stdio.h>
#include <omp.h>
int main()
{
printf("from main, MNT = %d\n", omp_get_max_threads());
#pragma omp parallel
{
printf("NT = %d\n", omp_get_max_threads());
}
return 0;
}
|
target_teams_distribute_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}}
#pragma omp target teams distribute simd
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp targe... |
GB_unop__cos_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
GB_unop__identity_uint64_fc64.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... |
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... |
copyprivate-clauseModificado.c | #include <stdio.h>
#include <omp.h>
int main() {
int n = 9, i, b[n];
for (i=0; i<n; i++)
b[i] = -1;
#pragma omp parallel
{
int a;
#pragma omp single
{
printf("\nIntroduce valor de inicialización a: ");
scanf("%d", &a );
printf("\nSingle ejecutada por el thread %d\n",omp_get_thread_n... |
GB_binop__isne_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... |
a.16.1.c | /* { dg-do run } */
#include <stdio.h>
float
work1 (int i)
{
return 1.0 * i;
}
float
work2 (int i)
{
return 2.0 * i;
}
void
a16 (float *x, float *y, int *index, int n)
{
int i;
#pragma omp parallel for shared(x, y, index, n)
for (i = 0; i < n; i++)
{
#pragma omp atomic
x[index[i]] += work1 (i);
... |
partition.c | #include "alphasparse/util.h"
#include "alphasparse/opt.h"
#include <math.h>
#include <limits.h>
#include <stdint.h>
void find_divisors(ALPHA_INT n, ALPHA_INT *divisors, ALPHA_INT *num)
{
ALPHA_INT count = 0;
for (ALPHA_INT i = 1; i <= n; ++i)
{
if (n % i == 0)
{
divisors[count+... |
mandelcpu.c |
#include "mandelmain.h"
void mandelbrotCPU(struct RenderSettings rs) {
double x1 = rs.xoffset - 2.0 / rs.zoom * rs.width / rs.height;
double x2 = rs.xoffset + 2.0 / rs.zoom * rs.width / rs.height;
double y1 = rs.yoffset + 2.0 / rs.zoom;
double pixel_pitch = (x2 - x1) / rs.width;
#pragma omp paralle... |
parallel-simple.c | /*
Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze
(joachim.protze@tu-dresden.de), Jonas Hahnfeld
(hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir
Rakamaric, Dong H. A... |
temporal_variance_method.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Suneth Warnakulasuriya (https://github.com/suneth... |
_regridmodule.c | #include <Python.h>
#include "numpy/ndarrayobject.h"
#include <stdbool.h>
static PyObject *
PyACME_apply_weights_masked(PyObject *self,PyObject *args)
{
PyObject *row_obj,*col_obj,*S_obj,*data_obj;
PyArrayObject *row=NULL,*col=NULL,*S=NULL,*dest_field=NULL,*data=NULL;
double *S_vals;
int *row_vals,*col_vals;... |
GB_binop__iseq_fc64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
MatrixMN.h | /////////////////////////////////////////////////////////////////////////////
// Authored by Jeong-Mo Hong for CSE4060 course at Dongguk University CSE //
// jeongmo.hong@gmail.com //
// Do whatever you want license. //
////////... |
Fig_4.6_piparCSPMD1.c | #include <stdio.h>
#include <omp.h>
#define NTHREADS 4
static long num_steps = 100000000;
double step;
int main()
{
int i, j, actual_nthreads;
double pi, start_time, run_time;
double sum[NTHREADS] = {0.0};
step = 1.0 / (double) num_steps;
omp_set_num_threads(NTHREADS);
start_time = omp_get_wtime(... |
integral_omp_for.c | // Author: Fabio Rodrigues Pereira
// E-mail: fabior@uio.no
// compiling & running
// clang -Xpreprocessor -fopenmp integral_omp_for.c -lomp
// ./a.out
// SPMD technique *video11&12
#include <stdlib.h> // rand, malloc, calloc and free.
#include <stdio.h> // printf
#include <math.h>
#include <time.h>
#include <omp.h... |
fixed_version.c | #include<stdio.h>
int main(){
int sum = 1;
int i =1;
// increase sum by one each iteratiob using openmp
#pragma omp parallel for firstprivate(i) reduction( + : sum )
for (i = i; i < 10; i++) {
sum +=1;
}
}
|
volumeramsubset.h | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2013-2020 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
4-4t.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i;
omp_set_num_threads(4);
#pragma omp parallel for
for (i=0; i<16; i++)
{
printf("Hello from thread number: %d Iteration: %d \n",
omp_get_thread_num(), i);
}
printf("\n GoodBye – Team Destroyed – Exiting Program \n... |
scoreing_matrix.h | #ifndef SCOREING_MATRIX_H_
#define SCOREING_MATRIX_H_
#include "global_parameters.h"
#include "PtoHSP.h"
typedef std::pair<int, int> pair_type;
class int_pair{ //interaction pairs. Each entry is a pair record.
public:
int p1_id;
int p2_id;
float score;
char flag; //'n': neg; 'p': pos
int_pair(int a, int b, floa... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
stream.c | /*-----------------------------------------------------------------------*/
/* Program: STREAM */
/* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */
/* Original code developed by John D. McCalpin */
/* Programm... |
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
//
//... |
HardTanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/HardTanh.c"
#else
void THNN_(HardTanh_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output,
accreal min_val_,
accreal max_val_,
bool inplace)
{
real min_val = TH_CONVERT_ACCREAL_TO_REAL(... |
sse.h | /* SPDX-License-Identifier: MIT
*
* 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, copy,
* modify, merge, publish, ... |
integral_loop2.c | #include<stdio.h>
#include<omp.h>
static long num_steps = 100000;
double step;
int main(){
int i;
double pi, sum = 0.0, init_time, finish_time;
step = 1.0 / (double)num_steps;
init_time = omp_get_wtime();
#pragma omp parallel
{
double x;
#pragma omp for reduction(+: sum)
for (i=0; i<num_steps; 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... |
GB_unop__cosh_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
omp_false_sharing2.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#define NUM_THREADS 4
#define ITER_LOOP 400000000
int t0_sum_mod2, t1_sum_mod2, t2_sum_mod2, t3_sum_mod2;
int t0_sum_mod3, t1_sum_mod3, t2_sum_mod3, t3_sum_mod3;
int count_sheep(int, int *, int *);
#define COUNT_SHEEP(t_idx) count_sheep(t_idx... |
sicm_low.c | #include "sicm_low.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <numa.h>
#include <numaif.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/mman.h>
// https://www.mail-archive.com/devel@lists.o... |
pr26943-4.c | /* PR c++/26943 */
/* { dg-do run } */
extern int omp_set_dynamic (int);
extern int omp_get_thread_num (void);
extern void abort (void);
int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0;
char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d";
volatile int k;
int
main (void)
{
int i;
omp_set_dynamic (0);
omp_se... |
task3.c | #include <math.h>
#include <string.h>
#include "timer.h"
#define NN 1024
#define NM 1024
float A[NN][NM];
float Anew[NN][NM];
int main(int argc, char** argv)
{
const int n = NN;
const int m = NM;
const int iter_max = 1000;
const double tol = 1.0e-6;
double error = 1.0;
memset(A,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.