hip_filename
stringlengths
5
84
hip_content
stringlengths
79
9.69M
cuda_filename
stringlengths
4
83
cuda_content
stringlengths
19
9.69M
2032e854599fe4c3e6166ae1ebf33b1a6015aabc.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include<stdio.h> #include<stdlib.h> #define N 20 #define M 3 __global__ void add(int *a, int *b, int *c, int n) { int index = threadIdx.x + blockIdx.x * blockDim.x; if(index < n ) c[index] = a[index] + b[index]; } void r...
2032e854599fe4c3e6166ae1ebf33b1a6015aabc.cu
#include<stdio.h> #include<stdlib.h> #define N 20 #define M 3 __global__ void add(int *a, int *b, int *c, int n) { int index = threadIdx.x + blockIdx.x * blockDim.x; if(index < n ) c[index] = a[index] + b[index]; } void random_ints(int *x, int n){ int i; for(i=0;i<n;i++){ x[i]=rand()%99; } } void print...
ff809bf2341a055cbca59194aa03c09f39225656.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright Ramtin Shams (hereafter referred to as 'the author'). All rights reserved. **Citation required in derived works or publications** NOTICE TO USER: Users and possessors of this source code are hereby granted ...
ff809bf2341a055cbca59194aa03c09f39225656.cu
/* Copyright Ramtin Shams (hereafter referred to as 'the author'). All rights reserved. **Citation required in derived works or publications** NOTICE TO USER: Users and possessors of this source code are hereby granted a nonexclusive, royalty-free license to use this source code for non-commercial purpos...
af5f8f677563e3e420ed5cea447cd9fa4b294599.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" using namespace std; __global__ void mykernel() { printf("Hello World!"); } int main(){ hipLaunchKernelGGL(( mykernel) , dim3(1),dim3(1), 0, ...
af5f8f677563e3e420ed5cea447cd9fa4b294599.cu
#include "cuda_runtime.h" #include "cuda.h" #include "device_launch_parameters.h" #include "stdio.h" using namespace std; __global__ void mykernel() { printf("Hello World!"); } int main(){ mykernel <<< 1,1>>> (); return 0; }
e8afb8fbc5e63e020c3f611005afb568d0901ee0.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 "matrixMulCUDA.cu" #include<chrono> #include<iostream> using name...
e8afb8fbc5e63e020c3f611005afb568d0901ee0.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 "matrixMulCUDA.cu" #include<chrono> #include<iostream> using namespace std; using namespace std::chrono; int blocks_[20][2] = {{8,8},{16,16},{24...
41fb6057f7415221f4ef5f8c997638e3d0690321.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> __global__ void axpy(float a, float* x, float* y) { y[threadIdx.x] = a * x[threadIdx.x]; } int main(int argc, char* argv[]) { const int kDataLen = 4; float a = 2.0f; float host_x[kDataLen] = {1.0f, 2.0...
41fb6057f7415221f4ef5f8c997638e3d0690321.cu
#include <iostream> __global__ void axpy(float a, float* x, float* y) { y[threadIdx.x] = a * x[threadIdx.x]; } int main(int argc, char* argv[]) { const int kDataLen = 4; float a = 2.0f; float host_x[kDataLen] = {1.0f, 2.0f, 3.0f, 4.0f}; float host_y[kDataLen]; // Copy input data to device. float* devi...
pomdp_pbvi_gpu.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /** * The MIT License (MIT) * * Copyright (c) 2015 Kyle Hollins Wray, University of Massachusetts * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documenta...
pomdp_pbvi_gpu.cu
/** * The MIT License (MIT) * * Copyright (c) 2015 Kyle Hollins Wray, University of Massachusetts * * 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 ...
32bf91b9aca233f5d35ba9cac2e497286f71a7b4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> static hipStream_t *streams; // CUDA kernel to pause for at least num_cycle cycles __global__ void sleep(int64_t num_cycles) { int64_t cycles = 0; ...
32bf91b9aca233f5d35ba9cac2e497286f71a7b4.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> static cudaStream_t *streams; // CUDA kernel to pause for at least num_cycle cycles __global__ void sleep(int64_t num_cycles) { int64_t cycles = 0; int64_t start = clock64(); while(cycles < num_cycles) { cycles = clock64()...
f23758c41e80342b96655934a1547c9867e47bb1.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 add1(int *A, int *B, int *C, int n){ //each thread computes the sum of elements row-wise int row = threadIdx.x; for(int i=0;i<n;i++){ ...
f23758c41e80342b96655934a1547c9867e47bb1.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include <stdlib.h> __global__ void add1(int *A, int *B, int *C, int n){ //each thread computes the sum of elements row-wise int row = threadIdx.x; for(int i=0;i<n;i++){ C[row*n+i] = A[row*n +i] + B[row*n+i]; } } __global__ void ...
ee0b95d2f2e4ef9e0a3a230e8bd379f0b7051ee3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <iostream> #include "assert.h" #define WORK_PER_THREAD 4 __global__ void saxpy_parallel(int n, float a, float *x, float *y) { int i = blockIdx.x*blockDim.x + threadIdx.x; i *= WORK_PER_THREAD; if (i < n) { #pragm...
ee0b95d2f2e4ef9e0a3a230e8bd379f0b7051ee3.cu
#include <iostream> #include "assert.h" #define WORK_PER_THREAD 4 __global__ void saxpy_parallel(int n, float a, float *x, float *y) { int i = blockIdx.x*blockDim.x + threadIdx.x; i *= WORK_PER_THREAD; if (i < n) { #pragma unroll for(int j=0; j<WORK_PER_THREAD; j++) y[i+j] = a * x[i+j] + y[i+j]; } } ...
d4f72ce4814b0dd1425a117599977d4439cfb4cd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************************************* * Copyright (c) 2019 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Versi...
d4f72ce4814b0dd1425a117599977d4439cfb4cd.cu
/******************************************************************************* * Copyright (c) 2019 Konduit K.K. * * 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. * * Unles...
8c532ea8b81bcd1742cff5bc42dda0f6697f35f9.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> //************************************************************************************/ // Title : Parallel Processing of SAR Signal for Image generation on CUDA Platform //**...
8c532ea8b81bcd1742cff5bc42dda0f6697f35f9.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> //************************************************************************************/ // Title : Parallel Processing of SAR Signal for Image generation on CUDA Platform //****************************************************************...
9b61e79732e3688149c551b8d3a7d6e2fe49032c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "kernel_hip.cuh" #define N 5 __global__ void gpuSquareKernel(float* d_in, float* d_out) { int tid = threadIdx.x; float temp = d_in[tid]; d_out[tid] = temp * temp; } void gpuSquare(float* h_in, float* h_out) {...
9b61e79732e3688149c551b8d3a7d6e2fe49032c.cu
#include "kernel.cuh" #define N 5 __global__ void gpuSquareKernel(float* d_in, float* d_out) { int tid = threadIdx.x; float temp = d_in[tid]; d_out[tid] = temp * temp; } void gpuSquare(float* h_in, float* h_out) { float *d_in, *d_out; cudaMalloc((void**)&d_in, N * sizeof(float)); cudaMalloc(...
db5c99065a250506aa6a7c1a568898c324cdb69b.hip
// !!! This is a file automatically generated by hipify!!! #include <torch/extension.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <c10/macros/Macros.h> #include <THH/THH.h> #include <ATen/AccumulateType.h> #include <ATen/hip/HIPContext.h> // Warp reduce kernels to reduce N groups of data into ...
db5c99065a250506aa6a7c1a568898c324cdb69b.cu
#include <torch/extension.h> #include <cuda.h> #include <cuda_runtime.h> #include <c10/macros/Macros.h> #include <THC/THC.h> #include <ATen/AccumulateType.h> #include <ATen/cuda/CUDAContext.h> // Warp reduce kernels to reduce N groups of data into N numbers, where N = warpSize / width. // width should be a power of 2 ...
56269514c5ad7f741c2a8b9bfb3bf897ebe444a4.hip
// !!! This is a file automatically generated by hipify!!! #include <cstdio> #include <cstdlib> #include <hip/hip_runtime.h> #include <rocblas.h> #include <time.h> #define random(a, b) (rand() % (b - a) + a) void FillMatrix(float *matrix, int row, int col); void PrintMatrix(float *A, float *B, float *C, int m, int n, i...
56269514c5ad7f741c2a8b9bfb3bf897ebe444a4.cu
#include <cstdio> #include <cstdlib> #include <cuda_runtime.h> #include <cublas_v2.h> #include <time.h> #define random(a, b) (rand() % (b - a) + a) void FillMatrix(float *matrix, int row, int col); void PrintMatrix(float *A, float *B, float *C, int m, int n, int k); __global__ void MatrixMulCUDA(const float *A, const f...
b69428d78d88f6d1defd6cb4c1505bcef170562e.hip
// !!! This is a file automatically generated by hipify!!! #include <ATen/native/hip/Normalization.cuh> inline bool batch_norm_use_channels_last_kernels(const at::Tensor& self) { return self.is_contiguous(at::MemoryFormat::ChannelsLast) || self.ndimension() == 2; } namespace at { namespace native { std::tuple<Tens...
b69428d78d88f6d1defd6cb4c1505bcef170562e.cu
#include <ATen/native/cuda/Normalization.cuh> inline bool batch_norm_use_channels_last_kernels(const at::Tensor& self) { return self.is_contiguous(at::MemoryFormat::ChannelsLast) || self.ndimension() == 2; } namespace at { namespace native { std::tuple<Tensor&, Tensor&, Tensor&> batch_norm_cuda_out(const Tensor& s...
gpu_pc_v2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /******************************************************** * * This experiment optimizes packet classification * in the following aspects: * 1. Thread assignment * 2. Memory coalescing * * Experiment Assumptions: * 1. 5...
gpu_pc_v2.cu
/******************************************************** * * This experiment optimizes packet classification * in the following aspects: * 1. Thread assignment * 2. Memory coalescing * * Experiment Assumptions: * 1. 510 Non-overlapping intervals * 2. 1024 Rules (510 * 1024 element BVs) * 3. Number of p...
ca0a679015b6dc1a237b42c5509e755444e7b319.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <sys/time.h> #include <time.h> #include <opencv2/opencv.hpp> #include <math.h> //#include <device_launch_parameters.h> //#include <hip/hip_runtime.h> //#include <helper_cuda.h> //#include <helper_timer.h> //#include <hip/device_funct...
ca0a679015b6dc1a237b42c5509e755444e7b319.cu
#include <stdio.h> #include <sys/time.h> #include <time.h> #include <opencv2/opencv.hpp> #include <math.h> //#include <device_launch_parameters.h> //#include <cuda_runtime.h> //#include <helper_cuda.h> //#include <helper_timer.h> //#include <device_functions.h> #define IS_NOT_EDGE(a) (a < min_val) #define IS_STRONG_ED...
1896f0ce74593a54da8fea2d28f45b5de2ecb5fd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "caffe2/core/context_gpu.h" #include "caffe2/operators/filler_op.h" namespace caffe2 { namespace { __global__ void FillRangeKernel(const int n, float* data) { CUDA_1D_KERNEL_LOOP(index, n) { data[index] = index; }...
1896f0ce74593a54da8fea2d28f45b5de2ecb5fd.cu
#include "caffe2/core/context_gpu.h" #include "caffe2/operators/filler_op.h" namespace caffe2 { namespace { __global__ void FillRangeKernel(const int n, float* data) { CUDA_1D_KERNEL_LOOP(index, n) { data[index] = index; } } } template <> bool RangeFillOp<float, CUDAContext>::Fill( TensorCUDA* output) { ...
f3ea23d2e836532fe75f1885a772aa1992bdb8d1.hip
// !!! This is a file automatically generated by hipify!!! /* * Copyright (c) 2018-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.o...
f3ea23d2e836532fe75f1885a772aa1992bdb8d1.cu
/* * Copyright (c) 2018-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...
890514075e66bf4c72a07820794522f4f6212ad7.hip
// !!! This is a file automatically generated by hipify!!! #include "catch.hpp" #include <thrust/device_vector.h> //---------------------------------------------------------------------------------------- #define TEST_CUDA_CHECK_RETURN //-------------------------------------------------------------------------------...
890514075e66bf4c72a07820794522f4f6212ad7.cu
#include "catch.hpp" #include <thrust/device_vector.h> //---------------------------------------------------------------------------------------- #define TEST_CUDA_CHECK_RETURN //---------------------------------------------------------------------------------------- #include "BaseCudaTestHandler.h" #include "../GP...
c2efadd2acad18b834bd18bbaf1961fa5aa5d367.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Udacity Homework 3 HDR Tone-mapping Background HDR ============== A High Definition Range (HDR) image contains a wider variation of intensity and color than is allowed by the RGB format with 1 byte per channel that w...
c2efadd2acad18b834bd18bbaf1961fa5aa5d367.cu
/* Udacity Homework 3 HDR Tone-mapping Background HDR ============== A High Definition Range (HDR) image contains a wider variation of intensity and color than is allowed by the RGB format with 1 byte per channel that we have used in the previous assignment. To store this extra information we use si...
bb7674ecd4b6f0ab52fed40f1bd47fb928a05452.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <device_launch_parameters.h> #include <hip/hip_runtime.h> // function for checking the CUDA runtime API results. inline void checkCuda(hipError_t result) { #if defined(DEBUG) || defined(_DEBUG) if (result != h...
bb7674ecd4b6f0ab52fed40f1bd47fb928a05452.cu
#include <stdio.h> #include <stdlib.h> #include <device_launch_parameters.h> #include <cuda_runtime.h> // function for checking the CUDA runtime API results. inline void checkCuda(cudaError_t result) { #if defined(DEBUG) || defined(_DEBUG) if (result != cudaSuccess) { printf_s("Error: %s : %d", __FILE__, __LINE_...
3afaf1bf27abaf77fdbd8287bf8c846e73c6a50e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <string> #include <iostream> #include <fstream> #include <sstream> #include <float.h> #include <math.h> #ifndef OUT_OF_BOUNDS_LABEL #define OUT_OF_BOUNDS_LABEL -1 #endif #ifndef BAD_TOPOLOGY_LABEL #define BAD_TOPOLOGY_...
3afaf1bf27abaf77fdbd8287bf8c846e73c6a50e.cu
#include <string> #include <iostream> #include <fstream> #include <sstream> #include <float.h> #include <math.h> #ifndef OUT_OF_BOUNDS_LABEL #define OUT_OF_BOUNDS_LABEL -1 #endif #ifndef BAD_TOPOLOGY_LABEL #define BAD_TOPOLOGY_LABEL -2 #endif #ifndef NUM_OF_CHANNELS #define NUM_OF_CHANNELS 3 #endif #ifndef USE...
9d9c72e7975c25aa0642da638b2001146587ee41.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "cudakernel/memory/pad.h" #include "cudakernel/common/divmod_fast.h" #include "cudakernel/common/memory_utils.h" #include "ppl/nn/common/tensor_shape.h" #include "ppl/common/retcode.h" #include <hip/hip_fp16.h> template <t...
9d9c72e7975c25aa0642da638b2001146587ee41.cu
#include "cudakernel/memory/pad.h" #include "cudakernel/common/divmod_fast.h" #include "cudakernel/common/memory_utils.h" #include "ppl/nn/common/tensor_shape.h" #include "ppl/common/retcode.h" #include <cuda_fp16.h> template <typename T> __global__ void ppl_cukernel_pad( int64_t num_elems, int num_dims, P...
9038377c629036eeadba06211d70ac14482338d2.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #ifndef EVOLUTION_AUX_H #define EVOLUTION_AUX_H #include "evolutionUtils.h" #include "cudaMath.h" #include "coriolisUtils.h" #ifdef printf #undef printf #endif static __global__ void _print_constant_memory_() { printf(" %f %f ...
9038377c629036eeadba06211d70ac14482338d2.cu
#ifndef EVOLUTION_AUX_H #define EVOLUTION_AUX_H #include "evolutionUtils.h" #include "cudaMath.h" #include "coriolisUtils.h" #ifdef printf #undef printf #endif static __global__ void _print_constant_memory_() { printf(" %f %f %f %d\n", r1_dev.left, r1_dev.dr, r1_dev.mass, r1_dev.n); printf(" %f %f %f %d\n", r2_...
493b6fc5d8603637e68c69a9f12d91afa7ece82a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <assert.h> #define threshold 5 //(50% probability) #define block_size 256 __global__ void calculation( char* dev_a, char* dev_b, ...
493b6fc5d8603637e68c69a9f12d91afa7ece82a.cu
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <assert.h> #define threshold 5 //(50% probability) #define block_size 256 __global__ void calculation( char* dev_a, char* dev_b, char* dev_c, int num_mat...
b0b92ede1d3dbd4569f1fbdf66ed72178f5ddaef.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <add_cuda.h> namespace zjx{ __global__ void addwithcuda(int* x, int* y,int *z){ *z = *x + *y; } int add_ceshi(int m, int n){ int *x=0; int *y=0; int *z=0; hipMalloc((void**)&x,sizeof(int)); hipMa...
b0b92ede1d3dbd4569f1fbdf66ed72178f5ddaef.cu
#include <add_cuda.h> namespace zjx{ __global__ void addwithcuda(int* x, int* y,int *z){ *z = *x + *y; } int add_ceshi(int m, int n){ int *x=0; int *y=0; int *z=0; cudaMalloc((void**)&x,sizeof(int)); cudaMalloc((void**)&y,sizeof(int)); cudaMalloc((void**)&z,sizeof(int)); cudaMemcpy(x...
c4a88ba5108cb97facef58e08570a812424c23ee.hip
// !!! This is a file automatically generated by hipify!!! /* * 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/li...
c4a88ba5108cb97facef58e08570a812424c23ee.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 ...
fc569f4d1f75fcbd8af63b41eb00d1f6833dfc08.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.6.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2014 @generated from zlaswp.cu normal z -> d, Sat Nov 15 19:...
fc569f4d1f75fcbd8af63b41eb00d1f6833dfc08.cu
/* -- MAGMA (version 1.6.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date November 2014 @generated from zlaswp.cu normal z -> d, Sat Nov 15 19:53:59 2014 @author Stan Tomov @author Mathieu Faverge @auth...
fe2fc01e16dc0050bc058546dd3832030c4edec1.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int xdim0_flux_calc_kernelz; int xdim0_flux_calc_kernelz_h = -1; __constant__ int ydim0_flux_calc_kernelz; int ydim0_flux_calc_kernelz_h = -1; __constant__ int xdim1_flux_calc_kernelz; ...
fe2fc01e16dc0050bc058546dd3832030c4edec1.cu
// // auto-generated by ops.py // __constant__ int xdim0_flux_calc_kernelz; int xdim0_flux_calc_kernelz_h = -1; __constant__ int ydim0_flux_calc_kernelz; int ydim0_flux_calc_kernelz_h = -1; __constant__ int xdim1_flux_calc_kernelz; int xdim1_flux_calc_kernelz_h = -1; __constant__ int ydim1_flux_calc_kernelz; int ydim1_...
ff86553c188ee0651dd2f0556ed7ffd592ee2861.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // auto-generated by ops.py // __constant__ int dims_advec_mom_kernel2_x [4][2]; static int dims_advec_mom_kernel2_x_h [4][2] = {0}; //user function __device__ inline void advec_mom_kernel2_x_gpu(ACC<double> &vel1, const ACC<...
ff86553c188ee0651dd2f0556ed7ffd592ee2861.cu
// // auto-generated by ops.py // __constant__ int dims_advec_mom_kernel2_x [4][2]; static int dims_advec_mom_kernel2_x_h [4][2] = {0}; //user function __device__ inline void advec_mom_kernel2_x_gpu(ACC<double> &vel1, const ACC<double> &node_mass_post, const ACC<double> &node_mass_pre, const ACC<double> &mom_f...
87b20766ba959aa97a5c935e778a86ee7d395f2c.hip
// !!! This is a file automatically generated by hipify!!! #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #ifdef _WIN32 # define WINDOWS_LEAN_AND_MEAN # define NOMINMAX # include <windows.h> #endif // OpenGL Graphics includes #include <glew.h> #include <freeglut.h> #include <cudaDefs....
87b20766ba959aa97a5c935e778a86ee7d395f2c.cu
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #ifdef _WIN32 # define WINDOWS_LEAN_AND_MEAN # define NOMINMAX # include <windows.h> #endif // OpenGL Graphics includes #include <glew.h> #include <freeglut.h> #include <cudaDefs.h> #include <imageManager.h> // includes, cuda #include <c...
998800abb121a5af7855e424faca16733198baf5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> __global__ void add(int a, int b, int *c) { *c = a + b; } int main(int argc, char *argv[]) { int c; int *dev_c; hipError_t error = hipMalloc((void **)&dev_c, sizeof(int)); if(error ...
998800abb121a5af7855e424faca16733198baf5.cu
#include <stdio.h> #include <stdlib.h> __global__ void add(int a, int b, int *c) { *c = a + b; } int main(int argc, char *argv[]) { int c; int *dev_c; cudaError_t error = cudaMalloc((void **)&dev_c, sizeof(int)); if(error != cudaSuccess) { printf("Memory could not be allocated on device\n"); exit(EX...
36521f24734b7d61118e14683ce1847744163274.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.7.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date September 2015 @generated from ztranspose.cu normal z -> d, Fri Sep 1...
36521f24734b7d61118e14683ce1847744163274.cu
/* -- MAGMA (version 1.7.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date September 2015 @generated from ztranspose.cu normal z -> d, Fri Sep 11 18:29:21 2015 @author Stan Tomov @author Mark Gates */ #include "common...
98380c70655b01015fa5f5293d1055671d36766c.hip
// !!! This is a file automatically generated by hipify!!! /** * Project TACO: Parallel ACO algorithm for TSP * 15-418 Parallel Algorithms - Final Project * Ivan Wang, Carl Lin */ #include <stdio.h> #include <hip/hip_runtime.h> #include <hip/hip_runtime.h> #include <hiprand/hiprand_kernel.h> #include <math.h> ...
98380c70655b01015fa5f5293d1055671d36766c.cu
/** * Project TACO: Parallel ACO algorithm for TSP * 15-418 Parallel Algorithms - Final Project * Ivan Wang, Carl Lin */ #include <stdio.h> #include <cuda.h> #include <cuda_runtime.h> #include <curand_kernel.h> #include <math.h> #include <math_functions.h> #include "CycleTimer.h" #include "ants.h" #define MA...
4e38e620c4989978bd6179245bbad452224aeb2a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/ATen.h> #include <THH/THHAtomics.cuh> using namespace at; // temporal fix for pytorch<=0.4.1 (see #9848) #define THREADS_PER_BLOCK 1024 #define CUDA_1D_KERNEL_LOOP(i, n) \ for (int i =...
4e38e620c4989978bd6179245bbad452224aeb2a.cu
#include <ATen/ATen.h> #include <THC/THCAtomics.cuh> using namespace at; // temporal fix for pytorch<=0.4.1 (see #9848) #define THREADS_PER_BLOCK 1024 #define CUDA_1D_KERNEL_LOOP(i, n) \ for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; \ i += blockDim.x * gridDim.x) in...
784ba4c1ab8427d9399f03202b996b243d2d78ca.hip
// !!! This is a file automatically generated by hipify!!! /** * @file * * @author Lawrence Murray <lawrence.murray@csiro.au> * $Rev$ * $Date$ */ #include "device.hpp" #include "cuda.hpp" #include <vector> #ifdef ENABLE_CUDA hipDeviceProp_t bi::device_prop; #endif int bi::chooseDevice(const int rank) { int ...
784ba4c1ab8427d9399f03202b996b243d2d78ca.cu
/** * @file * * @author Lawrence Murray <lawrence.murray@csiro.au> * $Rev$ * $Date$ */ #include "device.hpp" #include "cuda.hpp" #include <vector> #ifdef ENABLE_CUDA cudaDeviceProp bi::device_prop; #endif int bi::chooseDevice(const int rank) { int dev, num; std::vector<int> valid; /* build list of vali...
654e9b8bd99dc9bb0b348a63ad2010e54f9cd586.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "head.h" #define tpb 256 extern float *d_t; extern float *d_it; extern float *d_V; extern float *d_dV2; extern float *d_Vnew; extern float *d_m; extern float *d_h; extern float *d_jj; extern float *d_d; extern float *d_f;...
654e9b8bd99dc9bb0b348a63ad2010e54f9cd586.cu
#include "head.h" #define tpb 256 extern float *d_t; extern float *d_it; extern float *d_V; extern float *d_dV2; extern float *d_Vnew; extern float *d_m; extern float *d_h; extern float *d_jj; extern float *d_d; extern float *d_f; extern float *d_X; extern float *d_cai; extern float *d_m0; extern float *d_h0; extern...
9c06140c24c05ff20b0ac0235c03eadc4368f981.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <reduce.h> __device__ float update(float old,float opOutput,float *extraParams) { float mean = extraParams[1]; float curr = (opOutput - mean); return old + powf(curr,2); } __device__...
9c06140c24c05ff20b0ac0235c03eadc4368f981.cu
#include <reduce.h> __device__ float update(float old,float opOutput,float *extraParams) { float mean = extraParams[1]; float curr = (opOutput - mean); return old + powf(curr,2); } __device__ float op(float d1,float d2,float *extraParams) { return d1 + d2; } __device__ ...
b16c109493f6daddb5c0aa16e36e1a03e843e954.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <THHUNN/THHUNN.h> #include <THHUNN/common.h> #include <THH/THHTensor.hpp> #include <THH/THHThrustAllocator.cuh> #include <thrust/device_ptr.h> #include <thrust/execution_policy.h> #include <thrust/iterator/constant_iterato...
b16c109493f6daddb5c0aa16e36e1a03e843e954.cu
#include <THCUNN/THCUNN.h> #include <THCUNN/common.h> #include <THC/THCTensor.hpp> #include <THC/THCThrustAllocator.cuh> #include <thrust/device_ptr.h> #include <thrust/execution_policy.h> #include <thrust/iterator/constant_iterator.h> #include <thrust/transform_reduce.h> #if CUDA_VERSION >= 7000 || defined __HIP_PLAT...
6d77934834f3b9ae0c3c84052c35d6089e06c3d0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void getAggregateStartIndicesKernel(int size, int *fineAggregateSort, int *aggregateRemapIndex) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if(idx < size) { if(idx == 0 || fineAggregateSort[id...
6d77934834f3b9ae0c3c84052c35d6089e06c3d0.cu
#include "includes.h" __global__ void getAggregateStartIndicesKernel(int size, int *fineAggregateSort, int *aggregateRemapIndex) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if(idx < size) { if(idx == 0 || fineAggregateSort[idx] != fineAggregateSort[idx - 1]) { aggregateRemapIndex[fineAggregateSort[idx]] = idx; }...
1d975390723bc8b3dafff7cb041b6eedd55299f6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <comm_quda.h> #include <gauge_fix_ovr_extra.h> #include <thrust_helper.cuh> namespace quda { #if defined(GPU_GAUGE_ALG) && defined(MULTI_GPU) struct BorderIdArg { int X[4]; // grid dimensions int border[4]; ...
1d975390723bc8b3dafff7cb041b6eedd55299f6.cu
#include <comm_quda.h> #include <gauge_fix_ovr_extra.h> #include <thrust_helper.cuh> namespace quda { #if defined(GPU_GAUGE_ALG) && defined(MULTI_GPU) struct BorderIdArg { int X[4]; // grid dimensions int border[4]; BorderIdArg(int X_[4], int border_[4]) { for ( int dir = 0; dir < 4; ++dir ) bord...
483dd6dc56b0e4a2ea1cee902ace3a8a90f6882f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include<math.h> #include<iostream> using namespace std; __global__ void sum(float* input) { int tid = threadIdx.x; int step_size = 1; int number_of_threads = blockDim.x; fl...
483dd6dc56b0e4a2ea1cee902ace3a8a90f6882f.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <stdio.h> #include<math.h> #include<iostream> using namespace std; __global__ void sum(float* input) { int tid = threadIdx.x; int step_size = 1; int number_of_threads = blockDim.x; float aux_size = (float)number_of_threads; while (number_of_thr...
d56e6273302bd5473d5fbdaaf74d270176efb499.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* -- MAGMA (version 1.4.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver December 2013 @precisions normal c -> d s */ #include "common_magma.h" #de...
d56e6273302bd5473d5fbdaaf74d270176efb499.cu
/* -- MAGMA (version 1.4.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver December 2013 @precisions normal c -> d s */ #include "common_magma.h" #define PRECISION_c /* The version for fermi can be found in csymv_fermi.cu */ /* TODO: g...
bd057c05f3a461ce527098667ad01336bb97d1d4.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // ------------------------------------------------------------------ // Fast R-CNN // Copyright (c) 2015 Microsoft // Licensed under The MIT License [see fast-rcnn/LICENSE for details] // Written by Ross Girshick // ---------------...
bd057c05f3a461ce527098667ad01336bb97d1d4.cu
// ------------------------------------------------------------------ // Fast R-CNN // Copyright (c) 2015 Microsoft // Licensed under The MIT License [see fast-rcnn/LICENSE for details] // Written by Ross Girshick // ------------------------------------------------------------------ #include <cfloat> #include <stdio.h...
24d5977c07af709cba03597c8d3b32752d5592e6.hip
// !!! This is a file automatically generated by hipify!!! /* * gapped_extender_test.cpp * * Created on: 2012/11/20 * Author: shu */ #include <gtest/gtest.h> #include <string> #include <stdint.h> #include <fstream> #include <limits.h> #include "../src/score_matrix.h" #include "../src/alphabet_coder.h" #incl...
24d5977c07af709cba03597c8d3b32752d5592e6.cu
/* * gapped_extender_test.cpp * * Created on: 2012/11/20 * Author: shu */ #include <gtest/gtest.h> #include <string> #include <stdint.h> #include <fstream> #include <limits.h> #include "../src/score_matrix.h" #include "../src/alphabet_coder.h" #include "../src/sequence_type.h" #include "../src/protein_type....
780db9fb3fc93a0be6fa234c02751de8ea961453.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // // Transpose.cu // MNN // // Created by MNN on b'2021/12/09'. // Copyright 2018, Alibaba Group Holding Limited // #include "Transpose_hip.cuh" #include "core/Macro.h" #include "MNNCUDADefine.hpp" #include "MNNCUDAFunction.c...
780db9fb3fc93a0be6fa234c02751de8ea961453.cu
// // Transpose.cu // MNN // // Created by MNN on b'2021/12/09'. // Copyright © 2018, Alibaba Group Holding Limited // #include "Transpose.cuh" #include "core/Macro.h" #include "MNNCUDADefine.hpp" #include "MNNCUDAFunction.cuh" namespace MNN { namespace CUDA { template<typename T0, typename T1> __global__ void UN...
2138a1664da6dc9b318ed4a25bee196ec6e1903f.hip
// !!! This is a file automatically generated by hipify!!! #include <cstdio> #include "hip/hip_runtime.h" #include "utils.cuh" #include "../device/device_context.cuh" #include "tsvd.h" #include <ctime> #include <thrust/iterator/counting_iterator.h> #include<algorithm> #include <thrust/sequence.h> namespace tsvd { /**...
2138a1664da6dc9b318ed4a25bee196ec6e1903f.cu
#include <cstdio> #include "cuda_runtime.h" #include "utils.cuh" #include "../device/device_context.cuh" #include "tsvd.h" #include <ctime> #include <thrust/iterator/counting_iterator.h> #include<algorithm> #include <thrust/sequence.h> namespace tsvd { /** * Division utility to get explained variance ratio * * @pa...
c2650d9f6ba1721e7ac8bb41364bf00fc2e479e6.hip
// !!! This is a file automatically generated by hipify!!! /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you und...
c2650d9f6ba1721e7ac8bb41364bf00fc2e479e6.cu
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
54422a1a9502edcfe48d02d6b14b58cc55279da3.hip
// !!! This is a file automatically generated by hipify!!! /****************************************************************************** MIT License Copyright (c) 2016 Antti-Pekka Hynninen Copyright (c) 2016 Oak Ridge National Laboratory (UT-Batelle) Permission is hereby granted, free of charge, to any person obtai...
54422a1a9502edcfe48d02d6b14b58cc55279da3.cu
/****************************************************************************** MIT License Copyright (c) 2016 Antti-Pekka Hynninen Copyright (c) 2016 Oak Ridge National Laboratory (UT-Batelle) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation f...
be08bb247f73c85e40cfd22868abc3891a9de343.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <hipcub/hipcub.hpp> #include <hipcub/hipcub.hpp> #include <moderngpu/transform.hxx> #include <moderngpu/kernel_scan.hxx> #include <moderngpu/kernel_load_balance.hxx> using namespace mgpu; using namespace cub; __global__ ...
be08bb247f73c85e40cfd22868abc3891a9de343.cu
#include <cub/util_allocator.cuh> #include <cub/device/device_scan.cuh> #include <moderngpu/transform.hxx> #include <moderngpu/kernel_scan.hxx> #include <moderngpu/kernel_load_balance.hxx> using namespace mgpu; using namespace cub; __global__ void GetneighLen(uint32_t *nodes, int sizeNode, uint32_t *tr_offset, uint...
6b2ff27d3659f51258bc0db8353a02a99613d97f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* This is a automatically generated test. Do not modify */ #include <stdio.h> #include <stdlib.h> #include <math.h> __global__ void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float va...
6b2ff27d3659f51258bc0db8353a02a99613d97f.cu
/* This is a automatically generated test. Do not modify */ #include <stdio.h> #include <stdlib.h> #include <math.h> __global__ void compute(float comp, int var_1,int var_2,float var_3,float var_4,float var_5,float var_6,float var_7,float var_8,float var_9,float var_10,float var_11,float var_12,float* var_13,float* ...
66ce1f044e90d9c8ab1ba1c04824926bd839958e.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. * * This software and the...
66ce1f044e90d9c8ab1ba1c04824926bd839958e.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. * * This software and the information contained herein is PROPRIETARY and * CONFIDENTIAL to NVIDIA and is being...
d43ea4f1a0878019413ed847cb51a76e6d7c86bd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <math.h> #include <gpu_error.cuh> __global__ void saxpy(int n, float a, float *x, float *y) { int index = blockIdx.x * blockDim.x + threadIdx.x; int stride = gridDim.x * blockDim.x; for (int ...
d43ea4f1a0878019413ed847cb51a76e6d7c86bd.cu
#include <stdio.h> #include <math.h> #include <gpu_error.cuh> __global__ void saxpy(int n, float a, float *x, float *y) { int index = blockIdx.x * blockDim.x + threadIdx.x; int stride = gridDim.x * blockDim.x; for (int i = index; i < n; i += stride) { y[i] = a * x[i] + y[i]; } } int main(void)...
168c40f49e00cd0d0b08f76b95bc18608621d6d5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "./argsort.cuh" #include "./bitonic_sort.cuh" #include "megdnn/basic_types.h" #include "src/cuda/utils.cuh" #include "src/cuda/hipcub/hipcub.hpp" #include "src/cuda/cub/device/device_segmented_radix_sort.cuh" #include "src...
168c40f49e00cd0d0b08f76b95bc18608621d6d5.cu
#include "./argsort.cuh" #include "./bitonic_sort.cuh" #include "megdnn/basic_types.h" #include "src/cuda/utils.cuh" #include "src/cuda/cub/device/device_radix_sort.cuh" #include "src/cuda/cub/device/device_segmented_radix_sort.cuh" #include "src/cuda/kernel_common/diagnostic_prologue.cuh" using namespace megdnn; usi...
43f768cfe599b760ef0004d9697d27e22747f56e.hip
// !!! This is a file automatically generated by hipify!!! #include <stdio.h> #include <stdlib.h> #include <time.h> extern "C" { void * alloc_gpu_mem( size_t N) { void*d; int size = N *sizeof(float); int err; err = hipMalloc(&d, size); if (err != 0) printf("cuda malloc error: %d\n", err); return d; }} // s...
43f768cfe599b760ef0004d9697d27e22747f56e.cu
#include <stdio.h> #include <stdlib.h> #include <time.h> extern "C" { void * alloc_gpu_mem( size_t N) { void*d; int size = N *sizeof(float); int err; err = cudaMalloc(&d, size); if (err != 0) printf("cuda malloc error: %d\n", err); return d; }} // see kernels.cu for launch_kernel functions extern "C" { vo...
d8844cf3c74ee005539426d699f32486aaae4204.hip
// !!! This is a file automatically generated by hipify!!! #include<iostream> #include<complex> #include<stdlib.h> #include <hip/hip_runtime.h> #include <hip/hip_complex.h> #include <math.h> #include<hiprand/hiprand.h> #include<hiprand/hiprand_kernel.h> #include "stopwatch.hpp" stopwatch<std::milli, float> sw; #define...
d8844cf3c74ee005539426d699f32486aaae4204.cu
#include<iostream> #include<complex> #include<stdlib.h> #include <cuda.h> #include <cuComplex.h> #include <math.h> #include<curand.h> #include<curand_kernel.h> #include "stopwatch.hpp" stopwatch<std::milli, float> sw; #define RADIUS 3 #define FRAME_SIZE 4096*8*7 #define NBPSC 2 #define NSC 64 #define NCBPS 128 typ...
62a7c612f709cc59ff67dfade587ebb4c0fb72fd.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void bp_maxpool(float* d_preact, float* preact, float* p_output, float* nd_output, const int kernel_size, const int size, const int n_size, const int in_channel, bool SAME) { const int pos = blockIdx...
62a7c612f709cc59ff67dfade587ebb4c0fb72fd.cu
#include "includes.h" __global__ void bp_maxpool(float* d_preact, float* preact, float* p_output, float* nd_output, const int kernel_size, const int size, const int n_size, const int in_channel, bool SAME) { const int pos = blockIdx.x * blockDim.x + threadIdx.x; const int totalPos = blockDim.x * gridDim.x; const int N ...
fb88d3e7f26b194f88a934abd1df19cd9e609b1e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> __global__ void saxpy(int n, float a, float* x, float* y) { int i = blockIdx.x * blockDim.x + threadIdx.x; if (i < n) y[i] = a * x[i] + y[i]; } int main(void) { int N = 1 << 20; float* x, * y, * d_x, * d_y; ...
fb88d3e7f26b194f88a934abd1df19cd9e609b1e.cu
#include <stdio.h> __global__ void saxpy(int n, float a, float* x, float* y) { int i = blockIdx.x * blockDim.x + threadIdx.x; if (i < n) y[i] = a * x[i] + y[i]; } int main(void) { int N = 1 << 20; float* x, * y, * d_x, * d_y; x = (float*)malloc(N * sizeof(float)); y = (float*)malloc(N * sizeof(float)); cudaMa...
526783aa0ebad9996054d3e157359e451b3d744a.hip
// !!! This is a file automatically generated by hipify!!! /* * (C) Copyright 1996-2016 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and i...
526783aa0ebad9996054d3e157359e451b3d744a.cu
/* * (C) Copyright 1996-2016 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an in...
207d1a99bed514fbadb9d456d28d22ac04ad8692.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /* Copyright (c) 2020 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 ...
207d1a99bed514fbadb9d456d28d22ac04ad8692.cu
/* Copyright (c) 2020 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...
7adf076be48f49d02139779ed23d621b71790251.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // This exercise is for student to get familiarized with passing data between host and device #include <stdio.h> __global__ void vector_add(int *d_c, int *d_a, int *d_b, int n){ int i = blockIdx.x * blockDim.x + threadIdx.x; ...
7adf076be48f49d02139779ed23d621b71790251.cu
// This exercise is for student to get familiarized with passing data between host and device #include <stdio.h> __global__ void vector_add(int *d_c, int *d_a, int *d_b, int n){ int i = blockIdx.x * blockDim.x + threadIdx.x; d_c[i] = d_a[i] + d_b[i]; //printf("GPU[%d] done!\n", i); } int main(void){...
ef80c6c3657bae7163d414c7041e1a13c82ac48e.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <iostream> #include "timer.h" using namespace std; /* Utility function, use to do error checking. Use this function like this: checkCuda...
ef80c6c3657bae7163d414c7041e1a13c82ac48e.cu
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <iostream> #include "timer.h" using namespace std; /* Utility function, use to do error checking. Use this function like this: checkCudaCall(cudaMalloc((void **) &deviceRGB, imgS * sizeof(color_t))); And to check the res...
d020a380e7a887ade564a828df1797c94f7ca7e5.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" // Modified from // https://github.com/LikeLy-Journey/SegmenTron/blob/master/segmentron/modules/csrc/criss_cross_attention/ca_cuda.cu #include <THH/THH.h> #include <THH/THHDeviceUtils.cuh> #include "cc_attention_cuda_kernel.cuh" ...
d020a380e7a887ade564a828df1797c94f7ca7e5.cu
// Modified from // https://github.com/LikeLy-Journey/SegmenTron/blob/master/segmentron/modules/csrc/criss_cross_attention/ca_cuda.cu #include <THC/THC.h> #include <THC/THCDeviceUtils.cuh> #include "cc_attention_cuda_kernel.cuh" #include "pytorch_cuda_helper.hpp" void CAForwardCUDAKernelLauncher(const Tensor t, con...
0d2fcaeb3d9b279a4f1493a509762cf27484f9ee.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <stdio.h> __global__ void kernelA(int N){ int globalThreadId = blockIdx.x * blockDim.x + threadIdx.x; // Conditional statement to exit if index (globalThreadId) is out of bounds if(globalThreadId >= N) ...
0d2fcaeb3d9b279a4f1493a509762cf27484f9ee.cu
#include <stdio.h> __global__ void kernelA(int N){ int globalThreadId = blockIdx.x * blockDim.x + threadIdx.x; // Conditional statement to exit if index (globalThreadId) is out of bounds if(globalThreadId >= N) { return; } //Insert code here printf("Hello from block %d, thread...
c7ca18d736f2dc1b4cef4d25345f3309ea04fc72.hip
// !!! This is a file automatically generated by hipify!!! #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cfloat> #include <algorithm> #include <chrono> #include <iomanip> #include <iostream> #include <map> #include <memory> #include <random> #include <sstream> #include <string> #incl...
c7ca18d736f2dc1b4cef4d25345f3309ea04fc72.cu
#include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cfloat> #include <algorithm> #include <chrono> #include <iomanip> #include <iostream> #include <map> #include <memory> #include <random> #include <sstream> #include <string> #include <vector> #include <cuda_runtime.h> #include <device_la...
98e6f67992f1d5458f86bd025c83c8d17fb34d13.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void accumulate_kernel(float *x, int n, int groups, float *sum) { int k; int i = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x; if (i >= groups) return; sum[i] = 0; for(k = 0; k < n;...
98e6f67992f1d5458f86bd025c83c8d17fb34d13.cu
#include "includes.h" __global__ void accumulate_kernel(float *x, int n, int groups, float *sum) { int k; int i = (blockIdx.x + blockIdx.y*gridDim.x) * blockDim.x + threadIdx.x; if (i >= groups) return; sum[i] = 0; for(k = 0; k < n; ++k){ sum[i] += x[k*groups + i]; } }
4bf9ed8003e9b35661c09218188909f422fb6695.hip
// !!! This is a file automatically generated by hipify!!! // From PTT // (, ) #include <hip/hip_runtime.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <math.h> //////////////////////////////////////// // (GPU) // __global__ // void //////////////////////////////////////// __global__ void ...
4bf9ed8003e9b35661c09218188909f422fb6695.cu
// From PTT // (單一區塊, 多執行緒) #include <cuda.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <math.h> //////////////////////////////////////// // 向量加法的運算核心 (GPU) // 函式前加 __global__ 即為核心 // 核心只傳回 void //////////////////////////////////////// __global__ void gpu_add(float* c, float* a, float* b, in...
288e26c827da19a8d1249faf248300e45a341112.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void kernel(float *array, int size) { int index = blockIdx.x * blockDim.x + threadIdx.x; if (index < size) { array[index] += 1.f; if (index == 0) printf("### Array size: %d\n", size); } }
288e26c827da19a8d1249faf248300e45a341112.cu
#include "includes.h" __global__ void kernel(float *array, int size) { int index = blockIdx.x * blockDim.x + threadIdx.x; if (index < size) { array[index] += 1.f; if (index == 0) printf("### Array size: %d\n", size); } }
454673db31159599ea4001c2f62d8b62a989167a.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "nbody.h" #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> // drand48 #include <sys/time.h> enum Initializer initializer = RANDOM_INITIALIZER; #ifdef DUMP FILE *output; #endif __global__ void Upd...
454673db31159599ea4001c2f62d8b62a989167a.cu
#include "nbody.h" #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> // drand48 #include <sys/time.h> enum Initializer initializer = RANDOM_INITIALIZER; #ifdef DUMP FILE *output; #endif __global__ void UpdateParticle(const int nParticles, struct ParticleArray *c...
a28f4db34f27cc4e55e32247738f6379708a08a7.hip
// !!! This is a file automatically generated by hipify!!! /* Copyright 2018 Stanford * * 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 ...
a28f4db34f27cc4e55e32247738f6379708a08a7.cu
/* Copyright 2018 Stanford * * 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 wri...
6bbd14aa77b75627692322f3491f4510e3a1ed7c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/LinearAlgebra.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/hip/Loops.cuh> #include <ATen/na...
6bbd14aa77b75627692322f3491f4510e3a1ed7c.cu
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/Dispatch.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/LinearAlgebra.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/cuda/Loops.cuh> #include <ATen/native/SharedReduceOps.h> #include <ATen/native/ReduceOps.h> #include <c10/core/Scalar.h>...
1b093fcc0b3c79946d3a4518ad2c802bd4cb2fe0.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void CopyConnectionsCoordinatesKernel( int *connectionMatrix, float *pointsCoordinates, float *vertexData, int *connectionCount, int maxCells ) { int threadId = blockDim.x*blockIdx.y*gridDim.x //r...
1b093fcc0b3c79946d3a4518ad2c802bd4cb2fe0.cu
#include "includes.h" __global__ void CopyConnectionsCoordinatesKernel( int *connectionMatrix, float *pointsCoordinates, float *vertexData, int *connectionCount, int maxCells ) { int threadId = blockDim.x*blockIdx.y*gridDim.x //rows preceeding current row in grid + blockDim.x*blockIdx.x //blocks preceeding curren...
39b9e86df456101fcd95ba2150c03f8db4df014d.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...
39b9e86df456101fcd95ba2150c03f8db4df014d.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 NOT...
90b490704dc3727e4879d2fcb963f3e4a3a01834.hip
// !!! This is a file automatically generated by hipify!!! #include <primitiv/config.h> #include <iostream> #include <primitiv/devices/cuda/device.h> #include <primitiv/devices/cuda/ops/common.h> #include <primitiv/internal/cuda/utils.h> namespace primitiv { namespace devices { void CUDA::dump_description() const {...
90b490704dc3727e4879d2fcb963f3e4a3a01834.cu
#include <primitiv/config.h> #include <iostream> #include <primitiv/devices/cuda/device.h> #include <primitiv/devices/cuda/ops/common.h> #include <primitiv/internal/cuda/utils.h> namespace primitiv { namespace devices { void CUDA::dump_description() const { using std::cerr; using std::endl; cerr << "Device "...
b61ed1f0ad7749786fcf9a3c6db6fc38cec6e7d7.hip
// !!! This is a file automatically generated by hipify!!! /** * Copyright (c) 2020 Xiaomi Corporation (authors: Daniel Povey, Haowen Qiu, * Wei Kang) * Mobvoi Inc. (authors: Fangjun Kuang) * * See LICENSE for clarification regarding m...
b61ed1f0ad7749786fcf9a3c6db6fc38cec6e7d7.cu
/** * Copyright (c) 2020 Xiaomi Corporation (authors: Daniel Povey, Haowen Qiu, * Wei Kang) * Mobvoi Inc. (authors: Fangjun Kuang) * * See LICENSE for clarification regarding multiple authors * * Licensed under the Apache License, Ve...
b19081090de3175f678c51449d3572b64f177167.hip
// !!! This is a file automatically generated by hipify!!! /*********************************************************************************** Implementing Breadth first search on CUDA using algorithm given in HiPC'07 paper "Accelerating Large Graph Algorithms on the GPU using CUDA" Copyright (c) 2008 Internati...
b19081090de3175f678c51449d3572b64f177167.cu
/*********************************************************************************** Implementing Breadth first search on CUDA using algorithm given in HiPC'07 paper "Accelerating Large Graph Algorithms on the GPU using CUDA" Copyright (c) 2008 International Institute of Information Technology - Hyderabad. Al...
5a601ce0bc1d6567768a230949c11e88e0bd7510.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" /** * intList.cu */ #include "header/intList.h" __device__ void copyTabDev(uint64_t *src, uint64_t *dest, int size) { if (blockIdx.x == 0) { int tid = threadIdx.x; if (tid < size) { dest[tid] = src[tid]; } } } //1 blo...
5a601ce0bc1d6567768a230949c11e88e0bd7510.cu
/** * intList.cu */ #include "header/intList.h" __device__ void copyTabDev(uint64_t *src, uint64_t *dest, int size) { if (blockIdx.x == 0) { int tid = threadIdx.x; if (tid < size) { dest[tid] = src[tid]; } } } //1 block ; size thread __global__ void copyTabGPU(uint64_t *src, uint64_t *dest, int size) { ...
87a74e1c8c82f4b4d0879873dbd5c09c3d5e6ad3.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <basicOps.cuh> #include <hiprand/hiprand.h> #include <hiprand/hiprand_kernel.h> #include <float.h> const int NUM_THREADS = 32; __global__ void kGetNonZeroElements(float *A, float *out, int size) { const unsigned int num...
87a74e1c8c82f4b4d0879873dbd5c09c3d5e6ad3.cu
#include <basicOps.cuh> #include <curand.h> #include <curand_kernel.h> #include <float.h> const int NUM_THREADS = 32; __global__ void kGetNonZeroElements(float *A, float *out, int size) { const unsigned int numThreads = blockDim.x * gridDim.x; const int idx = (blockIdx.x * blockDim.x) + threadIdx.x; for (unsigned...
bb96edd9bedd5a15c6937b8038707cfe5e62a49b.hip
// !!! This is a file automatically generated by hipify!!! /* Sample code for Sparse-Matrix-Vector multiplication.*/ #include <iostream> #include <cstdlib> #include <time.h> #include <hip/hip_runtime.h> #include <minigun/minigun.h> #include "../samples_utils.h" #include "../samples_io.h" struct GData { float* cur{n...
bb96edd9bedd5a15c6937b8038707cfe5e62a49b.cu
/* Sample code for Sparse-Matrix-Vector multiplication.*/ #include <iostream> #include <cstdlib> #include <time.h> #include <cuda_runtime.h> #include <minigun/minigun.h> #include "../samples_utils.h" #include "../samples_io.h" struct GData { float* cur{nullptr}; float* next{nullptr}; float* weight{nullptr}; i...
f2e98459274f88ddd86fa3ab3796e844f9a3f509.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "Indice2D.h" #include "DomaineMathGPUs.h" #include "DomaineMaths.h" #include "IndiceXY.h" #include "cudaTools.h" #include "Sphere.h" #include "ColorToolCuda.h" #include "FonctionsRaytracing.h" /*---------------------------...
f2e98459274f88ddd86fa3ab3796e844f9a3f509.cu
#include "Indice2D.h" #include "DomaineMathGPUs.h" #include "DomaineMaths.h" #include "IndiceXY.h" #include "cudaTools.h" #include "Sphere.h" #include "ColorToolCuda.h" #include "FonctionsRaytracing.h" /*----------------------------------------------------------------------*\ |* Declaration *| \*-------------...
1a081687cf859bfd2f4cb02233364e8401b67e28.hip
// !!! This is a file automatically generated by hipify!!! #include "LinearSearch.h" #include "hip/hip_runtime.h" #include "device_launch_parameters.h" #include <random> #include <math.h> #include <memory> namespace { __global__ void searchWithCuda(int64_t * arr, size_t N, int64_t x) { int index = threadIdx.x; ...
1a081687cf859bfd2f4cb02233364e8401b67e28.cu
#include "LinearSearch.h" #include "cuda_runtime.h" #include "device_launch_parameters.h" #include <random> #include <math.h> #include <memory> namespace { __global__ void searchWithCuda(int64_t * arr, size_t N, int64_t x) { int index = threadIdx.x; int stride = blockDim.x; for (int i = index; i < N; i += ...
244ab14cf63924a5438b4819e8b9491596b5a9ba.hip
// !!! This is a file automatically generated by hipify!!! #include "GoL.h" #include <iostream> #include <fstream> #include <iomanip> int max_generations = 1000; int n_small = 9; int n_large = 20; // Perform a single run void timedRun(int sz, bool small, std::ofstream &myfile, hipEvent_t start, hipEvent_t stop){ ...
244ab14cf63924a5438b4819e8b9491596b5a9ba.cu
#include "GoL.h" #include <iostream> #include <fstream> #include <iomanip> int max_generations = 1000; int n_small = 9; int n_large = 20; // Perform a single run void timedRun(int sz, bool small, std::ofstream &myfile, cudaEvent_t start, cudaEvent_t stop){ // Set input parameters auto rows = sz*10; aut...
51c2e4e8267ddc08cd84a060140692254a5cb2ce.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "task_filljtr.cuh" template<typename T> __global__ void d_fillJTr( DeviceMemory<T>* mem ) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if( idx >= mem->nParamPoints ) return; if( !mem->paramsUsed[idx] ) return; T...
51c2e4e8267ddc08cd84a060140692254a5cb2ce.cu
#include "task_filljtr.cuh" template<typename T> __global__ void d_fillJTr( DeviceMemory<T>* mem ) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if( idx >= mem->nParamPoints ) return; if( !mem->paramsUsed[idx] ) return; T sumx = 0; T sumy = 0; T sumx2 = 0; T sumy2 = 0; int idxm = idx % mem->frameW; if...
984c7a679f1500f4d3534214ae122e9ee04ecde8.hip
// !!! This is a file automatically generated by hipify!!! #include <algorithm> #include <cfloat> #include <vector> #include "caffe/layers/triplet_loss_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void TripletLossLayer<Dtype>::Forward_gpu( const vector<Blob<Dty...
984c7a679f1500f4d3534214ae122e9ee04ecde8.cu
#include <algorithm> #include <cfloat> #include <vector> #include "caffe/layers/triplet_loss_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void TripletLossLayer<Dtype>::Forward_gpu( const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { Colle...
b18b55eecada4380003854e32ed485a6964f1f4a.hip
// !!! This is a file automatically generated by hipify!!! // ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (M...
b18b55eecada4380003854e32ed485a6964f1f4a.cu
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2020 www.open3d.org // // Permissio...
04f4e1c21df38739f3544a05fa0e9df45a3c0ab0.hip
// !!! This is a file automatically generated by hipify!!! #include <time.h> #include <stdio.h> #include <stdlib.h> #include <hip/hip_runtime.h> #include <hiprand/hiprand_kernel.h> // Calculate an estimated value of pi using n random Monte-Carlo draws __global__ void estimate_pi(int seed, int per_thread, hiprandState...
04f4e1c21df38739f3544a05fa0e9df45a3c0ab0.cu
#include <time.h> #include <stdio.h> #include <stdlib.h> #include <cuda.h> #include <curand_kernel.h> // Calculate an estimated value of pi using n random Monte-Carlo draws __global__ void estimate_pi(int seed, int per_thread, curandState *state, unsigned int *result) { int id = threadIdx.x + blockIdx.x * blockD...
47fbeebea4d5be2748d67be0f4c4c933897e617f.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <ATen/ATen.h> #include <ATen/InitialTensorOptions.h> #include <ATen/NativeFunctions.h> #include <ATen/hip/HIPApplyUtils.cuh> #include <ATen/hip/HIPContext.h> #include <ATen/native/TensorFactories.h> #include <ATen/native/hi...
47fbeebea4d5be2748d67be0f4c4c933897e617f.cu
#include <ATen/ATen.h> #include <ATen/InitialTensorOptions.h> #include <ATen/NativeFunctions.h> #include <ATen/cuda/CUDAApplyUtils.cuh> #include <ATen/cuda/CUDAContext.h> #include <ATen/native/TensorFactories.h> #include <ATen/native/cuda/Resize.cuh> #include <c10/util/Exception.h> #include <THC/THCGeneral.h> #include...
1a7216b79e804be5c07965ee6b1d37826f611b7f.hip
// !!! This is a file automatically generated by hipify!!! #include "CUDAFCM.h" #include <iostream> #include <cmath> #include <omp.h> #include <stdio.h> #include <hiprand/hiprand.h> #include <hip/hip_runtime.h> #include <vector> /* Code: Fuzzy C-means Developer: Dennis Carnelossi Furlaneto License: MIT */ namespace CU...
1a7216b79e804be5c07965ee6b1d37826f611b7f.cu
#include "CUDAFCM.h" #include <iostream> #include <cmath> #include <omp.h> #include <stdio.h> #include <curand.h> #include <cuda.h> #include <vector> /* Code: Fuzzy C-means Developer: Dennis Carnelossi Furlaneto License: MIT */ namespace CUDAFCM { #define N_THREADS 256 #define CUDA_CALL(x) do { if((x)!=cudaSucce...
c239315edbbd9423b711fc17eef37db7bc7dab37.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "cudarray/common.hpp" #include "cudarray/elementwise.hpp" namespace cudarray { #define BINARY_OP(name, operation) \ template <typename Ta, typename Tb, typename Tc> \ struct name { \ __device__ Tc operator()(const Ta ...
c239315edbbd9423b711fc17eef37db7bc7dab37.cu
#include "cudarray/common.hpp" #include "cudarray/elementwise.hpp" namespace cudarray { #define BINARY_OP(name, operation) \ template <typename Ta, typename Tb, typename Tc> \ struct name { \ __device__ Tc operator()(const Ta a, const Tb b) { \ return operation; \ } \ }; BINARY_OP(AddOp, a + b) BINARY_OP(D...
9220f1569768bf0d244b82830640beea594432e3.hip
// !!! This is a file automatically generated by hipify!!! #ifndef _MYNN #define _MYNN #include <hip/hip_runtime.h> #include <math.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <vector> using namespace std; #include "types.h" #include "libnn.h" #define...
9220f1569768bf0d244b82830640beea594432e3.cu
#ifndef _MYNN #define _MYNN #include <cuda.h> #include <math.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <vector> using namespace std; #include "types.h" #include "libnn.h" #define LAYERS (2) #define NINPUTS (2) #define NOUTPUTS (2) #define MIDDLE ...
36e94d6e1515d07ec47d8695a75ccefcbe624894.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "ristretto/base_ristretto_layer.hpp" #include "ristretto/base_ristretto_layer.cuh" namespace caffe { template <typename Dtype> void BaseRistrettoLayer<Dtype>::QuantizeWeights_gpu( vector<shared_ptr<Blob<Dtype> > > w...
36e94d6e1515d07ec47d8695a75ccefcbe624894.cu
#include "ristretto/base_ristretto_layer.hpp" #include "ristretto/base_ristretto_layer.cuh" namespace caffe { template <typename Dtype> void BaseRistrettoLayer<Dtype>::QuantizeWeights_gpu( vector<shared_ptr<Blob<Dtype> > > weights_quantized, const int rounding, const bool bias_term) { Dtype* weight = we...
kernel_functions_for_tex_2d.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" texture<int, 2, hipReadModeElementType> tex_2d; __global__ void read_texture_2d(int nx, int ny){ int x = threadIdx.x + blockDim.x * blockIdx.x; int y = threadIdx.y + blockDim.y * blockIdx.y; if (x < nx && y < ny){ i...
kernel_functions_for_tex_2d.cu
texture<int, 2, cudaReadModeElementType> tex_2d; __global__ void read_texture_2d(int nx, int ny){ int x = threadIdx.x + blockDim.x * blockIdx.x; int y = threadIdx.y + blockDim.y * blockIdx.y; if (x < nx && y < ny){ int value = tex2D(tex_2d, x, y); printf("x: %d, y: %d, my value is %d\n", x, y, ...
1fddf82d690852ad20c715ef6904c8bf20b36757.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include <chrono> #include "array2d.h" #include "cuda_helper.h" #include "ns2d.h" #define value_t double #define index_t int // constants __constant__ value_t c_zero, c_two, c_half; __global__ void predictor(index_t Nx, index_t N...
1fddf82d690852ad20c715ef6904c8bf20b36757.cu
#include <chrono> #include "array2d.h" #include "cuda_helper.h" #include "ns2d.h" #define value_t double #define index_t int // constants __constant__ value_t c_zero, c_two, c_half; __global__ void predictor(index_t Nx, index_t Ny, value_t *u, value_t *v, value_t *p, ...
2688a0872f112b8e826f471dded80da854940803.hip
// !!! This is a file automatically generated by hipify!!! //Program to multiply square matrix with activation vector, both filled with random numbers, and then to multiply the resulting vector by the matrix again- repeat for the //specified number of iterations. #include <hip/hip_runtime.h> #include <rocblas.h> #inc...
2688a0872f112b8e826f471dded80da854940803.cu
//Program to multiply square matrix with activation vector, both filled with random numbers, and then to multiply the resulting vector by the matrix again- repeat for the //specified number of iterations. #include <cuda.h> #include <cublas_v2.h> #include <curand.h> #include <cstdlib> #include <iostream> using std::co...
77d50ad86abeb0e57d2131adb6213475c6fbcc2c.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "mat_ones_kernel.h" #define BLOCK_SIZE 32 __global__ void mat_ones_kernel(const float *__restrict__ src, float *__restrict__ dst, int m, int n) { int row = blockIdx.y * blockDim.y + threadIdx.y; int col = b...
77d50ad86abeb0e57d2131adb6213475c6fbcc2c.cu
#include "mat_ones_kernel.h" #define BLOCK_SIZE 32 __global__ void mat_ones_kernel(const float *__restrict__ src, float *__restrict__ dst, int m, int n) { int row = blockIdx.y * blockDim.y + threadIdx.y; int col = blockIdx.x * blockDim.x + threadIdx.x; if (row < m && col < n) { dst[row * n...
a379dbe091ae1d93e56dc84ea98b17cb2c99fc13.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" //#include <cutil.h> // cutil32.lib #include <string.h> #include "system_kern.cu" extern Particles_struct specie; extern "C" { int iDivUp (int a, int b) { return (a % b != 0) ? (a / b + 1) : (a / b); } void computeNumBloc...
a379dbe091ae1d93e56dc84ea98b17cb2c99fc13.cu
//#include <cutil.h> // cutil32.lib #include <string.h> #include "system_kern.cu" extern Particles_struct specie; extern "C" { int iDivUp (int a, int b) { return (a % b != 0) ? (a / b + 1) : (a / b); } void computeNumBlocks (int numPnts, int maxThreads, int &numBlocks, int &numThreads) { //numThreads = ...
ae7ce8f1e13e5a896d8d79b158ac6147a095eebb.hip
// !!! This is a file automatically generated by hipify!!! /******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/B...
ae7ce8f1e13e5a896d8d79b158ac6147a095eebb.cu
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
6c5cc2fba7c78a399edc6c0b43b0ee75968b2aa6.hip
// !!! This is a file automatically generated by hipify!!! #include "hip/hip_runtime.h" #include "includes.h" __global__ void ThirdAngle(int *a1, int *a2, int *a3) { *a3 = (180-*a1-*a2); }
6c5cc2fba7c78a399edc6c0b43b0ee75968b2aa6.cu
#include "includes.h" __global__ void ThirdAngle(int *a1, int *a2, int *a3) { *a3 = (180-*a1-*a2); }
c4bb06aefc4b50b5272b981ac6c84ec9a0088c10.hip
// !!! This is a file automatically generated by hipify!!! #include <Chain.h> #include <Config.h> #include <constants.h> #include <functions.h> #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> #include <unistd.h> __host__ void oneChain(Chain *host_a, Chain *dev_a, Config *cfg){ ++cfg->chainNum; if(cfg...
c4bb06aefc4b50b5272b981ac6c84ec9a0088c10.cu
#include <Chain.h> #include <Config.h> #include <constants.h> #include <functions.h> #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> #include <unistd.h> __host__ void oneChain(Chain *host_a, Chain *dev_a, Config *cfg){ ++cfg->chainNum; if(cfg->verbose) printf("\n Chain %d of %d.\n", cfg->chainNu...