hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
ab16843dbde3dab417b9738a0f9993b21e78d187.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void MatrixMulVarKernel(float* M, float* N, float* P, int widthAHeightB, int heightA, int widthB) { int Row = blockIdx.y*blockDim.y+threadIdx.y;// Calculate the row index of the P element and M int C...
ab16843dbde3dab417b9738a0f9993b21e78d187.cu
#include "includes.h" __global__ void MatrixMulVarKernel(float* M, float* N, float* P, int widthAHeightB, int heightA, int widthB) { int Row = blockIdx.y*blockDim.y+threadIdx.y;// Calculate the row index of the P element and M int Col = blockIdx.x*blockDim.x+threadIdx.x;// Calculate the column index of P and N if ((Row...
ea21e2444b582b6db5ace65698d28e399294826c.hip
// !!! This is a file automatically generated by hipify!!! #define CUB_STDERR // print CUDA runtime errors to console #include <hipcub/hipcub.hpp> #include <hipcub/hipcub.hpp> #include <stdio.h> using namespace cub; CachingDeviceAllocator g_allocator(true); // Caching allocator for device memory int main(int argc, cha...
ea21e2444b582b6db5ace65698d28e399294826c.cu
#define CUB_STDERR // print CUDA runtime errors to console #include <cub/device/device_reduce.cuh> #include <cub/util_allocator.cuh> #include <stdio.h> using namespace cub; CachingDeviceAllocator g_allocator(true); // Caching allocator for device memory int main(int argc, char **argv) { cudaEvent_t start; cudaEven...
memspace.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Using different memory spaces in CUDA #include <stdio.h> /********************** * using local memory * **********************/ // a __device__ or __global__ function runs on the GPU __global__ void use_local_memory_GPU(float...
memspace.cu
// Using different memory spaces in CUDA #include <stdio.h> /********************** * using local memory * **********************/ // a __device__ or __global__ function runs on the GPU __global__ void use_local_memory_GPU(float in) { float f; // variable "f" is in local memory and private to each thread ...
1d0eb6b5f66650eb34508cca5c7f2918cb8e612d.hip
// !!! This is a file automatically generated by hipify!!! #include "linux_helper.h" #include "Emitter.cuh" #include "../Graphics.h" #include "../Engine.h" #include "../Camera.h" #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <cuda_gl_interop.h> #include <device_launch_parameters.h> #include <iost...
1d0eb6b5f66650eb34508cca5c7f2918cb8e612d.cu
#include "linux_helper.h" #include "Emitter.cuh" #include "../Graphics.h" #include "../Engine.h" #include "../Camera.h" #include <cuda.h> #include <cuda_runtime.h> #include <cuda_gl_interop.h> #include <device_launch_parameters.h> #include <iostream> enum SHADER_ATTRIBUTES_IDX { POSITION = 0, SIZE = 1, T...
eacccb3885e9c14fca30f9803153514f0649d335.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/THCTensorTopK.cu" #else THC_API void THCTensor_(topk)(THCState* state, THCTensor *topK, THCudaLongTensor *indi...
eacccb3885e9c14fca30f9803153514f0649d335.cu
#ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/THCTensorTopK.cu" #else THC_API void THCTensor_(topk)(THCState* state, THCTensor *topK, THCudaLongTensor *indices, THCTensor *input, int...
4dc673cb7f830dae597efe376195643361ab6e91.hip
// !!! This is a file automatically generated by hipify!!! #ifndef __HIPCC__ #define __HIPCC__ #endif #include <hip/hip_runtime.h> #include "device_launch_parameters.h" #include <hip/hip_runtime.h> #include "hip/device_functions.h" #include <hip/hip_runtime_api.h> #include <stdio.h> #include <time.h> #include <window...
4dc673cb7f830dae597efe376195643361ab6e91.cu
#ifndef __CUDACC__ #define __CUDACC__ #endif #include <cuda_runtime.h> #include "device_launch_parameters.h" #include <cuda.h> #include "device_functions.h" #include <cuda_runtime_api.h> #include <stdio.h> #include <time.h> #include <windows.h> #include < time.h > #include <iostream> //---------------------------...
f8f694eb3071eef1876de094f7c9ff314cd1439d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 2016 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 * * ...
f8f694eb3071eef1876de094f7c9ff314cd1439d.cu
/* * Copyright 2016 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 ...
a6fe85a97eb0eeefb28567112451834ec160088e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/FusedRNNKernel.cu" #else #include <cstdarg> #include "../common.h" #define DATATYPE TensorUtils<THCTensor>::DataType //factor will be 3 for GRU and 4 for LSTM void THNN_(...
a6fe85a97eb0eeefb28567112451834ec160088e.cu
#ifndef THC_GENERIC_FILE #define THC_GENERIC_FILE "generic/FusedRNNKernel.cu" #else #include <cstdarg> #include "../common.h" #define DATATYPE TensorUtils<THCTensor>::DataType //factor will be 3 for GRU and 4 for LSTM void THNN_(FusedRNNAssertSizes)(THCState *state, int factor, int count, ...) { va_list list; va...
0b98b70448e5133f30617014e70d3846811e691b.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime.h> #define ARRAY_SIZE 64 __global__ void SquareKernel(float *d_out, float *d_in) { int idx = blockIdx.x * blockDim.x + threadIdx.x; float val = d_in[idx]; d_out[idx] = val * val; } int main() { const int ARRA...
0b98b70448e5133f30617014e70d3846811e691b.cu
#include <stdio.h> #include <cuda.h> #define ARRAY_SIZE 64 __global__ void SquareKernel(float *d_out, float *d_in) { int idx = blockIdx.x * blockDim.x + threadIdx.x; float val = d_in[idx]; d_out[idx] = val * val; } int main() { const int ARRAY_BYTES = ARRAY_SIZE * sizeof(float); // Allocate the array on the h...
52c17749db337150209219d924b970b0cdd7ac19.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include <cstdlib> #include <cstdio> #include <hip/hip_runtime.h> #include <sys/time.h> double get_time() { struct timeval tv; gettimeofday(&tv, nullptr); return tv.tv_sec + 1e-6 * tv.tv_usec; } constexpr int m = 256; inline __devic...
52c17749db337150209219d924b970b0cdd7ac19.cu
#include <iostream> #include <cstdlib> #include <cstdio> #include <cuda_runtime.h> #include <sys/time.h> double get_time() { struct timeval tv; gettimeofday(&tv, nullptr); return tv.tv_sec + 1e-6 * tv.tv_usec; } constexpr int m = 256; inline __device__ int indirect(int *c, int i) { // return c[c[i & 127] & 1...
e9814b72a48e8e6d8f6830ca41106a069095004b.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2019-2021, 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.o...
e9814b72a48e8e6d8f6830ca41106a069095004b.cu
/* * Copyright (c) 2019-2021, 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...
f4bbf2ce140303ab16753e7f6454fbe17737c185.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_advec_cell_kernel2_ydir; int xdim0_advec_cell_kernel2_ydir_h = -1; __constant__ int ydim0_advec_cell_kernel2_ydir; int ydim0_advec_cell_kernel2_ydir_h = -1; __constant__ int x...
f4bbf2ce140303ab16753e7f6454fbe17737c185.cu
// // auto-generated by ops.py // __constant__ int xdim0_advec_cell_kernel2_ydir; int xdim0_advec_cell_kernel2_ydir_h = -1; __constant__ int ydim0_advec_cell_kernel2_ydir; int ydim0_advec_cell_kernel2_ydir_h = -1; __constant__ int xdim1_advec_cell_kernel2_ydir; int xdim1_advec_cell_kernel2_ydir_h = -1; __constant__ int...
94faa4d7859effc960fbc4c9338b1772f1e7446a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel2_yvel_plus_4_front; int xdim0_update_halo_kernel2_yvel_plus_4_front_h = -1; __constant__ int ydim0_update_halo_kernel2_yvel_plus_4_front; int ydim0_update_h...
94faa4d7859effc960fbc4c9338b1772f1e7446a.cu
// // auto-generated by ops.py // __constant__ int xdim0_update_halo_kernel2_yvel_plus_4_front; int xdim0_update_halo_kernel2_yvel_plus_4_front_h = -1; __constant__ int ydim0_update_halo_kernel2_yvel_plus_4_front; int ydim0_update_halo_kernel2_yvel_plus_4_front_h = -1; __constant__ int xdim1_update_halo_kernel2_yvel_pl...
0c4390588380cd490fd46eeba9efd851a57047fd.hip
// !!! This is a file automatically generated by hipify!!! /* Kam Pui So (Anthony) CS510 GPU Project Group A Appliction: Matrix Addition base on CUDA TOOLKIT Documentation */ #include <sys/time.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <hip/hip_runtim...
0c4390588380cd490fd46eeba9efd851a57047fd.cu
/* Kam Pui So (Anthony) CS510 GPU Project Group A Appliction: Matrix Addition base on CUDA TOOLKIT Documentation */ #include <sys/time.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <cuda_profiler_api.h> //global //const int TESTSIZE[] = {1, 2, 4, 8, 16, ...
efecff5d19235f9e6980434efa6db9ddf955c8fb.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" __global__ void kernel_add_proj(float *d_a, float *d_b) { int idx = blockDim.x * gridDim.x * blockIdx.y + blockDim.x * blockIdx.x + threadIdx.x; d_a[idx]=d_a[idx]+d_b[idx]; } __global__ void kernel_divide_proj(float *h_proj_...
efecff5d19235f9e6980434efa6db9ddf955c8fb.cu
__global__ void kernel_add_proj(float *d_a, float *d_b) { int idx = blockDim.x * gridDim.x * blockIdx.y + blockDim.x * blockIdx.x + threadIdx.x; d_a[idx]=d_a[idx]+d_b[idx]; } __global__ void kernel_divide_proj(float *h_proj_single, float *h_proj_sumLen, float *h_proj_weightedLen) { int idx = blockDim.x * gridD...
2a7e9d9aaa707eaa31b9a136de41f814e1e2b47e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <unittest/unittest.h> #include <thrust/sort.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator, typename Compare, typename Iterator2> __global__ voi...
2a7e9d9aaa707eaa31b9a136de41f814e1e2b47e.cu
#include "hip/hip_runtime.h" #include <unittest/unittest.h> #include <thrust/sort.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator, typename Compare, typename Iterator2> __global__ void sort_kernel(ExecutionPolicy exec, Iterator first, Iterato...
41488da5ae4145f9020b03c9edf0493693575181.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * nvbio * Copyright (c) 2011-2014, 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...
41488da5ae4145f9020b03c9edf0493693575181.cu
/* * nvbio * Copyright (c) 2011-2014, 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,...
65822776725d6ebb22e56a1b7e758c11f2874468.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <cuPrintf.cu> #include <float.h> #include "kernels.hip" #include "naive.h" #include <string.h> //#define eps_f FLT_EPSILON int main(int argc, char** argv){ size_t buff=999999...
65822776725d6ebb22e56a1b7e758c11f2874468.cu
#include <stdio.h> #include <stdlib.h> #include <cuPrintf.cu> #include <float.h> #include "kernels.cu" #include "naive.h" #include <string.h> //#define eps_f FLT_EPSILON int main(int argc, char** argv){ size_t buff=9999999; cudaPrintfInit(buff); if(argc < 2){ puts("neoNbody: Usage: neoNbody numPoints"); ...
e47c0e1c615685e17a93c08dd125340d74d6951f.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2019, 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/li...
e47c0e1c615685e17a93c08dd125340d74d6951f.cu
/* * Copyright (c) 2019, 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 ...
f08ff6bff5586718fe931fef85962bb7e1f7c410.hip
// !!! This is a file automatically generated by hipify!!! /** * Copyright (c) 2020 by Contributors * @file array/cuda/csr2coo.cc * @brief CSR2COO */ #include <dgl/array.h> #include <thrust/iterator/constant_iterator.h> #include <thrust/iterator/counting_iterator.h> #include <thrust/iterator/transform_iterator.h> ...
f08ff6bff5586718fe931fef85962bb7e1f7c410.cu
/** * Copyright (c) 2020 by Contributors * @file array/cuda/csr2coo.cc * @brief CSR2COO */ #include <dgl/array.h> #include <thrust/iterator/constant_iterator.h> #include <thrust/iterator/counting_iterator.h> #include <thrust/iterator/transform_iterator.h> #include "../../runtime/cuda/cuda_common.h" #include "./dg...
444d74ffdc70e4bfb94cd2b997795cfee7effa9e.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <string.h> #include <math.h> #include <hip/hip_runtime.h> #include <sys/time.h> #include <time.h> #ifndef BLOCK_SIZE #define BLOCK_SIZE 256 #endif #ifndef N_ELEMS #define N_ELEMS 753411 #endif // Src: Lab1-CudaIntro. Get time d...
444d74ffdc70e4bfb94cd2b997795cfee7effa9e.cu
#include <stdio.h> #include <string.h> #include <math.h> #include <cuda_runtime.h> #include <sys/time.h> #include <time.h> #ifndef BLOCK_SIZE #define BLOCK_SIZE 256 #endif #ifndef N_ELEMS #define N_ELEMS 753411 #endif // Src: Lab1-CudaIntro. Get time difference int timeval_subtract( struct timeval *resul...
07e25505a838c8beff664e90ea4b23cc61e5aee6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <algorithm> __global__ void kernel(int i, double *a) { int idx = threadIdx.x + blockIdx.x*blockDim.x; a[idx] = i; } int main() { auto count = 13; auto n = 1024; auto n_bytes = n * ...
07e25505a838c8beff664e90ea4b23cc61e5aee6.cu
#include <iostream> #include <algorithm> __global__ void kernel(int i, double *a) { int idx = threadIdx.x + blockIdx.x*blockDim.x; a[idx] = i; } int main() { auto count = 13; auto n = 1024; auto n_bytes = n * sizeof(double); double *a[count]; cudaStream_t streams[count]; for (auto i...
f2dcfdb6ef5afc54433159dfeff04e721d60ccff.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "mex.h" #include "gpu/mxGPUArray.h" #include "matrix.h" #include "rocblas.h" #include "helper_cuda.h" #define BLOCK_THREAD_DIM 32 __global__ void generate_dct_matrix_coefficients(double *A, double *AT, double N); void mex...
f2dcfdb6ef5afc54433159dfeff04e721d60ccff.cu
#include "mex.h" #include "gpu/mxGPUArray.h" #include "matrix.h" #include "cublas_v2.h" #include "helper_cuda.h" #define BLOCK_THREAD_DIM 32 __global__ void generate_dct_matrix_coefficients(double *A, double *AT, double N); void mexFunction(int nlhs, mxArray *plhs[], int nrhs, mxArray const *prhs[]){ /* Declare al...
766f0e63afc143abba0087d5c91aa2cd48d65c5d.hip
// !!! This is a file automatically generated by hipify!!! /* Copyright (c) 2020 Simon Donn, Max Planck Institute for Intelligent Systems, Tuebingen, Germany 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...
766f0e63afc143abba0087d5c91aa2cd48d65c5d.cu
/* Copyright (c) 2020 Simon Donné, Max Planck Institute for Intelligent Systems, Tuebingen, Germany Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitatio...
664dd02eaff60b19b1167d4915906fb52621d6d4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define WIDTH 300 #define HEIGHT 300 #define WIDTH_PER_BLOCK 300 #define HEIGHT_PER_BLOCK 1 #define WIDTH_PER_THREADS 1 #define HEIGHT_PER_THREADS 1 #define NUM 16 #define MAX_DEPTH 10 #define SAMPLE 4 #define WARP_SIZE 32 #includ...
664dd02eaff60b19b1167d4915906fb52621d6d4.cu
#define WIDTH 300 #define HEIGHT 300 #define WIDTH_PER_BLOCK 300 #define HEIGHT_PER_BLOCK 1 #define WIDTH_PER_THREADS 1 #define HEIGHT_PER_THREADS 1 #define NUM 16 #define MAX_DEPTH 10 #define SAMPLE 4 #define WARP_SIZE 32 #include <glut/gl3w.h> #include <Windows.h> #include <stdio.h> #include "surface_functions.h" ...
14999ecdfd6442dd75baeb7ed724372e2830e9fc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at *...
14999ecdfd6442dd75baeb7ed724372e2830e9fc.cu
/* ****************************************************************************** * * * 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. * * See the NOTICE file distributed wit...
c8b6dbcc9806d20202f88c6fc603df595d134dec.hip
// !!! This is a file automatically generated by hipify!!! #ifdef _WIN32 # define WINDOWS_LEAN_AND_MEAN # define NOMINMAX # include <windows.h> #endif #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <float.h> #include "helper_cuda.h" #include "helper_timer.h" #include <iostream>...
c8b6dbcc9806d20202f88c6fc603df595d134dec.cu
#ifdef _WIN32 # define WINDOWS_LEAN_AND_MEAN # define NOMINMAX # include <windows.h> #endif #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <float.h> #include "helper_cuda.h" #include "helper_timer.h" #include <iostream> #include "bucketsort.cuh" #include "mergesort.cuh" using n...
033eec2c456caf2e0fc8f01e60b5d344055e9fe7.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // G5 // Finding number of K-Cliques in an undirected graph // Find made iterative, one thread per subtree #include <iostream> #include <algorithm> #include <map> #include <chrono> #include <assert.h> // error checking macro #defi...
033eec2c456caf2e0fc8f01e60b5d344055e9fe7.cu
// G5 // Finding number of K-Cliques in an undirected graph // Find made iterative, one thread per subtree #include <iostream> #include <algorithm> #include <map> #include <chrono> #include <assert.h> // error checking macro #define cudaCheckErrors(msg) \ do { \ cudaError_t __err = cudaGetLastError(); \ ...
71761ee089436a1c2d704a02c748b460fb8011ea.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" extern "C" __global__ void solve_jit_flipped(double *rateConst, double *state, double *deriv, int numcell) { ...
71761ee089436a1c2d704a02c748b460fb8011ea.cu
extern "C" __global__ void solve_jit_flipped(double *rateConst, double *state, double *deriv, int numcell) { size_t tid; ...
158bb34fcddb9509615fbba7c08940cd3e7ab99b.hip
// !!! This is a file automatically generated by hipify!!! #include "stereo.h" Stereo::Stereo() { this->BlockWidth = 32; this->BlockHeight = 12; this->StrideAlignment = 32; } Stereo::Stereo(int BlockWidth, int BlockHeight, int StrideAlignment) { this->BlockWidth = BlockWidth; this->BlockHeight = BlockHeight; th...
158bb34fcddb9509615fbba7c08940cd3e7ab99b.cu
#include "stereo.h" Stereo::Stereo() { this->BlockWidth = 32; this->BlockHeight = 12; this->StrideAlignment = 32; } Stereo::Stereo(int BlockWidth, int BlockHeight, int StrideAlignment) { this->BlockWidth = BlockWidth; this->BlockHeight = BlockHeight; this->StrideAlignment = StrideAlignment; } int Stereo::initi...
11cfd6f6915fc010444114f195b47d597685ed2b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "caffe2/core/context_gpu.h" #include "caffe2/operators/gather_op.h" namespace caffe2 { template <typename T_INDEX> __global__ void GatherKernel( const float* X, float* Y, const T_INDEX* indices, const int ...
11cfd6f6915fc010444114f195b47d597685ed2b.cu
#include "caffe2/core/context_gpu.h" #include "caffe2/operators/gather_op.h" namespace caffe2 { template <typename T_INDEX> __global__ void GatherKernel( const float* X, float* Y, const T_INDEX* indices, const int N, const int block_size) { for (int i = blockIdx.x; i < N; i += gridDim.x) { T...
261ace75ae2071b0612736bc45f03d6287a02cbd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <assert.h> //implement the kernel __global__ void reverseArrayBlock(int *out_d, int *in_d) { int inOffset = blockDim.x * blockIdx.x; int outOffset = blockDim.x * (gridDim.x - 1 - blockIdx.x); ...
261ace75ae2071b0612736bc45f03d6287a02cbd.cu
#include <stdio.h> #include <assert.h> //implement the kernel __global__ void reverseArrayBlock(int *out_d, int *in_d) { int inOffset = blockDim.x * blockIdx.x; int outOffset = blockDim.x * (gridDim.x - 1 - blockIdx.x); int in = inOffset + threadIdx.x; int out = outOffset + (blockDim.x - 1 - threadI...
9121e0ea4fc2889aa031c9b61723696144d90e9e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 1993-2006 NVIDIA Corporation. All rights reserved. * * NOTICE TO USER: * * This source code is subject to NVIDIA ownership rights under U.S. and * international Copyright laws. * * NVIDIA MAKES NO REPRE...
9121e0ea4fc2889aa031c9b61723696144d90e9e.cu
/* * Copyright 1993-2006 NVIDIA Corporation. All rights reserved. * * NOTICE TO USER: * * This source code is subject to NVIDIA ownership rights under U.S. and * international Copyright laws. * * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE * CODE FOR ANY PURPOSE. IT IS PROVIDED...
a7915d70a45fb7cfadc23a9eab5041721fd6d22f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include <assert.h> #include "Device.h" #include "RayTracing.h" #include "SphereCreator.h" #include <assert.h> using std::cout; using std::endl; /*--------------------------------------------------------------...
a7915d70a45fb7cfadc23a9eab5041721fd6d22f.cu
#include <iostream> #include <assert.h> #include "Device.h" #include "RayTracing.h" #include "SphereCreator.h" #include <assert.h> using std::cout; using std::endl; /*----------------------------------------------------------------------*\ |* Declaration *| \*------------------------------------------------...
8de711b0850368b13bb794e4cfef1892ba47b293.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) 2021 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...
8de711b0850368b13bb794e4cfef1892ba47b293.cu
// Copyright (c) 2021 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...
43ac6d51c97e094e7353f4045541d0e95fb32656.hip
// !!! This is a file automatically generated by hipify!!! #include <thrust/sort.h> #include "cudamatrix_types.cuh" #include <stdlib.h> #include <stdio.h> #include <iostream> #include <ctime> #include <cstring> #include "hip/hip_runtime.h" #include "common_functions.h" #include "sm_20_intrinsics.h" #include "host_defi...
43ac6d51c97e094e7353f4045541d0e95fb32656.cu
#include <thrust/sort.h> #include "cudamatrix_types.cuh" #include <stdlib.h> #include <stdio.h> #include <iostream> #include <ctime> #include <cstring> #include "cuda.h" #include "common_functions.h" #include "sm_20_intrinsics.h" #include "host_defines.h" #include <iostream> #include "cuda_texture_types.h" #include "t...
28f4e2d6dc05fd9f31389fa6f12720a8424b2226.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include "hip/hip_runtime_api.h" #include <stdio.h> hipError_t multiply8WithCuda(unsigned char* input1, unsigned char* input2, unsigned char* output, int xSize, int ySize); int verify(unsign...
28f4e2d6dc05fd9f31389fa6f12720a8424b2226.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include "cuda_profiler_api.h" #include <stdio.h> cudaError_t multiply8WithCuda(unsigned char* input1, unsigned char* input2, unsigned char* output, int xSize, int ySize); int verify(unsigned char* input, unsigned char* output, int xSize, int ySize); ...
bdf1d65d47b56a0d5023b5b7ca1bc4c43c0d8e48.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <cmath> #include <ATen/ATen.h> #include <ATen/hip/HIPContext.h> #include <cmath> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #define TOTAL_THREADS 1024 #define THREADS_PER_BLOCK 256 #define DIVUP(m,...
bdf1d65d47b56a0d5023b5b7ca1bc4c43c0d8e48.cu
#include <stdio.h> #include <stdlib.h> #include <cmath> #include <ATen/ATen.h> #include <ATen/cuda/CUDAContext.h> #include <cmath> #include <cuda.h> #include <cuda_runtime.h> #define TOTAL_THREADS 1024 #define THREADS_PER_BLOCK 256 #define DIVUP(m,n) ((m) / (n) + ((m) % (n) > 0)) inline int opt_n_threads(int work_siz...
c23abd23bdf5bc2dfac1f61ad56382e4e4ad8722.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include "matrix_lib.h" #include <immintrin.h> #include <pthread.h> #include <hip/hip_runtime.h> int threads_per_block = 256; int max_blocks_per_grid = 4096; //Threads per block = tpb, mbpg = max blocks per grid int se...
c23abd23bdf5bc2dfac1f61ad56382e4e4ad8722.cu
#include <stdio.h> #include <stdlib.h> #include "matrix_lib.h" #include <immintrin.h> #include <pthread.h> #include <cuda_runtime.h> int threads_per_block = 256; int max_blocks_per_grid = 4096; //Threads per block = tpb, mbpg = max blocks per grid int set_grid_size(int tpb, int mbpg){ if(tpb > 1024 || mbpg > 65535...
dafc01f3de0f83eae24c2ce117949d08e3e49580.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2020, 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 * *...
dafc01f3de0f83eae24c2ce117949d08e3e49580.cu
/* * Copyright (c) 2020, 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 ...
6cbbb2220d2af949e209297b6a41103e0881c86f.hip
// !!! This is a file automatically generated by hipify!!! // Copyright (c) 2009-2018 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. #include "ComputeFreeVolumeGPU.cuh" #include "IntegratorHPMCMonoGPU.cuh" #include "IntegratorHPMCMonoI...
6cbbb2220d2af949e209297b6a41103e0881c86f.cu
// Copyright (c) 2009-2018 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. #include "ComputeFreeVolumeGPU.cuh" #include "IntegratorHPMCMonoGPU.cuh" #include "IntegratorHPMCMonoImplicitGPU.cuh" #include "IntegratorHPMCMonoImplicitNewGPU....
76bf36ab59b82cb22b81cbc8fb37728d48301610.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include "../include/im2col.cuh" #include "../include/cudaMatrix.cuh" #include "../include/convcudamatrix.cuh" int main(void) { float data1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20...
76bf36ab59b82cb22b81cbc8fb37728d48301610.cu
#include <iostream> #include "../include/im2col.cuh" #include "../include/cudaMatrix.cuh" #include "../include/convcudamatrix.cuh" int main(void) { float data1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, ...
e1be3c5b74ccd0d7bb9ae034a9f56a8a9496c67f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void copyPixelsInSlicesRGB(float *ptrinput0, float *ptrkslices0, int dH, int dW, int kH, int kW, int size1, int size2, int isize1, int isize2, int nInputPlane, int padleft, int padright, int padup, i...
e1be3c5b74ccd0d7bb9ae034a9f56a8a9496c67f.cu
#include "includes.h" __global__ void copyPixelsInSlicesRGB(float *ptrinput0, float *ptrkslices0, int dH, int dW, int kH, int kW, int size1, int size2, int isize1, int isize2, int nInputPlane, int padleft, int padright, int padup, int paddown, int inputstr0, int kslicesstr0, int batchsize) { // each block does one pixe...
35e58e25088fa873920b4f9f899eaf8b8995bf3a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <algorithm> #include <device_launch_parameters.h> #include "caffe/common.hpp" #include "caffe/util/gpu_math_functions.cuh" #include "caffe/util/math_functions.hpp" #include <thrust/device_vector.h> #include <thrust/functi...
35e58e25088fa873920b4f9f899eaf8b8995bf3a.cu
#include <algorithm> #include <device_launch_parameters.h> #include "caffe/common.hpp" #include "caffe/util/gpu_math_functions.cuh" #include "caffe/util/math_functions.hpp" #include <thrust/device_vector.h> #include <thrust/functional.h> // thrust::plus #include <thrust/reduce.h> #include <thrust/extrema.h> #includ...
9e8f486c2f3577715294ab5ca18cbc15bb1688bc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @precisions normal z -> c d s */ #include "magmasparse...
9e8f486c2f3577715294ab5ca18cbc15bb1688bc.cu
/* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @precisions normal z -> c d s */ #include "magmasparse_internal.h" __global__ void magma_zlobpcg_shift_kernel( magma_int_t num_rows, ...
9e4ebe53815313f575117425d745682fff638d45.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> // gpu - cuda includes #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime_api.h> #include "cutil_common.h" #include <gstm_common.h> #include "gstm_kernel.h" extern "C" int var_size_valid(byte name, int th) ...
9e4ebe53815313f575117425d745682fff638d45.cu
#include <stdio.h> // gpu - cuda includes #include <cuda.h> #include <cuda_runtime.h> #include <cuda_runtime_api.h> #include "cutil_common.h" #include <gstm_common.h> #include "gstm_kernel.h" extern "C" int var_size_valid(byte name, int th) { int num_var = constname2numconstvar(name); if(th < num_var) return 1; e...
8e5b8c041a9de3d2fde768e49ec2d18a318b5780.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @generated from magmablas/ztrtri_upper_batched.cu, norm...
8e5b8c041a9de3d2fde768e49ec2d18a318b5780.cu
/* -- MAGMA (version 2.2.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2016 @generated from magmablas/ztrtri_upper_batched.cu, normal z -> d, Sun Nov 20 20:20:30 2016 @author Peng Du @author Tingxing Dong...
6eec0db619ba5742a24ce793e903f2130f8d0f0d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Copyright (c) 2017 Sony Corporation. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the L...
6eec0db619ba5742a24ce793e903f2130f8d0f0d.cu
// Copyright (c) 2017 Sony Corporation. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
74936733963d5fb965495da83dfec962298692e9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <iostream> __global__ void occupancy_test(int * results) { int gid = blockDim.x * blockIdx.x + threadIdx.x; int x1 = 1; int x2 = 2;...
74936733963d5fb965495da83dfec962298692e9.cu
#include "cuda.h" #include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <iostream> __global__ void occupancy_test(int * results) { int gid = blockDim.x * blockIdx.x + threadIdx.x; int x1 = 1; int x2 = 2; int x3 = 3; int x4 = 4; int x5 = 5; int x6 = 6; int x7 = 7; int x8...
8bf744da6a4a3556240c447ba393a79acb30261f.hip
// !!! This is a file automatically generated by hipify!!! #include "../THCTensorMathPointwise.cuh" #include "THHTensor.hpp" #include "THHStream.h" #include "../generic/THCTensorMathPointwise.cu" #include "../THCGenerateHalfType.h"
8bf744da6a4a3556240c447ba393a79acb30261f.cu
#include "../THCTensorMathPointwise.cuh" #include "THCTensor.hpp" #include "THCStream.h" #include "../generic/THCTensorMathPointwise.cu" #include "../THCGenerateHalfType.h"
bfec0b4eb1279e6d9308e8480ec383030b98eb39.hip
// !!! This is a file automatically generated by hipify!!! #if !MEGDNN_TEGRA_X1 // generated by gen_cuda_conv_bias_kern_impls.py // ignore warning of cutlass #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #include "src/cuda/conv_bias/in...
bfec0b4eb1279e6d9308e8480ec383030b98eb39.cu
#if !MEGDNN_TEGRA_X1 // generated by gen_cuda_conv_bias_kern_impls.py // ignore warning of cutlass #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #include "src/cuda/conv_bias/int8/conv_bias_int8_implicit_gemm_cutlass_wrapper.cuinl" usi...
78394f1236b81857c8ac24d06d907d4c880dc5bf.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" extern "C" { __global__ void Sobel(const unsigned char* input, unsigned int* output, const unsigned int width, const unsigned int height) { const int col = blockIdx.x * blockDim.x + threadIdx.x; const int row = blockIdx.y * bl...
78394f1236b81857c8ac24d06d907d4c880dc5bf.cu
extern "C" { __global__ void Sobel(const unsigned char* input, unsigned int* output, const unsigned int width, const unsigned int height) { const int col = blockIdx.x * blockDim.x + threadIdx.x; const int row = blockIdx.y * blockDim.y + threadIdx.y; if (col > width-1 || row > height-1 || row == 0 || col == ...
062ef608455058975c443129c21ddaef7ac9b1ea.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> /* * Host function to initialize vector elements. This function * simply initializes each element to equal its index in the * vector. */ /* void initWith(float num, float *a, int N) { for(int i = 0; i < N;...
062ef608455058975c443129c21ddaef7ac9b1ea.cu
#include <stdio.h> /* * Host function to initialize vector elements. This function * simply initializes each element to equal its index in the * vector. */ /* void initWith(float num, float *a, int N) { for(int i = 0; i < N; ++i) { a[i] = num; } } */ __global__ void initWith(float num, float *a, int N)...
5ea6f51afb546ea7f2f8ac15cc4823770055fb2a.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <thrust/scan.h> #include "common.h" #include "thrust.h" namespace StreamCompaction { namespace Thrust { using Strea...
5ea6f51afb546ea7f2f8ac15cc4823770055fb2a.cu
#include <cuda.h> #include <cuda_runtime.h> #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <thrust/scan.h> #include "common.h" #include "thrust.h" namespace StreamCompaction { namespace Thrust { using StreamCompaction::Common::PerformanceTimer; PerformanceTimer& timer() ...
e70847914326740a6236a865aad95a7f62545232.hip
// !!! This is a file automatically generated by hipify!!! /* ****************************************************************************** * * * 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/licen...
e70847914326740a6236a865aad95a7f62545232.cu
/* ****************************************************************************** * * * 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. * * See the NOTICE file distributed wit...
441330e2785016b185dddf41d5a0bfa8cbfb1a47.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <assert.h> #include "basics/tensor.cu" #include "basics/session.hpp" #include "basics/network.cu" #include "layers/data.cu" #include "layers/softmax.cu" #include "layers/cross_entropy_loss.cu" #include "layers/pooling.cu" #include "l...
441330e2785016b185dddf41d5a0bfa8cbfb1a47.cu
#include <stdio.h> #include <assert.h> #include "basics/tensor.cu" #include "basics/session.hpp" #include "basics/network.cu" #include "layers/data.cu" #include "layers/softmax.cu" #include "layers/cross_entropy_loss.cu" #include "layers/pooling.cu" #include "layers/conv2d.cu" #include "layers/relu.cu" #include "layers...
be5ee13076b06c3612238fc9730810d6e5a971cb.hip
// !!! This is a file automatically generated by hipify!!! #include "include.cuh" #include "ANCFSystem.cuh" #include "Element.cuh" #include "Node.cuh" #include "Particle_hip.cuh" bool updateDraw = 1; bool showSphere = 1; // Create the system (placed outside of main so it is available to the OpenGL code) int workingTh...
be5ee13076b06c3612238fc9730810d6e5a971cb.cu
#include "include.cuh" #include "ANCFSystem.cuh" #include "Element.cuh" #include "Node.cuh" #include "Particle.cuh" bool updateDraw = 1; bool showSphere = 1; // Create the system (placed outside of main so it is available to the OpenGL code) int workingThread = 0; const int numSystems = 2; ANCFSystem* sys[numSystems]...
988dcbc740f88222a101726f12ce826034d34367.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <time.h> #include <omp.h> #include <math.h> #define Zad5 #ifdef Zad1 int coresPerSM(hipDeviceProp_t prop) { typedef struct { int SM; // 0xMm (hexidecimal nota...
988dcbc740f88222a101726f12ce826034d34367.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <time.h> #include <omp.h> #include <math.h> #define Zad5 #ifdef Zad1 int coresPerSM(cudaDeviceProp prop) { typedef struct { int SM; // 0xMm (hexidecimal notation), M = SM Major version, // and m = SM minor version in...
056d8f861963723e4bd612ff55c465ba37622101.hip
// !!! This is a file automatically generated by hipify!!! #include <math.h> #include <float.h> #include <fstream> #include <string> #include <cstring> #include <sstream> #include <iostream> #include <chrono> #include <hip/hip_runtime.h> using namespace std::chrono; typedef high_resolution_clock myclock; typedef dura...
056d8f861963723e4bd612ff55c465ba37622101.cu
#include <math.h> #include <float.h> #include <fstream> #include <string> #include <cstring> #include <sstream> #include <iostream> #include <chrono> #include <cuda.h> using namespace std::chrono; typedef high_resolution_clock myclock; typedef duration<float> myduration; #define MAX_WG_SIZE 256 template <typename T...
7a0de33595d86a39db8e08dad86e3bd6fc4b6ebc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void ConstantB(bool * x, bool value, size_t idx, size_t N) { for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { x[(idx)*N + i] = value; } return; }
7a0de33595d86a39db8e08dad86e3bd6fc4b6ebc.cu
#include "includes.h" __global__ void ConstantB(bool * x, bool value, size_t idx, size_t N) { for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { x[(idx)*N + i] = value; } return; }
dff8514076ae639b1f83ed222cd8358cf1dd1d13.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "ex1.h" /*-------------------------------------------------------------------------------- AUX --------------------------------------------------------------------------------*/ __de...
dff8514076ae639b1f83ed222cd8358cf1dd1d13.cu
#include "ex1.h" /*-------------------------------------------------------------------------------- AUX --------------------------------------------------------------------------------*/ __device__ void calculate_histogram(uchar *given_image, int *result_array, int len) { in...
5996d8c4975532d953446050fa7e587b52a279a5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "KnnAlgorithm.h" static void HandleError( hipError_t err, const char *file, int line ) { if (err != hipSuccess) { printf( "%s in %s at line %d\n", hipGetErrorString( err ), file, line ); exit( EXIT_FAI...
5996d8c4975532d953446050fa7e587b52a279a5.cu
#include "KnnAlgorithm.h" static void HandleError( cudaError_t err, const char *file, int line ) { if (err != cudaSuccess) { printf( "%s in %s at line %d\n", cudaGetErrorString( err ), file, line ); exit( EXIT_FAILURE ); } } #define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ )) ...
e013ca7dd00edde850d1b87759158cdf556beb08.hip
// !!! This is a file automatically generated by hipify!!! /* Copyright 2017-2020 ABBYY Production LLC 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 ...
e013ca7dd00edde850d1b87759158cdf556beb08.cu
/* Copyright © 2017-2020 ABBYY Production LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
af888744452ef1764c15bc8d08f029f7fdf70286.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //fir filtering via fft with cuda //includes, system #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <time.h> // includes, project #include <hipfft.h> #include <cutil.h> // Complex data type...
af888744452ef1764c15bc8d08f029f7fdf70286.cu
//fir filtering via fft with cuda //includes, system #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <time.h> // includes, project #include <cufft.h> #include <cutil.h> // Complex data type typedef float Complex[2]; typedef float Real; static __device__ __host__ inline Complex...
cb4018a1f7dd0bf83def6525d575df6ff3f7c6dd.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/distance_op.h" #include "caffe2/utils/conversions.h" #include "caffe2/utils/cub_namespace.cuh" #include <hipcub/hipcub.hpp> namespace ca...
cb4018a1f7dd0bf83def6525d575df6ff3f7c6dd.cu
#include <cub/block/block_reduce.cuh> #include "caffe2/core/context_gpu.h" #include "caffe2/operators/distance_op.h" #include "caffe2/utils/conversions.h" #include "caffe2/utils/cub_namespace.cuh" #include <cub/block/block_reduce.cuh> namespace caffe2 { namespace { template <typename T> __global__ void SquaredL2Di...
c46a353bc364779675c4e333dcde1161a45c850d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void rgbToGreyKernel(int height,int width ,unsigned char *input_img, unsigned char *output_img) { int col = blockIdx.x*blockDim.x + threadIdx.x; int row = blockIdx.y*blockDim.y + threadIdx.y; if(row...
c46a353bc364779675c4e333dcde1161a45c850d.cu
#include "includes.h" __global__ void rgbToGreyKernel(int height,int width ,unsigned char *input_img, unsigned char *output_img) { int col = blockIdx.x*blockDim.x + threadIdx.x; int row = blockIdx.y*blockDim.y + threadIdx.y; if(row<height && col<width) { int idx = row*width + col; float red = (float)input_img[3*idx]; ...
519f7fd545fa4ca15627a5bbeb2c0af2cc8b00bf.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2018, 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 * *...
519f7fd545fa4ca15627a5bbeb2c0af2cc8b00bf.cu
/* * Copyright (c) 2018, 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 ...
57fda215b72e2ef33db2ec3c0e90248219ffdd1e.hip
// !!! This is a file automatically generated by hipify!!! /* ----------------------------------------------------------------------------- * * Module : Sort * Copyright : (c) [2009..2012] Trevor L. McDonell, Kevin Ying * License : BSD * * ---------------------------------------------------------------------...
57fda215b72e2ef33db2ec3c0e90248219ffdd1e.cu
/* ----------------------------------------------------------------------------- * * Module : Sort * Copyright : (c) [2009..2012] Trevor L. McDonell, Kevin Ying * License : BSD * * ---------------------------------------------------------------------------*/ #include <stdint.h> #include <thrust/device_vect...
8072907ee55bc5e1445631564adb2895756fd94b.hip
// !!! This is a file automatically generated by hipify!!! // Week 4 // cuSPARSE vs Kernel Testbench. // acoustikue@yonsei.ac.kr // written by SukJoon Oh #include <hip/hip_runtime.h> // #include <device_launch_parameters.h> #include <hipsparse.h> // hipsparseSpMV #include <stdio.h> #include <stdlib.h> #include "mmio...
8072907ee55bc5e1445631564adb2895756fd94b.cu
// Week 4 // cuSPARSE vs Kernel Testbench. // acoustikue@yonsei.ac.kr // written by SukJoon Oh #include <cuda_runtime.h> // #include <device_launch_parameters.h> #include <cusparse.h> // cusparseSpMV #include <stdio.h> #include <stdlib.h> #include "mmio.h" #include "errchk.cuh" #include "spmv_kernel.cuh" // Option ...
5ec62d81cac6225feae4c44d4fc8750104f46801.hip
// !!! This is a file automatically generated by hipify!!! /* Fractal v1.3: This code computes a fractal from the Mandelbrot set. Copyright (c) 2015, Texas State University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted for academic, research, exp...
5ec62d81cac6225feae4c44d4fc8750104f46801.cu
/* Fractal v1.3: This code computes a fractal from the Mandelbrot set. Copyright (c) 2015, Texas State University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted for academic, research, experimental, or personal use provided that the following cond...
93bb86d8cabd8996821faf11e5debee6492f31a4.hip
// !!! This is a file automatically generated by hipify!!! #include <bits/stdc++.h> #include <hip/hip_runtime.h> #include <highgui.h> #include <cv.h> #define Mask_size 3 //#define TILE_size_of_rgb 1024 #define BLOCKSIZE 32 #define TILE_SIZE 32 using namespace std; using namespace cv; __constant__ char Global_Mask[M...
93bb86d8cabd8996821faf11e5debee6492f31a4.cu
#include <bits/stdc++.h> #include <cuda.h> #include <highgui.h> #include <cv.h> #define Mask_size 3 //#define TILE_size_of_rgb 1024 #define BLOCKSIZE 32 #define TILE_SIZE 32 using namespace std; using namespace cv; __constant__ char Global_Mask[Mask_size*Mask_size]; __device__ unsigned char clamp(int value){ i...
66f6ff27f210dc2d9ed225b7305846f0ec61f648.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // DeconvSingleInputExecution.cpp // MNN // // Created by MNN on 2022/03/04. // Copyright 2018, Alibaba Group Holding Limited // #include "DeconvSingleInputExecution.hpp" #include "MNNCUDADefine.hpp" #include "MNNCUDAFuncti...
66f6ff27f210dc2d9ed225b7305846f0ec61f648.cu
// // DeconvSingleInputExecution.cpp // MNN // // Created by MNN on 2022/03/04. // Copyright © 2018, Alibaba Group Holding Limited // #include "DeconvSingleInputExecution.hpp" #include "MNNCUDADefine.hpp" #include "MNNCUDAFunction.cuh" namespace MNN { namespace CUDA { __global__ void DeconvKernelReorder(const floa...
3e77ca5a342d5ade9a6740f4806483a598c1a390.hip
// !!! This is a file automatically generated by hipify!!! #include <iostream> #include "profiler.h" #include <vector> int main() { size_t n = 128*1024; size_t n_bytes = n*sizeof(double); double *a_dev = nullptr, *buffer = nullptr; std::vector<double> a_host(n,0.); profiler prof; hipHostMalloc...
3e77ca5a342d5ade9a6740f4806483a598c1a390.cu
#include <iostream> #include "profiler.h" #include <vector> int main() { size_t n = 128*1024; size_t n_bytes = n*sizeof(double); double *a_dev = nullptr, *buffer = nullptr; std::vector<double> a_host(n,0.); profiler prof; cudaMallocHost( (void **) &buffer, n_bytes); for(auto i = 0; i < n;...
fa021a1b66e937c9f8039daacae341cde4911751.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Software License Agreement (BSD License) * * Copyright (c) 2011, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provide...
fa021a1b66e937c9f8039daacae341cde4911751.cu
/* * Software License Agreement (BSD License) * * Copyright (c) 2011, Willow Garage, Inc. * 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 mu...
88a7d56ca91bd3a85c6c26112cefb0d4bdb9edf8.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /*! * Copyright 2017-2021 by Contributors */ #include <GPUTreeShap/gpu_treeshap.h> #include <thrust/copy.h> #include <thrust/device_ptr.h> #include <thrust/device_vector.h> #include <thrust/fill.h> #include <thrust/host_vector.h> ...
88a7d56ca91bd3a85c6c26112cefb0d4bdb9edf8.cu
/*! * Copyright 2017-2021 by Contributors */ #include <GPUTreeShap/gpu_treeshap.h> #include <thrust/copy.h> #include <thrust/device_ptr.h> #include <thrust/device_vector.h> #include <thrust/fill.h> #include <thrust/host_vector.h> #include <memory> #include "../common/bitfield.h" #include "../common/categorical.h" #...
f1c9a997f5929dac4049dd20185be20ae4dca5d4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright 1993-2010 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...
f1c9a997f5929dac4049dd20185be20ae4dca5d4.cu
/* * Copyright 1993-2010 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...
a98c6e6cae3b3cd8c632f8ac2968675447abff1e.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 the License ...
a98c6e6cae3b3cd8c632f8ac2968675447abff1e.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 by applicable law or...
1af09de157655312261c5df3a4a7fa9cddb8fa95.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> // Reference??? const int N = 1024; const int blocksize = 16; __global__ void add_matrix( float *a, float *b, float *c, int N, float rf, float pirkplus1) { int i = blockIdx.x * blockDim.x + threadIdx.x; int j = bl...
1af09de157655312261c5df3a4a7fa9cddb8fa95.cu
#include <stdio.h> // Reference??? const int N = 1024; const int blocksize = 16; __global__ void add_matrix( float *a, float *b, float *c, int N, float rf, float pirkplus1) { int i = blockIdx.x * blockDim.x + threadIdx.x; int j = blockIdx.y * blockDim.y + threadIdx.y; int index = i + j*N; if ( i < N && j < N ) c[inde...
bottomBoundaryKernel.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void bottomBoundaryKernel(double* temperature, int block_size) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < block_size) { temperature[(block_size + 2) * (block_size + 1) + (1 + i)] = 1.0;...
bottomBoundaryKernel.cu
#include "includes.h" __global__ void bottomBoundaryKernel(double* temperature, int block_size) { int i = blockDim.x * blockIdx.x + threadIdx.x; if (i < block_size) { temperature[(block_size + 2) * (block_size + 1) + (1 + i)] = 1.0; } }
3e388c3b158e61fff0a4cbfb7f313ee27988e569.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modi...
3e388c3b158e61fff0a4cbfb7f313ee27988e569.cu
/* * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * * NVIDIA CORPORATION and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this softwar...
a591fb7ee24279b7155bd8e5f53e8b768f9aa8b0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Groute: An Asynchronous Multi-GPU Programming Framework // http://www.github.com/groute/groute // Copyright (c) 2017, A. Barak // All rights reserved. // // Redistribution and use in source and binary forms, with or without // mo...
a591fb7ee24279b7155bd8e5f53e8b768f9aa8b0.cu
// Groute: An Asynchronous Multi-GPU Programming Framework // http://www.github.com/groute/groute // Copyright (c) 2017, A. Barak // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redist...
3db27bdba4e7e5ab5ab2aedbfd52b07099565b09.hip
// !!! This is a file automatically generated by hipify!!! #ifdef __HIPCC__ #include "Macro.h" #else #include "GAMER.h" #endif #include "CUPOT.h" #ifdef GRAVITY // soften length implementation # define SOFTEN_PLUMMER //# define SOFTEN_RUFFERT //------------------------------------------------------------------...
3db27bdba4e7e5ab5ab2aedbfd52b07099565b09.cu
#ifdef __CUDACC__ #include "Macro.h" #else #include "GAMER.h" #endif #include "CUPOT.h" #ifdef GRAVITY // soften length implementation # define SOFTEN_PLUMMER //# define SOFTEN_RUFFERT //----------------------------------------------------------------------------------------- // Function : CUPOT_ExternalAc...
60ae0a956478380086973475e5a3a8bd292ed66f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* * Rayhana ZIARA * produit matrice vecteur */ #include <stdlib.h> #include <stdio.h> /* * DESCRIPTION : kernel concernant le produit matrice vecteur * PARAMETRES : matrice A, vecteur v, vecteur r et taille des vecteurs * RETOUR ...
60ae0a956478380086973475e5a3a8bd292ed66f.cu
/* * Rayhana ZIARA * produit matrice vecteur */ #include <stdlib.h> #include <stdio.h> /* * DESCRIPTION : kernel concernant le produit matrice vecteur * PARAMETRES : matrice A, vecteur v, vecteur r et taille des vecteurs * RETOUR : / */ __global__ void matVect(float *A, float *v, float *r, int size) { float result...
c5d0286da8697bb7cfdc18149e5f4d00d6eb26b1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include "cpu_bitmap.h" #include "bitmap_help.h" #define CHANNELS 4 __global__ void rgbToGray(unsigned char *grayImage, int width, int height) { int...
c5d0286da8697bb7cfdc18149e5f4d00d6eb26b1.cu
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include "cpu_bitmap.h" #include "bitmap_help.h" #define CHANNELS 4 __global__ void rgbToGray(unsigned char *grayImage, int width, int height) { int rgbOffset= (blockIdx.x + blockIdx.y * gridDim.x) * CHANNELS; printf("rgbOffset %d",rg...
68535c7b2388fc53180ca3af4a5fed88a530df3b.hip
// !!! This is a file automatically generated by hipify!!! /* * The MIT License (MIT) * * Copyright (c) 2015-2016 Maximilian Knespel * * 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 w...
68535c7b2388fc53180ca3af4a5fed88a530df3b.cu
/* * The MIT License (MIT) * * Copyright (c) 2015-2016 Maximilian Knespel * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights...
8a6c8a25413a1ade2cc8656220b768e448ef3fff.hip
// !!! This is a file automatically generated by hipify!!! #include "common.h" #include <hip/hip_runtime.h> #include <iostream> #include <cmath> using namespace std; //////////////////////////////////////////////////// Useful Macros //////////////////////////////////////////////////// #define MAX_PTS_PER_BIN 16 //...
8a6c8a25413a1ade2cc8656220b768e448ef3fff.cu
#include "common.h" #include <cuda.h> #include <iostream> #include <cmath> using namespace std; //////////////////////////////////////////////////// Useful Macros //////////////////////////////////////////////////// #define MAX_PTS_PER_BIN 16 // Max capacity of each bin #define NUM_THREADS_PER_BLK 256 // Number o...
6b1a18c8abd36a167a1e5e6fa70f391efda24b32.hip
// !!! This is a file automatically generated by hipify!!! #include <cassert> #include <iostream> #include <hip/hip_runtime.h> #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) template<typename T> void check(T err, const char* const func, const char* const file, const int line) { if (err != hi...
6b1a18c8abd36a167a1e5e6fa70f391efda24b32.cu
#include <cassert> #include <iostream> #include <cuda_runtime.h> #define checkCudaErrors(val) check( (val), #val, __FILE__, __LINE__) template<typename T> void check(T err, const char* const func, const char* const file, const int line) { if (err != cudaSuccess) { std::cerr << "CUDA error at: " << file << ":"...
e5563f85ab448932a45f0fa5f98024cefa04e307.hip
// !!! This is a file automatically generated by hipify!!! #include <hip/hip_runtime.h> #include "type.h" #define MB_BACKOFF 1000 void gpu_init() { hipSetDevice(0); hipDeviceReset(); } int get_dims() { size_t mem_free, mem_total; hipMemGetInfo(&mem_free, &mem_total); double bytes = (double)(mem_t...
e5563f85ab448932a45f0fa5f98024cefa04e307.cu
#include <cuda_runtime.h> #include "type.h" #define MB_BACKOFF 1000 void gpu_init() { cudaSetDevice(0); cudaDeviceReset(); } int get_dims() { size_t mem_free, mem_total; cudaMemGetInfo(&mem_free, &mem_total); double bytes = (double)(mem_total - (size_t)MB_BACKOFF*1024*1024); return (int) sqrt(b...
9d80a51225b5e42adcce53a8af3eb4d31bac148b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "stereo.h" __global__ void CloneKernel(const float *src, int width, int height, int stride, float *dst) { const int ix = threadIdx.x + blockIdx.x * blockDim.x; const int iy = threadIdx.y + blockIdx.y * blockDim.y; cons...
9d80a51225b5e42adcce53a8af3eb4d31bac148b.cu
#include "stereo.h" __global__ void CloneKernel(const float *src, int width, int height, int stride, float *dst) { const int ix = threadIdx.x + blockIdx.x * blockDim.x; const int iy = threadIdx.y + blockIdx.y * blockDim.y; const int pos = ix + iy * stride; if (ix >= width || iy >= height) return; dst[pos] = sr...
785d408194da163b38f3b11aedf53e8db9377754.hip
// !!! This is a file automatically generated by hipify!!! /* * University of Illinois Open Source License * Copyright 2010 Luthey-Schulten Group, * All rights reserved. * * Developed by: Luthey-Schulten Group * University of Illinois at Urbana-Champaign * http://www.scs.uiuc.edu/~schulten * * ...
785d408194da163b38f3b11aedf53e8db9377754.cu
/* * University of Illinois Open Source License * Copyright 2010 Luthey-Schulten Group, * All rights reserved. * * Developed by: Luthey-Schulten Group * University of Illinois at Urbana-Champaign * http://www.scs.uiuc.edu/~schulten * * Permission is hereby granted, free of charge, to any person...
1d772c59ad5540eff9d07d7e2d5dae720bfca53b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define N 30 #define TAMANIO_MATRIZ_C 224 #define BLOCKSIZE_MEDIA 512 #define ABS(a) (((a) < 0) ? -(a) : (a)) //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////...
1d772c59ad5540eff9d07d7e2d5dae720bfca53b.cu
#define N 30 #define TAMANIO_MATRIZ_C 224 #define BLOCKSIZE_MEDIA 512 #define ABS(a) (((a) < 0) ? -(a) : (a)) //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// // Kernels SPCA...
13100313e04d7c54cc8120b57cd5571648ae550d.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime_api.h> #include <time.h> /***************************************************************************** * * * * * * Compile with: * nvcc -o 2initpasscuda 2initpasscuda.cu * * Dr Kevan Buckley, Univer...
13100313e04d7c54cc8120b57cd5571648ae550d.cu
#include <stdio.h> #include <cuda_runtime_api.h> #include <time.h> /***************************************************************************** * * * * * * Compile with: * nvcc -o 2initpasscuda 2initpasscuda.cu * * Dr Kevan Buckley, University of Wolverhampton, 2018 ********************************...
23cdc812492b7b70f017d4a7c0bb28ccfecba9f9.hip
// !!! This is a file automatically generated by hipify!!! /* This is the source file contains the methods for the Mesh struct * * Author: Guodong Chen * Email: cgderic@umich.edu * Last modified: 12/04/2019 */ #include "DG_Mesh.cuh" #include "CUDA_Helper.cuh" /* initialize the mesh struct */ hipError_t initMes...
23cdc812492b7b70f017d4a7c0bb28ccfecba9f9.cu
/* This is the source file contains the methods for the Mesh struct * * Author: Guodong Chen * Email: cgderic@umich.edu * Last modified: 12/04/2019 */ #include "DG_Mesh.cuh" #include "CUDA_Helper.cuh" /* initialize the mesh struct */ cudaError_t initMesh(DG_Mesh *Mesh){ Mesh->halfL = 0; Mesh->N = 0; Mesh->h...
31fa58cb2d382d893a9338b38ca9ec856051060b.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Homework 1 // Color to Greyscale Conversion //A common way to represent color images is known as RGBA - the color //is specified by how much Red, Grean and Blue is in it. //The 'A' stands for Alpha and is used for transparency, ...
31fa58cb2d382d893a9338b38ca9ec856051060b.cu
// Homework 1 // Color to Greyscale Conversion //A common way to represent color images is known as RGBA - the color //is specified by how much Red, Grean and Blue is in it. //The 'A' stands for Alpha and is used for transparency, it will be //ignored in this homework. //Greyscale images are represented by a single i...
d12e5bfd4a0543f8e65d62205bdd7946a1c72872.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "SLIC_cuda.h" #if __CUDA_ARCH__<300 texture<uchar4, hipTextureType2D, hipReadModeElementType> frameBGRA_tex; surface<void, cudaSurfaceType2D> frameLab_surf; surface<void, cudaSurfaceType2D> labels_surf; #endif //=======...
d12e5bfd4a0543f8e65d62205bdd7946a1c72872.cu
#include "SLIC_cuda.h" #if __CUDA_ARCH__<300 texture<uchar4, cudaTextureType2D, cudaReadModeElementType> frameBGRA_tex; surface<void, cudaSurfaceType2D> frameLab_surf; surface<void, cudaSurfaceType2D> labels_surf; #endif //======== device local function ============ __device__ float2 operator-(const float2 & a, co...
5c749c4eea7d0b23ba8eda9b27b4f37f820bd989.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <hip/hip_runtime.h> #include <stdlib.h> #include <math.h> __global__ void matmul_tile(float *a, float *b, float *c, int n, int m, int p, int TW) { extern __shared__ float bigarray[]; float *aTile=&bigarray[0], *bTile=&bigarra...
5c749c4eea7d0b23ba8eda9b27b4f37f820bd989.cu
#include <stdio.h> #include <cuda.h> #include <stdlib.h> #include <math.h> __global__ void matmul_tile(float *a, float *b, float *c, int n, int m, int p, int TW) { extern __shared__ float bigarray[]; float *aTile=&bigarray[0], *bTile=&bigarray[TW*TW]; int tx = threadIdx.x; int ty = threadIdx.y; float cv...
f2d90ea32476864457b15466777fb1038fe68472.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright 2020 The OneFlow 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 ...
f2d90ea32476864457b15466777fb1038fe68472.cu
/* Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
6fdf8d4d42c96cb136912a422ce7071f909de69d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <stdlib.h> __global__ void transpose(int *a, int *t) { int n = threadIdx.x, m = blockIdx.x, size = blockDim.x, size1 = gridDim.x; t[n*size1 + m] = a[m*size+n]; } ...
6fdf8d4d42c96cb136912a422ce7071f909de69d.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <stdlib.h> __global__ void transpose(int *a, int *t) { int n = threadIdx.x, m = blockIdx.x, size = blockDim.x, size1 = gridDim.x; t[n*size1 + m] = a[m*size+n]; } int main (void) { int *a, *t, m, n; int *d_a, *d_t; print...
f2739e91a9a6cf56cbcf453ae2089a465aff985d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <iostream> // to see the branch divergence we have to have conditions more than threshold (7 or 4 depend on complexity) __global__ void mathkernel3(float * c) { int tid = blockIdx.x...
f2739e91a9a6cf56cbcf453ae2089a465aff985d.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <iostream> // to see the branch divergence we have to have conditions more than threshold (7 or 4 depend on complexity) __global__ void mathkernel3(float * c) { int tid = blockIdx.x * blockDim.x + threadIdx.x; float a, b; a = b = 0.0f; if ...
6b201deddda47f2c5f245da232715e80843453cf.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // #include <iostream> #include <cstdio> #include <cutil.h> #include "cuda_pointer.h" #define NTHREAD 128 #define PROFILE #ifdef PROFILE #include <sys/time.h> static double get_wtime(){ struct timeval tv; gettimeofday(&tv, NULL);...
6b201deddda47f2c5f245da232715e80843453cf.cu
// #include <iostream> #include <cstdio> #include <cutil.h> #include "cuda_pointer.h" #define NTHREAD 128 #define PROFILE #ifdef PROFILE #include <sys/time.h> static double get_wtime(){ struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec + 1.e-6 * tv.tv_usec; } #else static double get_wtime(){ return 0.0;...