source
stringlengths
3
92
c
stringlengths
26
2.25M
gb_utils.h
#pragma once #include <memory> #include <numeric> extern "C" { #define LAGRAPH_EXPERIMENTAL_ASK_BEFORE_BENCHMARKING 1 #include <GraphBLAS.h> #include <LAGraph.h> } #include "utils.h" //------------------------------------------------------------------------------ // ok: call a GraphBLAS method and check the result ...
axpy_double.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...
GB_unaryop__ainv_uint8_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...
void_openmp_library.c
#include <stdio.h> #include "void_openmp_library.h" #include <omp.h> #include <math.h> void mark_void_region(char *in_void, int Ncells, int dims, float R_grid2, int i, int j, int k, int threads) { int l, m, n, i1, j1, k1; long number; float dist2; #pragma omp parallel for num_threads(threads) private(l...
GB_unaryop__ainv_int8_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
luks_fmt_plug.c
/* luks.c * * hashkill - a hash cracking tool * Copyright (C) 2010 Milen Rangelov <gat3way@gat3way.eu> * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as p...
sapB_fmt_plug.c
/* * this is a SAP-BCODE 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 * cheers: see test-ca...
triplet.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* These codes were originally parts of spglib, but only develped */ /* and used for phono3py. Therefore these were moved from spglib to */ /* phono3py. This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or witho...
pi_loop.c
/* This program will numerically compute the integral of 4/(1+x*x) from 0 to 1. The value of this integral is pi -- which is great since it gives us an easy way to check the answer. The program was parallelized using OpenMP by adding just four lines (1) A line to include omp...
opencl_dmg_fmt_plug.c
/* DMG cracker patch for JtR. Hacked together during August of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com> * * 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 for...
parallel_macros.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2015, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
4415.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...
convolution_3x3_pack4.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 ...
diagmm_x_bsr_u_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include <memory.h> #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number ...
eavlReduceOp_1.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_REDUCE_OP_1_H #define EAVL_REDUCE_OP_1_H #include "eavlOperation.h" #include "eavlArray.h" #include "eavlOpDispatch_io1.h" #include "eavlTimer.h" #ifdef HAVE_OPENMP #include <omp.h> #endif #ifndef DOXYGEN #ifdef HAVE_OPENMP ...
Example_target_mapper.2.c
/* * @@name: target_mapper_map.2.c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_5.0 */ #include <stdio.h> // N MUST BE EVEN #define N 100 typedef struct dzmat { double r_m[N][N]; double i_m[N][N]; } dzmat_t; #pragma omp declare mapper( top_...
multi_thread_main.c
/*************************************************************************/ /* */ /* Language Technologies Institute */ /* Carnegie Mellon University */ /* ...
pcgstrf.c
/*! \file Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) All rights reserved. The source code is distributed under BSD license, see the file License.txt at the top-level director...
risingexp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *risingexp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *risingexp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyA...
GB_binop__gt_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
hmacSHA1_fmt_plug.c
/* * This software is Copyright (c) 2012, 2013 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. * * Originally based on hmac-md5 by Bartavelle */ #if FMT_EXTERNS_H extern struct ...
mandelbrot.c
/* To compile: gcc -O3 -o mandelbrot mandelbrot.c png_util.c -I. -lpng -lm -fopenmp Or just type: module load gcc make To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads): ./mandelbrot 4096 4096 1 */ #include <math.h> #include <stdio.h> #include <stdlib...
FillInLinearSystemImpl.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
comm.h
/** * Copyright (c) 2015 by Contributors */ #ifndef MXNET_KVSTORE_COMM_H_ #define MXNET_KVSTORE_COMM_H_ #include <string> #include <algorithm> #include <utility> #include <limits> #include <vector> #include <tuple> #include "mxnet/ndarray.h" namespace mxnet { namespace kvstore { /** * \brief multiple device commmuni...
time_omp_fib.c
#include <stdio.h> /* for printf() */ #include <assert.h> /* for assert() */ #include <omp.h> #include <qthread/qthread.h> #include <qthread/qtimer.h> #include "argparsing.h" static aligned_t validation[] = { 0, // 0 1, // 1 1, // 2 2, ...
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
mult_add_MEX.c
#include "mex.h" #include <math.h> #include "matrix.h" #include <string.h> #include "fast_mxArray_setup.c" #ifdef __GNU__ #include <omp.h> #endif #ifndef MAXCORES #define MAXCORES 1 #endif void mexFunction(int nlhs, mxArray *left[], int nrhs, const mxArray *right[]) { /* Declare variables */ mwS...
transposition_network_unbounded_alphabet.h
//// //// Created by nikita on 19.08.2020. //// // //#ifndef CPU_TRANSPOSITION_NETWORK_UNBOUNDED_ALPHABET_H //#define CPU_TRANSPOSITION_NETWORK_UNBOUNDED_ALPHABET_H // //#include <vector> //#include <cmath> // ///** // * @tparam Input // * @tparam StrandHolder // * @param a // * @param b // * @return // */ //template<c...
serial_teams.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc, icc-19 #include "callback.h" int main() { #pragma omp target teams num_teams(2) thread_limit(1) #pragma omp parallel num_threads(1) { printf("In teams parallel\n"); } return 0; } // CHECK: 0: NULL_POINTER=[[NULL:...
FLASH_Queue_exec.c
/* Copyright (C) 2014, The University of Texas at Austin This file is part of libflame and is available under the 3-Clause BSD license, which can be found in the LICENSE file at the top-level directory, or at http://opensource.org/licenses/BSD-3-Clause */ #include "FLAME.h" #if FLA_MULTITHREADIN...
p2p.c
/* Copyright (c) 2013, Intel Corporation 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 conditions and the following disclaimer...
toimg.c
/* Copyright 2013-2018 The Regents of the University of California. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2013, 2015 Martin Uecker <uecker@eecs.berkeley.edu> * 2015, 2018 Jon Tamir <jtamir@eecs.berkeley.edu> */...
kmclight.h
/* * Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org) * * 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 *vector<N...
Example_mem_model.3.c
/* * @@name: mem_model.3c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: rt-error * @@version: omp_3.1 */ #include <omp.h> #include <stdio.h> int data0 = 0, data1 = 0; int main() { int flag=0; #pragma omp parallel num_threads(3) { if(omp_get_thread_num()==0) { data0 = ...
apply_bcs_sommerfeld.h
// Boundary condtion driver routine: Apply BCs to all // boundary faces of the 3D numerical domain, filling in the // outer boundary ghost zone layers, starting with the innermost // layer and working outward. #include "sommerfeld_params.h" #include "radial_derivative.h" #inc...
main.c
// C Compiler flag: -fopenmp #include <stdio.h> #include <omp.h> #define N 20 int main(int argc, char *argv[]) { int myid; omp_set_dynamic(0); // запретить библиотеке openmp менять число потоков во время исполнения omp_set_num_threads(3); // установить число потоков в 2 int threadsCount = omp_get_max_threads...
convolutiondepthwise_3x3_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 ...
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...
omp_parallel_firstprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel firstprivate directive.</ompts:testdescription> <ompts:ompversion>3.0</ompts:ompversion> <ompts:directive>omp parallel firstprivate</ompts:directive> <ompts:dependences>omp for omp critical</ompts:dependences> <ompts:testcode> #include <stdio.h> #in...
test.c
#include <omp.h> #include <stdio.h> #define N 1024 int A[N]; int B[N]; int C[N]; int main() { int i, errors; for(i=0; i<N; i++) { A[i] = i; B[i] = i; } // map data A & B and move to #pragma omp target enter data map(to: A, B) depend(out: A[0]) nowait // no data move since already mapp...
DRACC_OMP_044_Wrong_ordered_clause_simd_Intra_yes.c
/* Data race between the values in countervar leading to changing results with simd. by utilising the ordered construct the execution will be sequentially consistent. .*/ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #define N 42000 #define C 16 int countervar[N]; int init(){ for(int i=0; i<N; i++){...
main1.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #include <string.h> int number_of_threads; void crout0(double **A, double **L, double **U, int n) { int i, j, k; double sum = 0; for (i = 0; i < n; i++) { U[i][i] = 1; } for (j = 0; j < n; j++) { printf("j : %d\n",j); ...
tinyexr.h
#ifndef TINYEXR_H_ #define 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 th...
elkan_par32.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <stdbool.h> #include <string.h> #include <omp.h> #include "csvparser.h" void vector_init(double *a, int length) { for (int i = 0; i < length; i++) { a[i] = 0; } } void vector_copy(double *dst, double *src, int length) { for...
BytomPoW.h
/* BytomPoW.h */ #ifndef BYTOMPOW_H #define BYTOMPOW_H #include "scrypt.h" #include "sha3-allInOne.h" #include <iostream> #include <vector> #include <time.h> #include <assert.h> #include <stdint.h> // #include <x86intrin.h> // #ifdef _USE_OPENMP // #include <omp.h> // #endif #include <cuda_runtime.h> #include "cub...
GB_unop__exp2_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_binop__isge_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
LogSoftMax.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/LogSoftMax.c" #else void THNN_(LogSoftMax_updateOutput)( THNNState *state, THTensor *input, THTensor *output) { real *input_data, *output_data; ptrdiff_t nframe = 0, dim = 0, stride = 0; ptrdiff_t t, d; if (input->nDimensio...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
gimple-pretty-print.c
/* Pretty formatting of GIMPLE statements and expressions. Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> and Diego Novillo <dnovillo@google.com> This file is part of GCC. GCC is free software;...
openmp_array2.c
///TAFFO_TEST_ARGS -Xvra -propagate-all -fopenmp #include <omp.h> #include <stdio.h> #define MAX_N (100) float compute_thread_result(int index, float private_multiplier) { return index * private_multiplier; } int main(int argc, char *argv[]) { float result_container[MAX_N] __attribute((annotate("target('array')...
parallelfor.c
/* * Combined parallel for * with multiple clauses * */ int main(void) { int i, a[1000]; int sum; #pragma omp parallel for if(1) ordered reduction(+:sum) schedule(dynamic, 5) for (i=0;i<1000;i++) { a[i]=i*2; sum+=i; } return 0; }
GB_unop__floor_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...
for_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 -verify %s -Wuninitia...
owl_matrix_swap_impl_omp.h
/* * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2019 Liang Wang <liang.wang@cl.cam.ac.uk> */ #ifdef OWL_ENABLE_TEMPLATE // swap row i and row j in x(m,n) void FUNCTION (c, swap_rows) (TYPE *x, int m, int n, int i, int j) { if (i != j) { TYPE * src = x + n * i; TYPE * dst = x +...
matrix_base.h
#ifndef MATRIX_BASE_H_ #define MATRIX_BASE_H_ namespace acspo { template <typename T> class matrix { private: std::shared_ptr<T> _refs; T *_data; unsigned int _rows, _cols, _elem; public: matrix(); matrix(unsigned int rows, unsigned int cols); matrix(std::pair<unsigned int, unsigned int> size...
distribute_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized //...
vec2d_add.c
////////////////////////////////////////////////////////////// // ____ // // | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ // // | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| // // | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ // // |...
infgraph.h
class VV { public: vector<int> head; vector<int> next; vector<int> data; vector<int> vsize; void clear() { head.clear(); next.clear(); data.clear(); vsize.clear(); } // trick for not change code ...
GB_binop__max_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-...
Parallel.c
#include <stdio.h> #include <omp.h> #include <unistd.h> #include <time.h> //This is the code using OpenMP to parallelise the code on all (4) cores of the CPU then appending the time it took to the txt file //uncomment the comments below to also have it print the result to the console int main(){ int n ...
image-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % IIIII M M AAA GGGG EEEEE ...
GB_unaryop__minv_int32_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...
taskloop_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized void xxx(int argc) { int x; // expected-note {{initialize the variable 'x' to silence this warning}} #pragma om...
GB_unaryop__minv_fp64_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...
init.c
/* * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of th...
integral_omp.c
// Author: Fabio Rodrigues Pereira // E-mail: fabior@uio.no // compiling & running // clang -Xpreprocessor -fopenmp integral_omp.c -lomp // ./a.out // SPMD technique *video7 #include <stdlib.h> // rand, malloc, calloc and free. #include <stdio.h> // printf #include <math.h> #include <time.h> #include <omp.h> #defi...
Example3a.c
#include<stdio.h> int main(){ int sum = 1; int i =1; // increase sum by one each iteratiob using openmp #pragma omp parallel for private(i) reduction( + : sum ) for (i = i; i < 100; i++) { sum +=1; } printf("sum is %d\n",sum); }
GB_unop__cos_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
new2.c
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <math.h> #include <time.h> // #include <mpi.h> #include <omp.h> #include "constants.h" #include "functions.h" // void checkNumProcs(int size, int n); int main(int argc, char **argv) { FILE *input = stdin, *output = stdout, *knowe...
sell_kacz_bmc.c
#include "ghost/sell_kacz_bmc.h" #define NVECS 1 #define CHUNKHEIGHT 1 #if (NVECS==1 && CHUNKHEIGHT==1) //this is necessary since #pragma omp for doesn't understand != #define FORWARD_LOOP(start,end) \ for (ghost_lidx row=start; row<end; ++row){ \ ...
nbody_barnes_hut.c
/* ** nbody_barnes_hut.c - nbody simulation that implements the Barnes-Hut algorithm (O(nlog(n))) ** **/ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <math.h> #include <sys/time.h> #include <assert.h> #include <unistd.h> #ifdef DISPLAY #include <X11/Xlib.h> #include <X11/Xutil.h> #endif #incl...
edgelist.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
dnn.c
//------------------------------------------------------------------------------ // LAGraph/Test/DNN/dnn: run all neural networks from http://graphchallenge.org //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2019 LAGr...
private_mapping.c
// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu // RUN: %libomptarget-compile-run-and-check-nvpt...
ast-dump-openmp-task.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() { #pragma omp task ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-task.c:...
GB_binop__pair_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
GB_unop__identity_uint8_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...
GB_bitmap_assign_M_sub_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_M_sub_template: traverse M for GB_SUBASSIGN //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lice...
omp_smithW-v2-ifClause.c
/********************************************************************************* * Smith–Waterman algorithm * Purpose: Local alignment of nucleotide or protein sequences * Authors: Daniel Holanda, Hanoch Griner, Taynara Pinheiro * * Compilation: gcc omp_smithW.c -o omp_smithW -fopenmp -DDEBUG // debuggin...
GB_binop__isne_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-...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__log_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
conv_kernel_mips.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...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
graph.h
#pragma once #include<iostream> #include<unordered_map> #include<unordered_set> #include<string> #include<vector> #include<queue> #include<limits> #include<fstream> #include<stack> #include<sstream> #include<cmath> #include<cstring> #include<exception> #include<stack> #include<list> #include<functional> #include"util...
EllipseDetection.h
#ifndef ELLIPSEDETECTION_H #define ELLIPSEDETECTION_H #include "EllipseEstimator.h" #include "../ImageChannel.h" #include "../segmentation/Segmentation.h" #include "../filter/Clean.h" #include "../filter/Gauss.h" #include "../filter/Normalize.h" #include "../filter/Dilate.h" #include "../ImageFactory.h" #include ".....
matrix_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 ...
direct_nbody_reciprocal.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <omp.h> #include "reciprocal_kernels.h" void test_direct_nbody( const int n_src, const double *src_coord, double *src_val, const int n_trg, const double *trg_coord, double *trg_val, kernel_matvec_fptr krnl_ma...
energetics.h
#pragma once #include <complex> #include <cassert> #include "toefl/toefl.h" #include "blueprint.h" #include "equations.h" namespace toefl{ ///@addtogroup solvers ///@{ /** * @brief Blas1 function * * computes \f[ y = \alpha x + \beta y \f] * @param alpha a scalar * @param x Mat...
Gemm_MT_Loop3_MRxNRKernel_simple.c
#include <stdio.h> #include <stdlib.h> #include<immintrin.h> #include "omp.h" #define alpha( i,j ) A[ (j)*ldA + (i) ] // map alpha( i,j ) to array A #define beta( i,j ) B[ (j)*ldB + (i) ] // map beta( i,j ) to array B #define gamma( i,j ) C[ (j)*ldC + (i) ] // map gamma( i,j ) to array C #define min( x, y ) (...
GB_unop__one_int32_int32.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...
nmt_covar_flat.c
#include "utils.h" static fcomplex *product_and_transform(nmt_flatsky_info *fs,flouble *m1,flouble *m2) { flouble *m12=dftw_malloc(fs->npix*sizeof(flouble)); fs_map_product(fs,m1,m2,m12); fcomplex *cm12=dftw_malloc(fs->ny*(fs->nx/2+1)*sizeof(fcomplex)); fs_map2alm(fs,1,0,&m12,&cm12); dftw_free(m12); retu...
omp_two.c
// note not doing O0 below as to ensure we get tbaa // RUN: if [ %llvmver -ge 9 ]; then %clang -fopenmp -std=c11 -O1 -fno-vectorize -fno-unroll-loops -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out ; fi // RUN: if [ %llvmver -ge 9 ]; then %clang...
backward_euler_monolithic_ale_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso // #ifndef KRATOS_BACKWARD_EULER_MO...
batchnorm_kernel_arm.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_concat_hyper.c
//------------------------------------------------------------------------------ // GB_concat_hyper: concatenate an array of matrices into a hypersparse matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved...
illife.c
#define _POSIX_C_SOURCE 200809L #include <stdlib.h> #include <stddef.h> #include "illife.h" void* allocate(size_t size, size_t align) { void* p = NULL; if (posix_memalign(&p, align, size)) { return NULL; } return p; } void deallocate(void* ptr) { free(ptr); } #define ROUND_UP(a, align) (((a) + ((align)...
GB_unop__ceil_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...
3d25pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...