source
stringlengths
3
92
c
stringlengths
26
2.25M
omp5.c
#include<stdio.h> #define N 5000 int m[N][N], s[N]; int main() { int i, j, sum; #pragma omp parallel for for (i = 0; i < N; i++) { sum = 0; for (j = 0; j < N; j++) { m[i][j] = i + j; sum += m[i][j]; } s[i] = sum; } for (i = 0; i < N; ++i) printf("%d %d\n", i, s[i]); return 0;...
omp_mm.c
/****************************************************************************** * FILE: omp_mm.c * DESCRIPTION: * OpenMp Example - Matrix Multiply - C Version * Demonstrates a matrix multiply using OpenMP. Threads share row iterations * according to a predefined chunk size. * AUTHOR: Blaise Barney * LAST REVISE...
detector.c
#include "darknet.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; void train_detector(char *datacfg, cha...
mbs_dirdyna_walkman_robotran.c
// //------------------------------------------------------------- // // ROBOTRAN - Version 6.6 (build : february 22, 2008) // // Copyright // Universite catholique de Louvain // Departement de Mecanique // Unite de Production Mecanique et Machines // 2, Place du Levant // 1348 Louvain-la-Neuve // http://www.robo...
GB_binop__plus_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__bget_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-...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dia.h
#ifndef __DIA_H #define __DIA_H #include <algorithm> #include "complex_ops.h" #include "utils.h" #include "numpy/ndarraytypes.h" template<typename I, typename T1, typename T2,typename T3> void dia_matvec_noomp_contig(const bool overwrite_y, const I n_row, const I ...
ft_ao.c
#include <stdlib.h> #include <complex.h> #define NCTRMAX 72 static void shift_bas(double *xyz, int *ptr_coords, double *L, int nxyz, double *env) { int i, p; for (i = 0; i < nxyz; i++) { p = ptr_coords[i]; env[p+0] = xyz[i*3+0] + L[0]; env[p+1] = ...
task-dependency.c
/* * task-dependency.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-exception /...
GB_unaryop__ainv_fp64_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
openmp.c
#include <stdio.h> #include <omp.h> // export OMP_NUM_THREADS=400 int main(int argc, char const *argv[]) { int tid; int gid = 1; #pragma omp parallel private(tid) shared(gid) { tid = omp_get_thread_num(); gid = tid; printf("Hello world %d %d\n", tid, gid); } return 0; }
task_late_fulfill.c
// RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' \ // RUN: %libomp-run | %sort-threads | FileCheck %s // Checked gcc 10.1 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10 // clang supports detach clause since version 11. /...
recon3d.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <sys/time.h> #include <string.h> #include <omp.h> #include "mbir_ct.h" #include "MBIRModularDefs.h" #include "MBIRModularUtils.h" #include "allocate.h" #include "icd3d.h" #include "heap.h" #include "A_comp.h" #include "initialize.h" #...
soma_clustering.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // 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. // // See the LICENSE file distrib...
Fig_6.3_sharedEx.c
// sample compile command: "gcc -fopenmp -c Fig_6.3_sharedEx.c" to generate *.o object file #include <omp.h> #include <stdio.h> extern void initialize(int*, int*, int*); int main () { int A, B, C; initialize(&A, &B, &C); //remember the value of A before the parallel region printf("A before = %d\...
subopt.c
/* * suboptimal folding - Stefan Wuchty, Walter Fontana & Ivo Hofacker * * Vienna RNA package */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <ctype.h> #include <string.h> #include <math.h> #include "ViennaRNA/fold.h" #incl...
openmp-ex23.c
#include <stdio.h> #include <unistd.h> int main(void) { #pragma omp parallel { int i; char wait[BUFSIZ] = {'\0'}; /* Unless we tell threads not to wait when they're done */ #pragma omp for nowait for (i = 0; i < 4; i++) { int j; for (j = 0; j < 4 * i; j++) wait[j] = ' '; sleep...
repeat_base.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2018, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
omp-spawn-n-tasks.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]) { if(argc != 2) { fprintf(stderr, "Usage: %s nTasks\n", argv[0]); exit(EXIT_FAILURE); } int nTasks = atoi(argv[1]); #pragma omp parallel #pragma omp single nowait #...
GrB_Matrix_wait.c
//------------------------------------------------------------------------------ // GrB_Matrix_wait: wait for a matrix to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier:...
simple.c
/* This code is part of this project: Donato E, Ouyang M, * Peguero-Isalguez C. Triangle counting with a multi-core computer. * Proceedings of IEEE High Performance Extreme Computing Conference * (HPEC), 2018, 1-7. * * Copyright (c) 2018 Ming Ouyang * * Permission is hereby granted, free of charge, to any perso...
if-clause-Modificado.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char **argv) { int i, n=20, tid,num_threads; int a[n],suma=0,sumalocal; if(argc < 3) { fprintf(stderr,"[ERROR]-Falta iteraciones\n"); exit(-1); } n = atoi(argv[1]); if (n>20) n=20; num_threads = atoi(argv[2]); for (i=0; i<n; i++) { ...
fixed_size_vector.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & Newcastle University for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
multi_thread_main.c
/*************************************************************************/ /* */ /* Language Technologies Institute */ /* Carnegie Mellon University */ /* ...
DRB012-minusminus-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...
Accessor.h
//=== libompx/Accessor.h - Accessor class definition ----*- C++ -*-===// // // Part of the OMP-UL Project, under the MIT License. // See libompx/LICENSE.txt for license information // //===-------------------------------------------------------------===// /// /// \file /// This file contains the declaration of the Acce...
GB_unop__sqrt_fp64_fp64.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...
create_from_mesh.h
// Copyright (c) 2017, The OctNet authors // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright // notice, this list of ...
GB_unop__abs_uint16_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
6.norace1.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s // XFAIL: * // Taken from ompVerify, Fig. 3 #include <omp.h> #define N 20 int main() { int A[N][N]; int p1, p2, temp; #pragma omp parallel private(p1, p2, temp) { #pragma omp for for (p1 = 0; p1 < N; p1++) #pragma omp parallel for for (p2 = 0;...
omptests2.c
#pragma omp requires unified_shared_memory /// This could create a conflicting .omp_offloading.entry void test_comp_unit_2(const int niters, double* a) { #pragma omp target for(int ii = 0; ii < niters; ++ii) a[ii] *= 2.0; }
gsrb.omptask.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
shared-clause.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main() { int i, n = 7; int a[n]; for (i=0; i<n; i++) a[i] = i+1; #pragma omp parallel for shared(a) 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...
TM_to_I8.c
//START_INCLUDES #include "q_incs.h" //STOP_INCLUDES #include "TM_to_I8.h" //START_FUNC_DECL int TM_to_I8( struct tm *inv, uint64_t n_in, int64_t * outv ) //STOP_FUNC_DECL { int status = 0; if ( inv == NULL ) { go_BYE(-1); } if ( outv == NULL ) { go_BYE(-1); } if ( n_in == 0 ) { go_BYE(...
Example_device.2.c
/* * @@name: device.2c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ #include <omp.h> extern void init(float *, float *, int); extern void output(float *, int); void vec_mult(float *p, float *v1, float *v2, int N) { int i; init(v1, v2, N); int ndev = omp_get_num_d...
atomic-21.c
/* { dg-do compile } */ /* { dg-additional-options "-fdump-tree-original" } */ /* { dg-final { scan-tree-dump-times "omp atomic release" 4 "original" } } */ /* { dg-final { scan-tree-dump-times "omp atomic read acquire" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "omp atomic capture acq_rel" 1 "original" }...
tov_interp.h
// This C header file reads a TOV solution from data file and performs // 1D interpolation of the solution to a desired radius. // Author: Zachariah B. Etienne // zachetie **at** gmail **dot* com #include "stdio.h" #include "stdlib.h" #include "math.h" #include "string.h" #define REAL double //#define ST...
cachedDBM.h
/* @copyright Russell Standish 2000-2013 @author Russell Standish This file is part of EcoLab Open source licensed under the MIT license. See LICENSE for details. */ /**\file \brief persistent hashmap */ #ifndef CACHEDBM_H #define CACHEDBM_H #include "pack_base.h" #include "classdesc_access.h" //#include "p...
blake2sp.c
/* BLAKE2 reference source code package - optimized 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...
Efficient_RANSAC.h
// Copyright (c) 2015 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // You can redistribute it and/or modify it under the terms of the GNU // General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your op...
papiwrapperutil.h
#ifndef PAPIWRAPPERUTIL #define PAPIWRAPPERUTIL #ifndef NOPAPIW #include <stdlib.h> #include <stdio.h> #include <vector> #include <iostream> #include <algorithm> #include <papi.h> #include <omp.h> #include <pthread.h> /** * PapiWrapper abstract class * * This interface defines the public interface and provides de...
rose_jacobi_seq.c
/* An example code * * */ #include <stdio.h> #include <math.h> #include <omp.h> void driver(); void initialize(); void jacobi(); void error_check(); #define MSIZE 200 int n; int m; int mits; double tol; double relax = 1.0; double alpha = 0.0543; double u[200][200]; double f[200][200]; double uold[200][200]; double ...
GB_unop__identity_int32_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...
wpapsk_fmt_plug.c
/* * This software is Copyright (c) 2012 Lukas Odzioba <ukasz at openwall dot 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 permitted. * * Code is based on Aircrack-ng source * * SSE2 co...
b4c7387_gcc_so12.c
#define _POSIX_C_SOURCE 200809L #define START_TIMER(S) \ struct timeval start_##S, end_##S; \ gettimeofday(&start_##S, NULL); #define STOP_TIMER(S, T) \ gettimeofday(&end_##S, NULL); \ T->S += (double)(end_##S.tv_sec - start_##S.tv_sec) + (double)(end_##S.tv_usec - start_##S.tv_usec) / 1000...
GB_binop__ge_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
DRB020-privatemissing-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...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
rawSHA512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2010 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. * * Rewritten Spring 2013, JimF. SSE code added and released with the following terms: * No copyright is claimed, and the software is hereby placed in t...
PR44893.c
// RUN: %clang -fopenmp -O -g -x c %s -c -disable-output // Do not crash ;) void foo() { #pragma omp critical ; } void bar() { foo(); foo(); }
GB_unop__atanh_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...
prefix-sum-parallel.c
/* @file prefix-sum-parallel.c * @author Robin Vermes * @author Valentin Laurent * @details theoretical n*log(n) prefix-sum */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <sys/resource.h> #include <sys/time.h> #include <omp.h> void display(int * t, int length_t) { int i = 0; for (; i < l...
pcpaes_cbcdecrypt.c
/******************************************************************************* * Copyright 2013-2019 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") co...
scatter.c
// create a list of 64 numbers, and only sum the even ones #include <stdio.h> #include <stdlib.h> #define N 32000 #define SCALE 16 int main() { srand(time(NULL)); float *numbers = malloc(sizeof(float)*N); float *result1 = malloc(sizeof(float)*N); float *result2 = malloc(sizeof(float)*N); int *mask...
omp_for_schedule_dynamic.c
<ompts:test> <ompts:testdescription>Test which checks the dynamic option of the omp for schedule directive</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp for schedule(dynamic)</ompts:directive> <ompts:dependences>omp flush,omp for nowait,omp critical,omp single</ompts:dependences>...
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...
radon.c
#include "main.h" #include "Python.h" #include "numpy/arrayobject.h" #include <math.h> /* ** ** Radon transform functions ** */ static struct item { int x; int y; double angle; struct item *next; }; static void print_list(struct item *head) { struct item *current; for(current=head; current!=NULL; current=curre...
issue_001.c
#include <stdio.h> #include "assert.h" #include <unistd.h> // 920 fails #define TRIALS 919 // 6000 fails #define N 64*5000 int main() { int fail = 0; double A[N], B[N], C[N]; for (int i = 0; i < N; i++) { A[i] = 0.0; B[i] = 0.0; C[i] = 1.0; } int nte = 32; int tl = 64; int blockSize = tl; ...
hash_table.h
#ifndef HASH_TABLE_H_ #define HASH_TABLE_H_ #include "global_parameters.h" struct smer_detail{ int pro_id; int sta_pos; //int end_pos; }; struct hash_entry{ uint64_t smer; vector <smer_detail> smer_occs; }; class HASH_TABLE{ public: string seed; uint32_t seed_len; uint64_t seed_64; uint64_t ht_size; hash_en...
GB_unop__identity_uint64_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
known_hosts_fmt_plug.c
/* Quick-and-dirty cracker for ~/.ssh/known_hosts hashes (HashKnownHosts yes). * * Based on http://blog.tremily.us/posts/known_hosts/ * * This software is Copyright (c) 2014, Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and ...
sum.c
#include <stdio.h> #define NX 102400 int main(void) { long vecA[NX]; long sum, psum, sumex; int i; /* Initialization of the vectors */ for (i = 0; i < NX; i++) { vecA[i] = (long) i + 1; } sumex = (long) NX * (NX + 1) / ((long) 2); printf("Arithmetic sum formula (exact): ...
bwabridge.c
#include <stdlib.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include "util.h" #include "bwabridge.h" /*************************************************************************** * This is all translated from Lariat's BWA bridge. * * https://github.com/10XGenomics/lariat/blob...
LSH_query_batch.c
/* AUTORIGHTS Copyright (C) 2007 Princeton University This file is part of Ferret Toolkit. Ferret Toolkit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later ver...
DRACC_OMP_023_MxV_Partially_Missing_Data_yes.c
/* Matrix Vector multiplication with partially Matrix missing on Accelerator. Using the target enter data construct. */ #include <stdio.h> #include <stdbool.h> #include <stdlib.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; ...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__abs_int16_int16.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...
mandel_par.c
/* ** PROGRAM: Mandelbrot area (solution) ** ** PURPOSE: Program to compute the area of a Mandelbrot set. ** The correct answer should be around 1.510659. ** ** USAGE: Program runs without input ... just run the executable ** ** ADDITIONAL EXERCISES: Experiment with the schedule clause to fix ...
axpy.c
//axpy.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix and a vect...
c11-ping-pong.c
#if !defined(__llvm__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && \ defined(__GNUC__) && (__GNUC__ <= 6) #error GCC will not compile this code because of "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65467" #else /* Intel compiler does not support _Atomic hence defines __STDC_NO_ATOMICS__, * but it ...
Source.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define PI 3.14159265358979323846264 void calcPI(int iterations, int threads) { double m, mypi = 0.0; double ni = 0.0; double difTime; int i; double start = omp_get_wtime(); m = 1.0 / (double)iterations; //OBS!!! catch problems with shared variables!!! ...
dist_async_sum-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 ...
targc-272328.c
struct test_type { int *p1; } tt; #include "stdlib.h" #include "stdio.h" int C[10]; int E[10]; int main() { int i; int *p; tt.p1 = (int*) malloc(10*sizeof(int)); p=tt.p1; for (i=0; i<10; i++) { tt.p1[i] = i+100; C[i] = 0; } for (i=0; i<10; i++) E[i]=...
main_medium_morus.c
#include "main_medium_morus.h" inline void copy_word(state_words* to, const state_words* from) { *to = *from; } inline void save_state(state* state_saved, state state, int i) { copy_word(&state_saved[i][0], &state[0]); copy_word(&state_saved[i][1], &state[1]); copy_word(&state_saved[i][2], &state[2]); copy_...
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 // //===---------------------------...
ast-dump-openmp-distribute-parallel-for.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 distribute parallel for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp distribute parallel for for...
fused_rowwise_nbitfake_conversion_ops.h
#pragma once #ifdef _OPENMP #include <omp.h> #endif #include "caffe2/core/context.h" #include "caffe2/core/logging.h" #include "caffe2/core/operator.h" #include "caffe2/operators/reducer_functors.h" #include "caffe2/utils/math.h" namespace caffe2 { namespace internal { inline bool is_little_endian() { constexpr s...
mxnet_op.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 ...
matmul_c.c
#include <stdio.h> int main(void) { int n=10; float a[n][n], b[n][n], c[n][n]; int i,j,k; #pragma omp parallel private(i,j,k) { #pragma omp for for (i=0;i<n;i++) for (j=0;j<n;j++) { a[i][j]=2; b[i][j]=3; c[i][j]=0; } #pragma omp for for (i=0;i<n;i++) for (j=0;j<n;j++) for (...
trsm_x_csc_n_lo_col.c
#include "alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" #include <memory.h> alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSC *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { const ALPHA_INT ...
performance.c
#include "performance.h" // from GNU.org int compare_doubles (const void *a, const void *b) { const double *da = (const double *) a; const double *db = (const double *) b; return (*da > *db) - (*da < *db); } void performance_test(Parameters * p){ int i; int tests_remain; double t_start, t_end, t=0.0; do...
openmp_kernels.c
#include "pcg_basic.h" #include "openmp_kernels.h" #include <stdio.h> #define SIMD 8 #if !defined( USE_OPENMP ) #define omp_get_thread_num() 0 #endif void gather_smallbuf( sgData_t** restrict target, sgData_t* const restrict source, sgIdx_t* const restrict pat, size_t pat_len, ...
GB_binop__gt_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
TemporalRowConvolution.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/TemporalRowConvolution.c" #else static inline void THNN_(TemporalRowConvolution_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kW, int dW, int padW) { THArgCheck(kW > 0, 5, "kerne...
deconvolution_pack4to1.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 ...
tree-vectorizer.h
/* Vectorizer Copyright (C) 2003-2019 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either ve...
convolution_winograd_transform_pack16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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 ...
mbf.c
////////////////////////////////////// // Cunren Liang, NASA JPL/Caltech // Copyright 2017 ////////////////////////////////////// #include "resamp.h" #include <fftw3.h> #include <omp.h> #define SWAP4(a) (*(unsigned int *)&(a) = (((*(unsigned int *)&(a) & 0x000000ff) << 24) | ((*(unsigned int *)&(a) & 0x000...
libperf_thread.c
/** * Copyright (C) NVIDIA 2021. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <ucs/debug/log.h> #include <ucs/arch/bitops.h> #include <ucs/sys/module.h> #include <ucs/sys/string.h> #include <tools/perf/lib/libperf_int.h> #include <string.h> #inc...
outer_profile2.h
#include "CSC.h" #include "CSR.h" #include "Triple.h" #include "radix_sort/radix_sort.hpp" #include "vergesort/vergesort.h" #include "pdqsort/pdqsort.h" #include "cpp-TimSort/include/gfx/timsort.hpp" #include "utility.h" #include <algorithm> #include <iostream> #include <fstream> #include <omp.h> #include <unistd.h> ...
cloudkeychain_fmt_plug.c
/* 1Password Cloud Keychain cracker patch for JtR. Hacked together during * April of 2013 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru.kholia at gmail.com>, * Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> and Copyright (c) 2012 * magnum, and it is...
GB_unaryop__lnot_uint16_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...
count_func.c
/******************************************************************************* * 2pt/count_func.c: this file is part of the FCFC program. * FCFC: Fast Correlation Function Calculator. * Github repository: https://github.com/cheng-zhao/FCFC * Copyright (c) 2020 -- 2021 Cheng Zhao <zhaocheng03@gmail.com> [M...
ex_guided.c
#include <stdio.h> #include <omp.h> #include <unistd.h> #define THREADS 8 int main() { int i,N=30; #pragma omp parallel for schedule(guided) num_threads(THREADS) for (i = 0; i < N; i++) { sleep(i); /* wait for i seconds */ printf("Thread %d has completed iteration %d.\n", omp_get_thread_num( ), i); } ...
Wind_speed.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include "grb2.h" #include "wgrib2.h" #include "fnlist.h" /* * Wind speed - U then V in input file * * v 0.1 experimental * * 3/2009: Public Domain: Wesley Ebisuzaki * */ extern int decode, file_append, save_transl...
GB_unop__identity_fc64_uint8.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_unaryop__lnot_int8_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...
library.h
#ifndef __INCLUDED_LIBRARY_H__ #define __INCLUDED_LIBRARY_H__ #pragma omp declare simd double BlackBoxFunction(const double x); double InverseDerivative(const double x); #endif
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...