hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
32c11c1f3be6569871eef9780a15ed915533fa9d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <vector> #include "gtest/gtest.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layers/im2col_layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/test/test_caff...
32c11c1f3be6569871eef9780a15ed915533fa9d.cu
#include <vector> #include "gtest/gtest.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layers/im2col_layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/test/test_caffe_main.hpp" namespace caffe { // Forward declare kernel functions template <typename D...
cae02937ab9f3f56bb1dd45f9adba2fa9cf5fdaa.hip
// !!! This is a file automatically generated by hipify!!! /* * * Copyright 1993-2012 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction...
cae02937ab9f3f56bb1dd45f9adba2fa9cf5fdaa.cu
/* * * Copyright 1993-2012 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and relat...
f524489ff36cdf8d3e59501ce5fdbf25162d26ea.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <wb.h> #define wbCheck(stmt) \ do { \ hipError_t err = stmt; ...
f524489ff36cdf8d3e59501ce5fdbf25162d26ea.cu
#include <wb.h> #define wbCheck(stmt) \ do { \ cudaError_t err = stmt; \ if (err != cudaSuccess) { \...
5849bd9a13f9363a7bba43b5b96a01cc7df341d5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License,...
5849bd9a13f9363a7bba43b5b96a01cc7df341d5.cu
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
235522de4070db684091850158ccc90d6d111c5f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "simple_implement.h" __global__ void fillImage_kernel(float4 * dstPix, uint maxInd) { unsigned ind = blockIdx.x*blockDim.x + threadIdx.x; int i; for(i=0; i < 4; i++) { if(ind * 4 + i >= maxInd) return;...
235522de4070db684091850158ccc90d6d111c5f.cu
#include "simple_implement.h" __global__ void fillImage_kernel(float4 * dstPix, uint maxInd) { unsigned ind = blockIdx.x*blockDim.x + threadIdx.x; int i; for(i=0; i < 4; i++) { if(ind * 4 + i >= maxInd) return; float r = (float)threadIdx.x/(float)blockDim.x; dstPix[ind * 4 + i] = make_...
259544a840732c4bdb2d88d1a8519153c8239c4d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/common/book.h> #define N 64 __global__ void add(int *a, int *b, int *c) { int x = threadIdx.x + blockIdx.x*blockDim.x; int y = threadIdx.y + blockIdx.y*blo...
259544a840732c4bdb2d88d1a8519153c8239c4d.cu
#include <C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/common/book.h> #define N 64 __global__ void add(int *a, int *b, int *c) { int x = threadIdx.x + blockIdx.x*blockDim.x; int y = threadIdx.y + blockIdx.y*blockDim.y; while (x < N & y < N) c[y][x] = a[y][x] + b[y][x]; x+=grid.x*gridDim.x...
f7b410719f5fb36f146cc621aa6b4649865ccb94.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. #include <ATen/ATen.h> #include <torch/extension.h> // Kernel for inputs_packed of shape (F, D), where D > 1 template <typename scalar_t> __global__ void Pac...
f7b410719f5fb36f146cc621aa6b4649865ccb94.cu
// Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. #include <ATen/ATen.h> #include <torch/extension.h> // Kernel for inputs_packed of shape (F, D), where D > 1 template <typename scalar_t> __global__ void PackedToPaddedKernel( const scalar_t* __restrict__ inputs_packed, const int64_t* __...
10cc711018b5460389ff3e349c281746c30054a1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include"iostream" #include <stdio.h> #include "../common/book.h" #include"time.h" #define SIZE (100*1024*1024) int main( void ) { unsigned char *buffer = (unsigned...
10cc711018b5460389ff3e349c281746c30054a1.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include"iostream" #include <stdio.h> #include "../common/book.h" #include"time.h" #define SIZE (100*1024*1024) int main( void ) { unsigned char *buffer = (unsigned char*)big_random_block( SIZE ); // capture the start tim...
6d73599bd205963b0b4246d7c7beeaacbb562ec1.hip
// !!! This is a file automatically generated by hipify!!! #include <bits/stdc++.h> #include <hip/hip_runtime.h> #include "parallel_utility.cu" #include "matrix_utility.cu" #define DATA_DIM 3072 #define TRAIN_SAMPLE 500 #define TEST_SAMPLE 100 #define OUTPUT_LAYER_NODES 1 #define HIDDEN_LAYER_NODES 5 #define EPOCH 2...
6d73599bd205963b0b4246d7c7beeaacbb562ec1.cu
#include <bits/stdc++.h> #include <cuda.h> #include "parallel_utility.cu" #include "matrix_utility.cu" #define DATA_DIM 3072 #define TRAIN_SAMPLE 500 #define TEST_SAMPLE 100 #define OUTPUT_LAYER_NODES 1 #define HIDDEN_LAYER_NODES 5 #define EPOCH 200 #define LEARNING_RATE_IP_HIDDEN 1 #define LEARNING_RATE_HIDDEN_OP 1...
7fa5c11c164b34208b30855f6b1d9777483d76f1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <vector> #include "gtest/gtest.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layers/im2col_layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/test/test_caff...
7fa5c11c164b34208b30855f6b1d9777483d76f1.cu
#include <vector> #include "gtest/gtest.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/filler.hpp" #include "caffe/layers/im2col_layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/test/test_caffe_main.hpp" namespace caffe9 { // Forward declare kernel functions template <typename ...
256084fa61dcd90e9e327f46228dc18bd3779ac0.hip
// !!! This is a file automatically generated by hipify!!! #include <stdlib.h> #include <stdio.h> #include <time.h> #include <hip/hip_runtime.h> #define maxThreads 512 /* This code was developed and tested on cuda3 */ __global__ void getmaxcu(unsigned int num[], unsigned int size){ unsigned int tid = threadIdx...
256084fa61dcd90e9e327f46228dc18bd3779ac0.cu
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <cuda.h> #define maxThreads 512 /* This code was developed and tested on cuda3 */ __global__ void getmaxcu(unsigned int num[], unsigned int size){ unsigned int tid = threadIdx.x; unsigned int gloid = blockIdx.x*blockDim.x+threadIdx.x; __sha...
811f6871f700881d6b90aa0bb375a2646b64dc44.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <hipcub/hipcub.hpp> #include "caffe2/core/context_gpu.h" #include "caffe2/operators/rmac_regions_op.h" namespace cub { template <typename KeyT, typename ValueT> inline __host__ __device__ bool operator<( const hipcub...
811f6871f700881d6b90aa0bb375a2646b64dc44.cu
#include <cub/block/block_reduce.cuh> #include "caffe2/core/context_gpu.h" #include "caffe2/operators/rmac_regions_op.h" namespace cub { template <typename KeyT, typename ValueT> inline __host__ __device__ bool operator<( const cub::KeyValuePair<KeyT, ValueT>& kv1, const cub::KeyValuePair<KeyT, ValueT>& kv2)...
2bfd95c1fcfa3d1dffab6b45df115daed2f9283e.hip
// !!! This is a file automatically generated by hipify!!! /****************************************************************************** * * MIT License * * Copyright (c) 2020 OrthogonalHawk * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated document...
2bfd95c1fcfa3d1dffab6b45df115daed2f9283e.cu
/****************************************************************************** * * MIT License * * Copyright (c) 2020 OrthogonalHawk * 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 wi...
f7c599eb5e551ab141b8625c1f72a2bd51d3d7f7.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void ChangeInputWeightsKernel( float *inputWeights, float *inputWeightDeltas, float *outputWeights, float *outputDeltas, float *inputWeightRTRLDerivatives, float trainingRate, float momentum ) { int...
f7c599eb5e551ab141b8625c1f72a2bd51d3d7f7.cu
#include "includes.h" __global__ void ChangeInputWeightsKernel( float *inputWeights, float *inputWeightDeltas, float *outputWeights, float *outputDeltas, float *inputWeightRTRLDerivatives, float trainingRate, float momentum ) { int weightId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid + bloc...
582ecfcecca15138b8f9184ae09b9e6f2125bc25.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <cutil.h> #include <math.h> // Includes #include <stdio.h> #include "../include/ContAcq-IntClk.h" //#include "REPEATL.h" #include "../include/REPEATR.h" // includes, project #include "../include/sdkHelper.h" // h...
582ecfcecca15138b8f9184ae09b9e6f2125bc25.cu
#include <stdio.h> #include <stdlib.h> #include <cutil.h> #include <math.h> // Includes #include <stdio.h> #include "../include/ContAcq-IntClk.h" //#include "REPEATL.h" #include "../include/REPEATR.h" // includes, project #include "../include/sdkHelper.h" // helper for shared functions common to CUDA SDK samples //#in...
c61f791bbf4d6afd424afeba7faec4cbb63718e8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. 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 L...
c61f791bbf4d6afd424afeba7faec4cbb63718e8.cu
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable...
c6ef06e3bebdfd6301710a1f26b808b61fcb5f50.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "_kernel_clearsuma_cuda.cu" #include<chrono> #include<iostream> u...
c6ef06e3bebdfd6301710a1f26b808b61fcb5f50.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "_kernel_clearsuma_cuda.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{1...
3b486c2a38ae2607677529b2da9d7e3d5b70bb17.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> __global__ void doubling(int n, float *a) { int tid = blockDim.x*blockIdx.x + threadIdx.x; int i; while(tid < n) { a[tid] *= 2; for(i=0; i<1000; i++) a[tid] *= 1; tid += blockDim.x ...
3b486c2a38ae2607677529b2da9d7e3d5b70bb17.cu
#include <stdio.h> #include <stdlib.h> __global__ void doubling(int n, float *a) { int tid = blockDim.x*blockIdx.x + threadIdx.x; int i; while(tid < n) { a[tid] *= 2; for(i=0; i<1000; i++) a[tid] *= 1; tid += blockDim.x * gridDim.x; } } int main() { int i; int n=65535*3500; float *a, *a_dev; a = (fl...
c4eb7e572448b74d9d424d46c6af54278ac5c9ce.hip
// !!! This is a file automatically generated by hipify!!! // Includes #include <stdio.h> #include <stdlib.h> // includes from project // includes from CUDA #include <hip/hip_runtime.h> //#include <helper_math.h> #define THREADS_PER_BLOCK 256 #define NUM_OF_BLOCKS 640 // Variables unsigned* h_A; unsigned* h_B; uns...
c4eb7e572448b74d9d424d46c6af54278ac5c9ce.cu
// Includes #include <stdio.h> #include <stdlib.h> // includes from project // includes from CUDA #include <cuda_runtime.h> //#include <helper_math.h> #define THREADS_PER_BLOCK 256 #define NUM_OF_BLOCKS 640 // Variables unsigned* h_A; unsigned* h_B; unsigned* h_C; unsigned* d_A; unsigned* d_B; unsigned* d_C; // F...
f450c2b6aa21051b404c72a08892c6aa2ec3041e.hip
// !!! This is a file automatically generated by hipify!!! #include "../common/book.h" #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include "device_launch_parameters.h" #include <conio.h> #include <Windows.h> #include <math.h> #include <time.h> //Autores: Sanz Sacr...
f450c2b6aa21051b404c72a08892c6aa2ec3041e.cu
#include "../common/book.h" #include "cuda_runtime.h" #include <stdio.h> #include <stdlib.h> #include <cuda.h> #include "device_launch_parameters.h" #include <conio.h> #include <Windows.h> #include <math.h> #include <time.h> //Autores: Sanz Sacristán, Sergio y Zamorano Ortega, Álvaro FILE *doc; FILE *leer; int colum...
91c4666fb74aa4ab96657b936d97544e3f685031.hip
// !!! This is a file automatically generated by hipify!!! /************************************************************************** * * set up GPU for processing * **************************************************************************/ #include <hip/hip_runtime.h> #include <stdio.h> #include "gpu_main.h" #i...
91c4666fb74aa4ab96657b936d97544e3f685031.cu
/************************************************************************** * * set up GPU for processing * **************************************************************************/ #include <cuda.h> #include <stdio.h> #include "gpu_main.h" #include <cuda_runtime.h> #include <math.h> #define gScalar 0.2 textu...
67a3f3deb936993d4a67a3c151cbb1cb586d3018.hip
// !!! This is a file automatically generated by hipify!!! #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <cutil_inline.h> #include <base.h> #include <image.h> #include <bayer.h> #include "base.h" #include "image.h" #include "cuda_utils.h" #include "ahd_kernels.cu" #include "uti...
67a3f3deb936993d4a67a3c151cbb1cb586d3018.cu
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <cutil_inline.h> #include <base.h> #include <image.h> #include <bayer.h> #include "base.h" #include "image.h" #include "cuda_utils.h" #include "ahd_kernels.cu" #include "util.h" void run_cuda_ahd(img *image, pixel*result); #define...
8c329c1784d0d193c1a52c6f55062f362e094181.hip
// !!! This is a file automatically generated by hipify!!! // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http:...
8c329c1784d0d193c1a52c6f55062f362e094181.cu
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
f37d4298d62b2bcf410200b7f63e0f543d2b7501.hip
// !!! This is a file automatically generated by hipify!!! /* ----------------------------------------------------------------- * Programmer(s): Slaven Peles, Cody J. Balos @ LLNL * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2020, Lawrence Liver...
f37d4298d62b2bcf410200b7f63e0f543d2b7501.cu
/* ----------------------------------------------------------------- * Programmer(s): Slaven Peles, Cody J. Balos @ LLNL * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2020, Lawrence Livermore National Security * and Southern Methodist University...
38665021ae7c3bb252fb4def9a2a85887650ae65.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include "wb.h" #define MASK_WIDTH 5 #define MASK_RADIUS MASK_WIDTH / 2 __global__ void convolution(const float *__restrict__ I, const float *__restrict__ M, float *__restrict__ P, ...
38665021ae7c3bb252fb4def9a2a85887650ae65.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include "wb.h" #define MASK_WIDTH 5 #define MASK_RADIUS MASK_WIDTH / 2 __global__ void convolution(const float *__restrict__ I, const float *__restrict__ M, float *__restrict__ P, const int channels, const int width, const i...
fc9ec54a85a05148e47f9d94fd22fe6e9f29057d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <cstdlib> #include <iostream> #include <fstream> #include <chrono> void gpuMemTransfer(int* A_cpu, int* B_cpu, int* C_cpu, int N, int size, bool memCol); void gpuNoMemTransfer(int* A...
fc9ec54a85a05148e47f9d94fd22fe6e9f29057d.cu
#include <stdio.h> #include <stdlib.h> #include <cstdlib> #include <iostream> #include <fstream> #include <chrono> void gpuMemTransfer(int* A_cpu, int* B_cpu, int* C_cpu, int N, int size, bool memCol); void gpuNoMemTransfer(int* A_cpu, int* B_cpu, int* C_cpu, int N, int size, bool memCol); __global__ void matrixMul(...
8cc4e5317abfecb6b1a42d7694cfa15b54ad2964.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Modified by DaveMc to illustrate one child per lane /* GK104-optimized variant of the "Persistent speculative while-while" kernel used in: "Understanding the Efficiency of Ray Traversal on GPUs", Timo Aila ...
8cc4e5317abfecb6b1a42d7694cfa15b54ad2964.cu
// Modified by DaveMc to illustrate one child per lane /* GK104-optimized variant of the "Persistent speculative while-while" kernel used in: "Understanding the Efficiency of Ray Traversal on GPUs", Timo Aila and Samuli Laine, Proc. High-Performance Graphics 2009 This variant fetches n...
f209161d6c277e0522e0b927c52674683594105c.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include "common.h" #include "efficient.h" namespace StreamCompaction { namespace Efficient { using StreamCompaction::Common::PerformanceTimer; PerformanceTimer& timer() { ...
f209161d6c277e0522e0b927c52674683594105c.cu
#include <cuda.h> #include <cuda_runtime.h> #include "common.h" #include "efficient.h" namespace StreamCompaction { namespace Efficient { using StreamCompaction::Common::PerformanceTimer; PerformanceTimer& timer() { static PerformanceTimer timer; return timer; ...
73d7e64ecf6f32d499c960ade2a6fcc46e970d47.hip
// !!! This is a file automatically generated by hipify!!! /* Copyright 2018 XIAOLIN WANG (xiaolin.wang@nict.go.jp; arthur.xlw@google.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http:/...
73d7e64ecf6f32d499c960ade2a6fcc46e970d47.cu
/* Copyright 2018 XIAOLIN WANG (xiaolin.wang@nict.go.jp; arthur.xlw@google.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by ap...
55551c3c96758a4c94f8f963d902b036d413d033.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include "hip/hip_runtime.h" #include "./common/book.h" #include <time.h> #include <stdio.h> #include <iostream> #include <stdlib.h> #define MUERTA "\x1b[34m" #define VIVA "\x1b[36m" #define ...
55551c3c96758a4c94f8f963d902b036d413d033.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include "cuda.h" #include "./common/book.h" #include <time.h> #include <stdio.h> #include <iostream> #include <stdlib.h> #define MUERTA "\x1b[34m" #define VIVA "\x1b[36m" #define RESET "\x1b[0m" cudaError_t lanzarKernel(char* matriz, char* matrizResul...
21d0d58df8eb760d9b7c8fa6d561a61cb8aa1a1b.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "_As_mul_Bs_32.cu" #include<chrono> #include<iostream> using name...
21d0d58df8eb760d9b7c8fa6d561a61cb8aa1a1b.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "_As_mul_Bs_32.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24...
07c1e99d47d18d8b08ee504fa15e4288ac081e11.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * yolo_layer.cu * * This code was originally written by wang-xinyu under MIT license. * I took it from: * * https://github.com/wang-xinyu/tensorrtx/tree/master/yolov4 * * and made necessary modifications. * * - JK J...
07c1e99d47d18d8b08ee504fa15e4288ac081e11.cu
/* * yolo_layer.cu * * This code was originally written by wang-xinyu under MIT license. * I took it from: * * https://github.com/wang-xinyu/tensorrtx/tree/master/yolov4 * * and made necessary modifications. * * - JK Jung */ #include "yolo_layer.h" using namespace Yolo; namespace { // Write values int...
2e86072eee6ddbfe0bc27aad9e86035c596b2559.hip
// !!! This is a file automatically generated by hipify!!! #include <ATen/ATen.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <vector> #include <math.h> #include </usr/local/cuda-9.0/targets/x86_64-linux/include/hiprand/hiprand_kernel.h> // Kernels *********************** #define gpuErrchk(a...
2e86072eee6ddbfe0bc27aad9e86035c596b2559.cu
#include <ATen/ATen.h> #include <cuda.h> #include <cuda_runtime.h> #include <vector> #include <math.h> #include </usr/local/cuda-9.0/targets/x86_64-linux/include/curand_kernel.h> // Kernels *********************** #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } inline void gpuAssert(cudaError_t co...
cf448e16effa317712c20e84a3528844587f9dcb.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <string.h> #include <hip/hip_runtime.h> __global__ void reverse (int *d, const int len) { __shared__ int s[256]; int t = threadIdx.x; s[t] = d[t]; __syncthreads(); d[t] = s[len-t-1]; } int main(int arg...
cf448e16effa317712c20e84a3528844587f9dcb.cu
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <cuda.h> __global__ void reverse (int *d, const int len) { __shared__ int s[256]; int t = threadIdx.x; s[t] = d[t]; __syncthreads(); d[t] = s[len-t-1]; } int main(int argc, char* argv[]) { if (argc != 2) { printf("Usage: ./%s <iterat...
953addfc9be9f7678956a0051f78b036f1f68ec9.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "multiplication.hip" #include<chrono> #include<iostream> using na...
953addfc9be9f7678956a0051f78b036f1f68ec9.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "multiplication.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{2...
15b9f62021aa142d6640cc2c387892a92a3669db.hip
// !!! This is a file automatically generated by hipify!!! #include "cutil_temp.h" #include "DebugOutput.h" float* debug_init_memory(void) { // allocate device memory float *DEBUG_OUTPUT_D; CUDA_SAFE_CALL(hipMalloc((void**) &DEBUG_OUTPUT_D, \ sizeof(float))); CUDA_SAFE_CALL(hipMemcpyToSymbol("DEBUG_OUTPUT_...
15b9f62021aa142d6640cc2c387892a92a3669db.cu
#include "cutil_temp.h" #include "DebugOutput.h" float* debug_init_memory(void) { // allocate device memory float *DEBUG_OUTPUT_D; CUDA_SAFE_CALL(cudaMalloc((void**) &DEBUG_OUTPUT_D, \ sizeof(float))); CUDA_SAFE_CALL(cudaMemcpyToSymbol("DEBUG_OUTPUT_C", \ &DEBUG_OUTPUT_D , \ sizeof(float*), 0...
b7a9402b981a13df475fbdf1a35052c21fc6ea97.hip
// !!! This is a file automatically generated by hipify!!! #include "flo/device/cu_raii.cuh" #include <iostream> #include <array> FLO_DEVICE_NAMESPACE_BEGIN namespace cu_raii { Stream::Stream() { status = hipStreamCreate(&handle); } Stream::~Stream() { join(); status = hipStreamDestroy(handle); } Stream::oper...
b7a9402b981a13df475fbdf1a35052c21fc6ea97.cu
#include "flo/device/cu_raii.cuh" #include <iostream> #include <array> FLO_DEVICE_NAMESPACE_BEGIN namespace cu_raii { Stream::Stream() { status = cudaStreamCreate(&handle); } Stream::~Stream() { join(); status = cudaStreamDestroy(handle); } Stream::operator cudaStream_t() const noexcept { return handle; } ...
07668428ac8d59e8546f8ecade34e46831e909ac.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "set_with_value_util_kernel.cu" #include<chrono> #include<iostrea...
07668428ac8d59e8546f8ecade34e46831e909ac.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "set_with_value_util_kernel.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8...
4181745b1f7817766144a41bcad502d558916094.hip
// !!! This is a file automatically generated by hipify!!! /** * jrc_cuda_rho.cu * block loading rho calculation. should be much faster * system('nvcc -ptx -m 64 -arch sm_35 jrc_cuda_rho.cu') * i1 is multiple of chunk (16) * J. James Jun, Vidrio Technologies, LLC., 2017 Jun 11 * 7/13/17: fDc_spk option added, whi...
4181745b1f7817766144a41bcad502d558916094.cu
/** * jrc_cuda_rho.cu * block loading rho calculation. should be much faster * system('nvcc -ptx -m 64 -arch sm_35 jrc_cuda_rho.cu') * i1 is multiple of chunk (16) * J. James Jun, Vidrio Technologies, LLC., 2017 Jun 11 * 7/13/17: fDc_spk option added, which uses spike-specific distance cut-off (dc) */ #include <...
cc5d8ee950461d7a5c9dc40ab5114d7ecf707470.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 1993-2017 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this soft...
cc5d8ee950461d7a5c9dc40ab5114d7ecf707470.cu
/* * Copyright 1993-2017 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
867bae41bb4bac251b313dbd8da43e3be0655526.hip
// !!! This is a file automatically generated by hipify!!! // Array multiplication: C = A * B: // System includes #include <stdio.h> #include <assert.h> #include <malloc.h> #include <math.h> #include <stdlib.h> // CUDA runtime #include <hip/hip_runtime.h> // Helper functions and utilities to work with CUDA #include ...
867bae41bb4bac251b313dbd8da43e3be0655526.cu
// Array multiplication: C = A * B: // System includes #include <stdio.h> #include <assert.h> #include <malloc.h> #include <math.h> #include <stdlib.h> // CUDA runtime #include <cuda_runtime.h> // Helper functions and utilities to work with CUDA #include "helper_functions.h" #include "helper_cuda.h" #ifndef BLOCKS...
65a485e73c7db5d16eb66b7c9faea0e2700d73a4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*! \file CTU_2D_cuda.cu * \brief Definitions of the cuda 2D CTU algorithm functions. */ #ifdef CUDA #include<stdio.h> #include<math.h> #include<cuda.h> #include"global.h" #include"global_cuda.h" #include"hydro_cuda.h" #include"...
65a485e73c7db5d16eb66b7c9faea0e2700d73a4.cu
/*! \file CTU_2D_cuda.cu * \brief Definitions of the cuda 2D CTU algorithm functions. */ #ifdef CUDA #include<stdio.h> #include<math.h> #include<cuda.h> #include"global.h" #include"global_cuda.h" #include"hydro_cuda.h" #include"CTU_2D_cuda.h" #include"pcm_cuda.h" #include"plmp_cuda.h" #include"plmc_cuda.h" #include...
3128eea1d90a385715ad2f3ee5cd5790bcb3d3b1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <time.h> /* to compile : nvcc -o 2039276_Task3_A 2039276_Task3_A.cu to run: ./2039276_Task3_A Sonam Wangdi Sherpa, UID: 2039276 */ __device__ char* CudaCrypt(char* rawPasswo...
3128eea1d90a385715ad2f3ee5cd5790bcb3d3b1.cu
#include <stdio.h> #include <stdlib.h> #include <time.h> /* to compile : nvcc -o 2039276_Task3_A 2039276_Task3_A.cu to run: ./2039276_Task3_A Sonam Wangdi Sherpa, UID: 2039276 */ __device__ char* CudaCrypt(char* rawPassword){ char * newPassword = (char *) malloc(sizeof(char) * 11); newPassword[0] = rawPa...
f15b709c50dcf0576ba59dda53b48308594f848d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #define BLOCK_SIZE 2 int get_max_size (int a, int d) { int temp = a/d; if (a%d != 0) { temp = temp+1; } return temp; } #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }...
f15b709c50dcf0576ba59dda53b48308594f848d.cu
#include <stdio.h> #define BLOCK_SIZE 2 int get_max_size (int a, int d) { int temp = a/d; if (a%d != 0) { temp = temp+1; } return temp; } #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) { ...
718e5366fad18ff1e8fe4931c74bfa4b16a41c85.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include <algorithm> #include <vector> #include <math.h> #include <numeric> #include <hip/hip_runtime.h> #include "rocblas.h" #include "cusparse_v2.h" #include "cublas_wrapper.h" #include "misc.h" #include "preconditioner.h" #include "solve...
718e5366fad18ff1e8fe4931c74bfa4b16a41c85.cu
#include <iostream> #include <algorithm> #include <vector> #include <math.h> #include <numeric> #include <cuda_runtime.h> #include "cublas_v2.h" #include "cusparse_v2.h" #include "cublas_wrapper.h" #include "misc.h" #include "preconditioner.h" #include "solver.h" /* * test.cu * * This file serves as demo...
f6e1a571b85dc3268d1b1cdf260dc8b6221bc5f3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "kernels_hip.cuh" __global__ void setup_kernel(hiprandState_t *worker_state) { int index = threadIdx.x + blockDim.x*blockIdx.x; hiprand_init(123456789, index, 0, &worker_state[index]); } __global__ void monti_c...
f6e1a571b85dc3268d1b1cdf260dc8b6221bc5f3.cu
#include "kernels.cuh" __global__ void setup_kernel(curandState *worker_state) { int index = threadIdx.x + blockDim.x*blockIdx.x; curand_init(123456789, index, 0, &worker_state[index]); } __global__ void monti_carlo_pi_kernel(curandState *worker_state, int *count, int m) { unsigned int index = threadIdx.x...
6d2a30052b1b446644ac0cf99b6a355e428c3cff.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <iostream> #include <vector> #include <hip/hip_runtime.h> #include "rocblas.h" #include "CudaKernel.h" //jeah i should use some classes and stuff, but for first it was much simpler //for me to just use some global variables textur...
6d2a30052b1b446644ac0cf99b6a355e428c3cff.cu
#include <stdio.h> #include <iostream> #include <vector> #include <cuda_runtime.h> #include "cublas_v2.h" #include "CudaKernel.h" //jeah i should use some classes and stuff, but for first it was much simpler //for me to just use some global variables texture<float, 3,cudaReadModeElementType> CTtex; cudaArray ...
2a0e657ec8725a7ba1223cf9551804a36c08600a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*********************************************************************//** * @file * * @section LICENCE * * Mathematica source file * * Copyright 1986 through 2010 by Wolfram Research Inc. * * @section DESCRIPTION * * ...
2a0e657ec8725a7ba1223cf9551804a36c08600a.cu
/*********************************************************************//** * @file * * @section LICENCE * * Mathematica source file * * Copyright 1986 through 2010 by Wolfram Research Inc. * * @section DESCRIPTION * * * * $Id$ ************************************************************************/ /* ...
1f8ad6a2d89dbb7616b96230eb2df544959055db.hip
// !!! This is a file automatically generated by hipify!!! /** * fdtd2d.cu: This file is part of the PolyBench/GPU 1.0 test suite. * * * Contact: Scott Grauer-Gray <sgrauerg@gmail.com> * Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU *...
1f8ad6a2d89dbb7616b96230eb2df544959055db.cu
/** * fdtd2d.cu: This file is part of the PolyBench/GPU 1.0 test suite. * * * Contact: Scott Grauer-Gray <sgrauerg@gmail.com> * Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU */ #include <stdio.h> #include <stdlib.h> #include <math.h>...
3aee43626abd3c00b58eafa2a1634745ee742071.hip
// !!! This is a file automatically generated by hipify!!! /* ------------------------------------------------------------------------ */ /* Copyright 2018, IBM Corp. */ /* */ /* Licensed under the Ap...
3aee43626abd3c00b58eafa2a1634745ee742071.cu
/* ------------------------------------------------------------------------ */ /* Copyright 2018, IBM Corp. */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* y...
67d2dff6bfccbdf293c48c390e5bc0a82bd84f94.hip
// !!! This is a file automatically generated by hipify!!! /**** * Copyright (c) 2011-2018, NVIDIA CORPORATION. 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...
67d2dff6bfccbdf293c48c390e5bc0a82bd84f94.cu
/**** * Copyright (c) 2011-2018, NVIDIA CORPORATION. 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 li...
a17f9dfbd2604ed0ff96cb9b2c7411d563c14c5c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" extern "C" { __global__ void vectorAdd(const float *a, const float *b, float *c, int num) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < num) { c[i] = a[i] + b[i]; } } __glo...
a17f9dfbd2604ed0ff96cb9b2c7411d563c14c5c.cu
extern "C" { __global__ void vectorAdd(const float *a, const float *b, float *c, int num) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < num) { c[i] = a[i] + b[i]; } } __global__ void initImage(unsigned char *data, int cols, int rows) { int x = threadId...
9f3be504d7551c783b9626bd3160228df407a4ed.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "head.h" #define tpb 256 extern double *d_t; extern double *d_it; extern double *d_V; extern double *d_dV2; extern double *d_Vnew; extern double *d_m; extern double *d_h; extern double *d_jj; extern double *d_d; extern do...
9f3be504d7551c783b9626bd3160228df407a4ed.cu
#include "head.h" #define tpb 256 extern double *d_t; extern double *d_it; extern double *d_V; extern double *d_dV2; extern double *d_Vnew; extern double *d_m; extern double *d_h; extern double *d_jj; extern double *d_d; extern double *d_f; extern double *d_X; extern double *d_cai; extern double *d_m0; extern double...
c66fe2fe215069bbbd10508f8f86331749552f21.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdlib.h> #include <iostream> #include <algorithm> #include "time.h" using namespace std; int factorial(int n) { return (n == 0 || n == 1) ? 1 : factorial(n-1) * n; } __global__ void calculate_edges(int *perms, int *chi...
c66fe2fe215069bbbd10508f8f86331749552f21.cu
#include <stdlib.h> #include <iostream> #include <algorithm> #include "time.h" using namespace std; int factorial(int n) { return (n == 0 || n == 1) ? 1 : factorial(n-1) * n; } __global__ void calculate_edges(int *perms, int *children, int *stops, int *edges, int NUMNODES, int NUMPERMS) { /* Since the per...
55b68f6d07177447bb8425857951181488c3a864.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef _IMAGEPROCESSING_KERNEL #define _IMAGEPROCESSING_KERNEL //#include <helper_math.h> //#include <helper_functions.h> #include <cstdio> #include "../include/timer.h" ///**************** CUDA useful functiions ***************...
55b68f6d07177447bb8425857951181488c3a864.cu
#ifndef _IMAGEPROCESSING_KERNEL #define _IMAGEPROCESSING_KERNEL //#include <helper_math.h> //#include <helper_functions.h> #include <cstdio> #include "../include/timer.h" ///**************** CUDA useful functiions *****************/// /// Useful to read Error from CUDA Calls #define CUDA_CALL(x) {if((x) != cudaSucce...
ccc83353298787c25cbcd4735d826366bbc78886.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <cfloat> #include <vector> #include "caffe/layers/eltwise_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> __global__ void MaxForward(const int nthreads, const Dtype* bottom...
ccc83353298787c25cbcd4735d826366bbc78886.cu
#include <cfloat> #include <vector> #include "caffe/layers/eltwise_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> __global__ void MaxForward(const int nthreads, const Dtype* bottom_data_a, const Dtype* bottom_data_b, const int blob_idx, Dtyp...
18bc14601499d62926912086aaabeacc71530f00.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define TORCH_ASSERT_NO_OPERATORS #include <ATen/OpMathType.h> #include <ATen/native/hip/GridSampler.h> #include <ATen/native/GridSamplerUtils.h> #include <ATen/native/hip/GridSampler.cuh> #include <ATen/native/hip/UpSample.cuh> #in...
18bc14601499d62926912086aaabeacc71530f00.cu
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/OpMathType.h> #include <ATen/native/cuda/GridSampler.h> #include <ATen/native/GridSamplerUtils.h> #include <ATen/native/cuda/GridSampler.cuh> #include <ATen/native/cuda/UpSample.cuh> #include <ATen/cuda/CUDAContext.h> #include <ATen/cuda/detail/TensorInfo.cuh> #include <...
49b0967366368a5ef58c69ee1daa209fb9d4e006.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #define SRAND_VALUE 1985 texture<int,2> gridTex; __global__ void GOL(int dim, int *newGrid) { int iy = blockDim.y * blockIdx.y + threadIdx.y; int ix = blockDim.x * blockIdx.x + th...
49b0967366368a5ef58c69ee1daa209fb9d4e006.cu
#include <stdio.h> #include <stdlib.h> #define SRAND_VALUE 1985 texture<int,2> gridTex; __global__ void GOL(int dim, int *newGrid) { int iy = blockDim.y * blockIdx.y + threadIdx.y; int ix = blockDim.x * blockIdx.x + threadIdx.x; int id = iy * dim + ix; int numNeighbors; float iyTex = (iy +...
97f51728ca3e461ee088f97fbe2c975db1121c73.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of t...
97f51728ca3e461ee088f97fbe2c975db1121c73.cu
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
883e2a71101f2e887ad82605885fecc9c7ca1c98.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include<stdio.h> #include "MNIST_for_C-master/mnist.h" #include<stdio.h> #include<string.h> #include <stdlib.h> #include <stdarg.h> #include<time.h> #include <math.h> #define CHECK(call) \ { \ const hipError_t error = call; \ i...
883e2a71101f2e887ad82605885fecc9c7ca1c98.cu
#include<stdio.h> #include "MNIST_for_C-master/mnist.h" #include<stdio.h> #include<string.h> #include <stdlib.h> #include <stdarg.h> #include<time.h> #include <math.h> #define CHECK(call) \ { \ const cudaError_t error = call; \ if (error != cudaSuccess) \ { \ printf("Error: %s:%d, ", __FILE__, __LINE__); \ print...
c76223d8739dc40dcf5fb97a966fb5b9dac0b922.hip
// !!! This is a file automatically generated by hipify!!! #include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <hiprand/hiprand_kernel.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include "remove_white.cu" #include<chrono> #include<iostream> using names...
c76223d8739dc40dcf5fb97a966fb5b9dac0b922.cu
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <curand_kernel.h> #include <stdlib.h> #include <cuda.h> #include <sys/time.h> #include "remove_white.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24,...
0cc5db9ed311d66fbc79c193cd162a7a9848207e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Parallel bitonic sort using CUDA. * Compile with * nvcc -arch=sm_11 bitonic_sort.cu * Based on http://www.tools-of-computing.com/tc/CS/Sorts/bitonic_sort.htm * License: BSD 3 */ #include <stdlib.h> #include <stdio.h> #in...
0cc5db9ed311d66fbc79c193cd162a7a9848207e.cu
/* * Parallel bitonic sort using CUDA. * Compile with * nvcc -arch=sm_11 bitonic_sort.cu * Based on http://www.tools-of-computing.com/tc/CS/Sorts/bitonic_sort.htm * License: BSD 3 */ #include <stdlib.h> #include <stdio.h> #include <time.h> #define THREADS 512 // 2^9 #define NIM1 13515141 #define NIM2 13515147 #...
12e958a543831cf5a47b6bc6dd4ec05ab1ab5d5d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License,...
12e958a543831cf5a47b6bc6dd4ec05ab1ab5d5d.cu
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
b5bdcf07007e36e97640cbfe9206968c50b96780.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include"matrix.h" #include <cudnn.h> #include <vector> #include <chrono> #define IDX2C(i,j,ld) (((i)*(ld))+(j)) #define CUDA_CALL(f) { \ hipError_t err = (f); \ if (err != hipSuccess) { \ ...
b5bdcf07007e36e97640cbfe9206968c50b96780.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include"matrix.h" #include <cudnn.h> #include <vector> #include <chrono> #define IDX2C(i,j,ld) (((i)*(ld))+(j)) #define CUDA_CALL(f) { \ cudaError_t err = (f); \ if (err != cudaSuccess) { \ std::cout \ << __LINE__ <<":Error occurred: " << ...
8dd7216941a20b74ebed5e5113f16016c4a9bc2c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License,...
8dd7216941a20b74ebed5e5113f16016c4a9bc2c.cu
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
7667c3111e01b915009c26ee85d33b90744446bd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "engine.h" /* __global__ void gp_add_edge(double * d_grid, double * h_grid, double *x, double *y, double z, double *x1, double *y1,int col1,int col2,int row){ int index = blockIdx.x * bloc...
7667c3111e01b915009c26ee85d33b90744446bd.cu
#include "engine.h" /* __global__ void gp_add_edge(double * d_grid, double * h_grid, double *x, double *y, double z, double *x1, double *y1,int col1,int col2,int row){ int index = blockIdx.x * blockDim.x + threadIdx.x; int col_size = col1 + col2; // if((index % col_size) < col1){ ...
3833fb46f4419df1da395f4f52d833c85bfaeb65.hip
// !!! This is a file automatically generated by hipify!!! #if __CUDACC_VER_MAJOR__ > 9 || (__CUDACC_VER_MAJOR__ == 9 && __CUDACC_VER_MINOR__ >= 2) // generated by gen_cutlass_matrix_mul_kern_impls.py // ignore warning of cutlass #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GC...
3833fb46f4419df1da395f4f52d833c85bfaeb65.cu
#if __CUDACC_VER_MAJOR__ > 9 || (__CUDACC_VER_MAJOR__ == 9 && __CUDACC_VER_MINOR__ >= 2) // generated by gen_cutlass_matrix_mul_kern_impls.py // ignore warning of cutlass #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #pragma GCC diagno...
3c61dcb409beba203ab2b1af90beb151758fe475.hip
// !!! This is a file automatically generated by hipify!!! /*The parallel CUDA code for 2D Ising Model simulation using Metropolis Monte Carlo algorithm In this implementation, the random numbers are generated on CPU side. When you install the CUDA environment, you can compile the CUDA code in linux terminal direct...
3c61dcb409beba203ab2b1af90beb151758fe475.cu
/*The parallel CUDA code for 2D Ising Model simulation using Metropolis Monte Carlo algorithm In this implementation, the random numbers are generated on CPU side. When you install the CUDA environment, you can compile the CUDA code in linux terminal directly: nvcc ising1.cu -o ising1 */ #include "cuda_runtime...
5c3812ada25b3d0bb54aa7bcf63f643bc7640f28.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <kernelized_correlation_filters_gpu/cosine_convolution_kernel.h> __host__ __forceinline__ void cuAssert(hipError_t code, char *file, int line, bool abort) { if (code != hipSuccess) { fprintf(stderr, "GPUassert:...
5c3812ada25b3d0bb54aa7bcf63f643bc7640f28.cu
#include <kernelized_correlation_filters_gpu/cosine_convolution_kernel.h> __host__ __forceinline__ void cuAssert(cudaError_t code, char *file, int line, bool abort) { if (code != cudaSuccess) { fprintf(stderr, "GPUassert: %s %s %dn", cudaGetErrorString(code), file, line); if (abort) {...
2c21643bb7f683acf693987b00064924a3e1589e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //========================================================================================================================================================================================================200 // DEFINE/INCLUDE //======...
2c21643bb7f683acf693987b00064924a3e1589e.cu
//========================================================================================================================================================================================================200 // DEFINE/INCLUDE //==============================================================================================...
952ae7011fd78ec1746ddd878b27391207012245.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <string.h> #include <fstream> #include <limits.h> #include <float.h> #include <hip/hip_runtime_api.h> #include "helper.h" ////////////////////////...
952ae7011fd78ec1746ddd878b27391207012245.cu
#include <cuda.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <string.h> #include <fstream> #include <limits.h> #include <float.h> #include <cuda_profiler_api.h> #include "helper.h" ///////////////////////////////////////////////////////////////////////// // Init //////////////...
e4e58d82b0a290e0992a2e8d9e297bb0a127cfc0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #define NUM_BLOCKS 16 #define BLOCK_WIDTH 1 __global__ void hello() { printf("Hello world! I'm a thread in block %d\n",blockIdx.x); } __global__ void use_local_memory_G...
e4e58d82b0a290e0992a2e8d9e297bb0a127cfc0.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #define NUM_BLOCKS 16 #define BLOCK_WIDTH 1 __global__ void hello() { printf("Hello world! I'm a thread in block %d\n",blockIdx.x); } __global__ void use_local_memory_GPU(float in) { float f; f = in; } __global__ void use_globa...
d48d8c12667d1ed45f852c95dba5aa5ef3b93c53.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <cmath> #include <cstdio> #include <iostream> #include <chrono> using namespace std; // Compute vector sum C = A + B void vecAddCPU(float *h_A, float* h_B, float* h_C, int n) { for (int i = 0; i < n; i++) { h_C[i] = h_...
d48d8c12667d1ed45f852c95dba5aa5ef3b93c53.cu
#include <cuda.h> #include <cmath> #include <cstdio> #include <iostream> #include <chrono> using namespace std; // Compute vector sum C = A + B void vecAddCPU(float *h_A, float* h_B, float* h_C, int n) { for (int i = 0; i < n; i++) { h_C[i] = h_A[i] + h_B[i]; } } // Compute vector sum C = A + B // Each thread pe...
558e36408f05438aedad2d4ba2851fafa15f2643.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "fp_gpu.cuh" __global__ void fp_conv_pool(int idx,bool flag) { int i,j,k,l,m; i=threadIdx.x+blockDim.x*blockIdx.x; j=threadIdx.y+blockDim.y*blockIdx.y; __shared__ float tile[CONV_W_NUM][CONV_SIZE][CONV_SIZ...
558e36408f05438aedad2d4ba2851fafa15f2643.cu
#include "fp_gpu.cuh" __global__ void fp_conv_pool(int idx,bool flag) { int i,j,k,l,m; i=threadIdx.x+blockDim.x*blockIdx.x; j=threadIdx.y+blockDim.y*blockIdx.y; __shared__ float tile[CONV_W_NUM][CONV_SIZE][CONV_SIZE]; if(i<ROW&&j<COL) { if(flag) _input[idx%N_STREAM][i][j]=...
192b4ebe5c266d97487e250cdfa1ce08b6280aea.hip
// !!! This is a file automatically generated by hipify!!! #include "heat3d.h" #define checkCuda(error) __checkCuda(error, __FILE__, __LINE__) //////////////////////////////////////////////////////////////////////////////// // A method for checking error in CUDA calls /////////////////////////////////////////////////...
192b4ebe5c266d97487e250cdfa1ce08b6280aea.cu
#include "heat3d.h" #define checkCuda(error) __checkCuda(error, __FILE__, __LINE__) //////////////////////////////////////////////////////////////////////////////// // A method for checking error in CUDA calls //////////////////////////////////////////////////////////////////////////////// inline void __checkCuda(cud...
4d7838e33340562f27bb43416d11b3fac18412ac.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_multidim_reduce_kernel; int xdim0_multidim_reduce_kernel_h = -1; __constant__ int ydim0_multidim_reduce_kernel; int ydim0_multidim_reduce_kernel_h = -1; #undef OPS_ACC_MD0 ...
4d7838e33340562f27bb43416d11b3fac18412ac.cu
// // auto-generated by ops.py // __constant__ int xdim0_multidim_reduce_kernel; int xdim0_multidim_reduce_kernel_h = -1; __constant__ int ydim0_multidim_reduce_kernel; int ydim0_multidim_reduce_kernel_h = -1; #undef OPS_ACC_MD0 #define OPS_ACC_MD0(d,x,y) ((x)+(xdim0_multidim_reduce_kernel*(y))+(d)*xdim0_multidim_r...
850dcd154dac37d38446a9e0dd9a56815cc36ef8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include<math.h> #include<stdio.h> const double EPSILON = 1.0e-15; const double a = 1.23; const double b = 2.34; const double c = 3.57; void __global__ add(const double *x, const double *y, double *z); void check(const double *z,...
850dcd154dac37d38446a9e0dd9a56815cc36ef8.cu
#include<math.h> #include<stdio.h> const double EPSILON = 1.0e-15; const double a = 1.23; const double b = 2.34; const double c = 3.57; void __global__ add(const double *x, const double *y, double *z); void check(const double *z, const int N); int main() { const int N = 100000000; const int M = sizeof(doubl...
1873eba89aa4f765236eb55a0b6728ce8b12ce29.hip
// !!! This is a file automatically generated by hipify!!! #include<cuda_runtime.h> int main(){ int ** ptr; ptr = (int**)malloc(10*sizeof(int*)); int ** tmp; hipMalloc((void**)&temp, 10*sizeof(int*)); hipMemcpy(ptr, tmp, 10*sizeof(int*), hipMemcpyDeviceToHost);
1873eba89aa4f765236eb55a0b6728ce8b12ce29.cu
#include<cuda_runtime.h> int main(){ int ** ptr; ptr = (int**)malloc(10*sizeof(int*)); int ** tmp; cudaMalloc((void**)&temp, 10*sizeof(int*)); cudaMemcpy(ptr, tmp, 10*sizeof(int*), cudaMemcpyDeviceToHost);
daf97cd18d325bda6c10bcfb7af82a4c1381793f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2023, NVIDIA CORPORATION. * * 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 * *...
daf97cd18d325bda6c10bcfb7af82a4c1381793f.cu
/* * Copyright (c) 2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
07aacefd8760ccaa35812bc4a90396b87264a4d6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void transpose_v3(float* a,float* b, int n){ int tx = threadIdx.x; int ty = threadIdx.y; int bx = blockIdx.x; int by = blockIdx.y; int i = bx*BX + tx; int j = by*BY + ty; __shared__ float tile[BY...
07aacefd8760ccaa35812bc4a90396b87264a4d6.cu
#include "includes.h" __global__ void transpose_v3(float* a,float* b, int n){ int tx = threadIdx.x; int ty = threadIdx.y; int bx = blockIdx.x; int by = blockIdx.y; int i = bx*BX + tx; int j = by*BY + ty; __shared__ float tile[BY][BX+1]; //Very slight modification to avoid bank conflict in shared mem if(i >= n || j...
4d074dabbe39c91e2ffa7781cbf11021d0b2746a.hip
// !!! This is a file automatically generated by hipify!!! /*------------------------------------------------------------------------- * * CUDA function for backrpojection using FDK weigts for CBCT * * * CODE by Ander Biguri * Optimized and modified by RB * ---------------------------------------------...
4d074dabbe39c91e2ffa7781cbf11021d0b2746a.cu
/*------------------------------------------------------------------------- * * CUDA function for backrpojection using FDK weigts for CBCT * * * CODE by Ander Biguri * Optimized and modified by RB * --------------------------------------------------------------------------- * -------------------------...
benchmark.hip
// !!! This is a file automatically generated by hipify!!! #include "nbody.cuh" #define ITERS 100 int main(int argc, char** argv){ hipEvent_t start, stop; float elapsedTime; initCUDA(); hipEventCreate(&start); hipEventRecord(start,0); // execute kernel for (int j = 0; j < ITERS; j++) runKernelNBod...
benchmark.cu
#include "nbody.cuh" #define ITERS 100 int main(int argc, char** argv){ cudaEvent_t start, stop; float elapsedTime; initCUDA(); cudaEventCreate(&start); cudaEventRecord(start,0); // execute kernel for (int j = 0; j < ITERS; j++) runKernelNBodySimulation(); cudaThreadSynchronize(); cudaEventCrea...
9a990fa84828f31543befd0e6d838a5efbf9d3d4.hip
// !!! This is a file automatically generated by hipify!!! // generated by gen_cuda_conv_bias_kern_impls.py #include "../conv_bias_int8_implicit_gemm_cdiv4hwn4_ld_64bit.cuinl" template void megdnn::cuda::conv_bias_int8::do_conv_bias_int8_implicit_gemm_cdiv4hwn4_ld_64bit<PerChannelBiasVisitor, IConvEpilogue<Ac...
9a990fa84828f31543befd0e6d838a5efbf9d3d4.cu
// generated by gen_cuda_conv_bias_kern_impls.py #include "../conv_bias_int8_implicit_gemm_cdiv4hwn4_ld_64bit.cuinl" template void megdnn::cuda::conv_bias_int8::do_conv_bias_int8_implicit_gemm_cdiv4hwn4_ld_64bit<PerChannelBiasVisitor, IConvEpilogue<Activation<megdnn::param_enumv::ConvBias::NonlineMode::IDENTI...
f4c914f623c050c049cd979a227838f3e0e961fe.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.5.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2019 @precisions mixed zc -> ds @author Mark Gates */ ...
f4c914f623c050c049cd979a227838f3e0e961fe.cu
/* -- MAGMA (version 2.5.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2019 @precisions mixed zc -> ds @author Mark Gates */ #include "magma_internal.h" #define BLK_X 64 #define BLK_Y 32 /* Divides matrix i...
347b512c6c960b00450c65883a39c44998482a07.hip
// !!! This is a file automatically generated by hipify!!! ////---------------------------------------- // two-dimensional Fokker-Planck equation // //---------------------------------------- // parameters of simulations are in "input_FP.par" // // compile: // nvcc fokker-planck_2d.cu -lcuda -lcufft -lcublas -O3 -arch...
347b512c6c960b00450c65883a39c44998482a07.cu
////---------------------------------------- // two-dimensional Fokker-Planck equation // //---------------------------------------- // parameters of simulations are in "input_FP.par" // // compile: // nvcc fokker-planck_2d.cu -lcuda -lcufft -lcublas -O3 -arch sm_20 -o fp2d // // produces output files "n_#####.dat" w...
d9386b5d8b3cd8a3c8187be53062256962ef9c88.hip
// !!! This is a file automatically generated by hipify!!! // Copyright 2007-2020 The scikit-learn developers. // Copyright 2020 Google LLC. // Copyright 2021 Teddy Koker. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that...
d9386b5d8b3cd8a3c8187be53062256962ef9c88.cu
// Copyright 2007-2020 The scikit-learn developers. // Copyright 2020 Google LLC. // Copyright 2021 Teddy Koker. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // a. Redistribut...
5bd2c8cc5e60a251216e290fcce03643e1c731b6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // UCSD Phys244 // Spring 2018 // Andreas Goetz (agoetz@sdsc.edu) // CUDA program to square matrix elements in parallel on the GPU // // /* FIXME */ COMMENTS NEED MODIFICATION // #include<stdio.h> // define matrix size, number of...
5bd2c8cc5e60a251216e290fcce03643e1c731b6.cu
// UCSD Phys244 // Spring 2018 // Andreas Goetz (agoetz@sdsc.edu) // CUDA program to square matrix elements in parallel on the GPU // // /* FIXME */ COMMENTS NEED MODIFICATION // #include<stdio.h> // define matrix size, number of blocks NBL and threads per block TPB #define NROW 2048 #define NCOL 512 #define NBLX 32...
31c4c6dca41918768f1a3fe35d7484f190425a6f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include"firstorder.h" int *Calculate_firstorder_rl(const int *image, int *Range, int MASK_VALUE, int *size, int *stride,int Ng, int bin_width, int batch_size) { //START_TIMER(time) // getting the max value of the image intensity...
31c4c6dca41918768f1a3fe35d7484f190425a6f.cu
#include"firstorder.h" int *Calculate_firstorder_rl(const int *image, int *Range, int MASK_VALUE, int *size, int *stride,int Ng, int bin_width, int batch_size) { //START_TIMER(time) // getting the max value of the image intensity int dev_bin = Ng * bin_width; int nbytes_image = sizeof(int) * size[0] * size[1] * ba...
0a27df746ec4e826f002831f5f2cb8f107c61a0f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "culayer.hpp" #include <stdio.h> // https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf #define DIV_UP(x,y) (1 + ((x - 1) / y)) __constant__ seed_t RNG_G = (seed_t)(6364136223846793005ull); __constant_...
0a27df746ec4e826f002831f5f2cb8f107c61a0f.cu
#include "culayer.hpp" #include <stdio.h> // https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf #define DIV_UP(x,y) (1 + ((x - 1) / y)) __constant__ seed_t RNG_G = (seed_t)(6364136223846793005ull); __constant__ seed_t RNG_C = (seed_t)(1442695040888963407ull); __constant__ seed_t RNG_P = (seed_t)(...
997ca88979e0d9f122859d3d9d96c8c768a14f68.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*! * \file lbmFlowAroundCylinder.cu * \brief Cuda version based on lbm_sailfish_hist and lbm_opt1. * \author Adrien Python * \date 28.01.2017 */ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <stdb...
997ca88979e0d9f122859d3d9d96c8c768a14f68.cu
/*! * \file lbmFlowAroundCylinder.cu * \brief Cuda version based on lbm_sailfish_hist and lbm_opt1. * \author Adrien Python * \date 28.01.2017 */ #include <stdlib.h> #include <stdio.h> #include <math.h> #include <stdbool.h> #include <lbm.h> #define RE 220.0 // Reynolds number #define NX ...
125786e8da844f85699d0405c25bbf4ae94ec10f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel4_plus_2_back; int xdim0_update_halo_kernel4_plus_2_back_h = -1; __constant__ int ydim0_update_halo_kernel4_plus_2_back; int ydim0_update_halo_kernel4_plus_2...
125786e8da844f85699d0405c25bbf4ae94ec10f.cu
// // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel4_plus_2_back; int xdim0_update_halo_kernel4_plus_2_back_h = -1; __constant__ int ydim0_update_halo_kernel4_plus_2_back; int ydim0_update_halo_kernel4_plus_2_back_h = -1; __constant__ int xdim1_update_halo_kernel4_plus_2_back; int xdim1_update_h...
87b4d093e36105a729530f7ae6d87dd452368c5a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of t...
87b4d093e36105a729530f7ae6d87dd452368c5a.cu
// Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
ea9ada20eef34ce92b85bab0a05cb786f41e5f97.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <rocblas.h> #include <vector> #include <string> #include <iostream> #include <fstream> #include <cstring> #define IMAGE_SAVE #define IMAGE_LOAD #include "image.hpp" #include "autoencoder.hpp" #define HIDDEN 10 #define P...
ea9ada20eef34ce92b85bab0a05cb786f41e5f97.cu
#include <cuda.h> #include <cublas_v2.h> #include <vector> #include <string> #include <iostream> #include <fstream> #include <cstring> #define IMAGE_SAVE #define IMAGE_LOAD #include "image.hpp" #include "autoencoder.hpp" #define HIDDEN 10 #define PS 160 #define SZ (PS*PS) int main() { using namespace ml::image; ...
43ece79be7129e5d32a5ecb2af093d2fd32b2ff5.hip
// !!! This is a file automatically generated by hipify!!! //, (, ) #include <hip/hip_runtime.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctime> //---------------------------------------------- // (GPU) ** __global__ , void** __global__ void gpu_add(float* c, float* a, flo...
43ece79be7129e5d32a5ecb2af093d2fd32b2ff5.cu
//多區塊, 多執行緒 (不使用迴圈, 用網格與區塊設定代替) #include <cuda.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctime> //---------------------------------------------- //向量加法的運算核心 (GPU) **函式前加 __global__ 即為核心, 核心只傳回 void** __global__ void gpu_add(float* c, float* a, float* b, int n){ int...
08e802bd0d345611b0df8e8ed5583190dbaf9040.hip
// !!! This is a file automatically generated by hipify!!! // nvcc -std=c++11 GPU_main.cu -o GPU_main -lrealsense2 -lboost_iostreams -lboost_system -lboost_filesystem `pkg-config opencv --cflags --libs` -lpthread -Wno-deprecated-gpu-targets #include <opencv2/opencv.hpp> #include <iostream> #include <fstream> #include...
08e802bd0d345611b0df8e8ed5583190dbaf9040.cu
// nvcc -std=c++11 GPU_main.cu -o GPU_main -lrealsense2 -lboost_iostreams -lboost_system -lboost_filesystem `pkg-config opencv --cflags --libs` -lpthread -Wno-deprecated-gpu-targets #include <opencv2/opencv.hpp> #include <iostream> #include <fstream> #include <vector> #include <cmath> #include <unistd.h> #include <mu...
bd1c78597b34332284574229a3a89d7f44f0eecf.hip
// !!! This is a file automatically generated by hipify!!! ////////////////////////////////////////////////////////////////////////////////// /// /// @sandmanCUDA.cu /// @author Phil Bentley <phil.m.bentley@gmail.com /// @version 1.0 /// /// @section LICENSE /// /// BSD 3-Clause License /// /// Copyr...
bd1c78597b34332284574229a3a89d7f44f0eecf.cu
////////////////////////////////////////////////////////////////////////////////// /// /// @sandmanCUDA.cu /// @author Phil Bentley <phil.m.bentley@gmail.com /// @version 1.0 /// /// @section LICENSE /// /// BSD 3-Clause License /// /// Copyright (c) 2016, Phil Bentley /// All rights reserved. /// ...
f7ac0d3b0924a6f2b6f54c37c9d02cd3258c2636.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 2015 Netherlands eScience Center, VU University Amsterdam, and Netherlands Forensic Institute * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with t...
f7ac0d3b0924a6f2b6f54c37c9d02cd3258c2636.cu
/* * Copyright 2015 Netherlands eScience Center, VU University Amsterdam, and Netherlands Forensic Institute * * 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...
582ba2e16bc214c951c96d824a10cb083c6e0900.hip
// !!! This is a file automatically generated by hipify!!! // do not modify this file // call each kernel implemented in the kernel.cu // generates timing info // tests for functional verification #include <thrust/sort.h> #include <thrust/execution_policy.h> #include <thrust/device_ptr.h> #include <hip/hip_runtime.h> ...
582ba2e16bc214c951c96d824a10cb083c6e0900.cu
// do not modify this file // call each kernel implemented in the kernel.cu // generates timing info // tests for functional verification #include <thrust/sort.h> #include <thrust/execution_policy.h> #include <thrust/device_ptr.h> #include <cuda_runtime.h> #include<stdlib.h> #include <wb.h> #include "kernel.cu" #defin...
7a2d0bad415e2c29dc1def47ad5cf1636ad88566.hip
// !!! This is a file automatically generated by hipify!!! /** * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction,...
7a2d0bad415e2c29dc1def47ad5cf1636ad88566.cu
/** * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and relate...
614f23050442c71fbaab9729d60ff15480393212.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // noshared.cu // // Variant of the gradient not using shared memory. // // u = grad(f) // u is a vector field and f a scalar field. __global__ void grad_kernel_noshared(const real* __restrict__ f, real * __restrict__ u, const real...
614f23050442c71fbaab9729d60ff15480393212.cu
// noshared.cu // // Variant of the gradient not using shared memory. // // u = grad(f) // u is a vector field and f a scalar field. __global__ void grad_kernel_noshared(const real* __restrict__ f, real * __restrict__ u, const real xfactor, const real yfactor, const real zfactor) { // Global indices const int xi...