hip_filename stringlengths 5 84 | hip_content stringlengths 79 9.69M | cuda_filename stringlengths 4 83 | cuda_content stringlengths 19 9.69M |
|---|---|---|---|
f7ee835f847d61b2b0ac07820cb0079fcb85e81e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <new>
struct Foo
{
int value = 0x1234;
};
__global__ void kernel(Foo* storage, Foo** initialized)
{
Foo* start = storage + threadIdx.x * 2;
initialized[threadIdx.x] = new (start) Foo[2];
}
| f7ee835f847d61b2b0ac07820cb0079fcb85e81e.cu | #include <new>
struct Foo
{
int value = 0x1234;
};
__global__ void kernel(Foo* storage, Foo** initialized)
{
Foo* start = storage + threadIdx.x * 2;
initialized[threadIdx.x] = new (start) Foo[2];
}
|
cc38b789800fcab6dce40a3aa7b547f7f83b326a.hip | // !!! This is a file automatically generated by hipify!!!
/*
*/
#include <stdio.h>
#include <hip/hip_runtime_api.h>
#include <time.h>
#include <math.h>
#include <float.h>
//#include <hip/hip_runtime.h>
#include "unimem.h"
#include "first.h"
//#define DEBUG_CUDA
#define MAX_RESULTS 100000
//#define PACK_RESULTS
str... | cc38b789800fcab6dce40a3aa7b547f7f83b326a.cu | /*
*/
#include <stdio.h>
#include <cuda_runtime_api.h>
#include <time.h>
#include <math.h>
#include <float.h>
//#include <cuda_runtime.h>
#include "unimem.h"
#include "first.h"
//#define DEBUG_CUDA
#define MAX_RESULTS 100000
//#define PACK_RESULTS
struct boundaries {
coord x_min;
coord y_min;
coord x_max;
coord... |
4cc09639a329baa9955e28b7457e8e0415d41ce0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//xfail:REPAIR_ERROR
//--blockDim=2048 --gridDim=64
struct s {
char *p;
};
__global__ void foo(s q) {
__requires_fresh_array(q.p);
q.p[0] = threadIdx.x;
}
| 4cc09639a329baa9955e28b7457e8e0415d41ce0.cu | //xfail:REPAIR_ERROR
//--blockDim=2048 --gridDim=64
struct s {
char *p;
};
__global__ void foo(s q) {
__requires_fresh_array(q.p);
q.p[0] = threadIdx.x;
}
|
461c923af4655dba995d1419b6b52fa964a4d9a0.hip | // !!! This is a file automatically generated by hipify!!!
#include "modcusp_library.h"
int cusp_biCGSTAB_solver::cusp_biCGSTAB_initDevice(indexType devID)
{
int deviceCount = 0;
hipError_t error_id = hipGetDeviceCount(&deviceCount);
if (error_id != hipSuccess)
{
printf("hipGetDeviceCount returned %d\n-> %... | 461c923af4655dba995d1419b6b52fa964a4d9a0.cu | #include "modcusp_library.h"
int cusp_biCGSTAB_solver::cusp_biCGSTAB_initDevice(indexType devID)
{
int deviceCount = 0;
cudaError_t error_id = cudaGetDeviceCount(&deviceCount);
if (error_id != cudaSuccess)
{
printf("cudaGetDeviceCount returned %d\n-> %s\n", (int)error_id, cudaGetErrorString(error_id));
... |
219ef7118e6c7c8ea2bf97e1b8fd3ac88f98a1e7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2016 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 ... | 219ef7118e6c7c8ea2bf97e1b8fd3ac88f98a1e7.cu | /* Copyright (c) 2016 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... |
014bf2351e3246f09b94ffb065f37c3cb1289a53.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <hip/hip_runtime.h>
#include <gdal_priv.h>
#include <cpl_conv.h>
#include "GDALRead.h"
#include "GDALWrite.h"
#include "basestruct.h"
#include "operator.h"
#include "timer.h"
#include "utils.h"
... | 014bf2351e3246f09b94ffb065f37c3cb1289a53.cu | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <cuda.h>
#include <gdal_priv.h>
#include <cpl_conv.h>
#include "GDALRead.h"
#include "GDALWrite.h"
#include "basestruct.h"
#include "operator.h"
#include "timer.h"
#include "utils.h"
#include <fstream>
#include <iostream>
#include <map>
#include <set>
#... |
6ae75442135d3a806523996550433f7c0d9705df.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright (c) 2020-2022, 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
... | 6ae75442135d3a806523996550433f7c0d9705df.cu | /*
* Copyright (c) 2020-2022, 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... |
4941d21e9cfedd5ecc93791e959fab25308eb46e.hip | // !!! This is a file automatically generated by hipify!!!
/*
* This CUDA-Cusparse code can handle/work with any type of the input mxArrays,
* GPUarray or standard matlab CPU array as input {prhs[0]/prhs[1] := mxGPUArray or CPU Array}[double/complex double]
* Sparse/Dense vector-sparse/dense vector dot product Z... | 4941d21e9cfedd5ecc93791e959fab25308eb46e.cu |
/*
* This CUDA-Cusparse code can handle/work with any type of the input mxArrays,
* GPUarray or standard matlab CPU array as input {prhs[0]/prhs[1] := mxGPUArray or CPU Array}[double/complex double]
* Sparse/Dense vector-sparse/dense vector dot product Z=CuMatlab_dot(Sparse/Dense(X),Sparse/Dense(Y)).
* Z= X.Y
... |
c27b07f2f8584f34330f03a03e96caa5f240a86e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <ATen/ATen.h>
#include "compat.cuh"
#include "utils.cuh"
#define THREADS 1024
template <typename scalar_t>
__global__ void nearest_kernel(const scalar_t *__restrict__ x,
const scalar_t *__r... | c27b07f2f8584f34330f03a03e96caa5f240a86e.cu | #include <ATen/ATen.h>
#include "compat.cuh"
#include "utils.cuh"
#define THREADS 1024
template <typename scalar_t>
__global__ void nearest_kernel(const scalar_t *__restrict__ x,
const scalar_t *__restrict__ y,
const int64_t *__restrict__ batch_x,
... |
0e7738e42e96b01952bed0440bff93f71102b235.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "common.h"
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <chrono>
using namespace std;
//Code used from examples and modified for activity
//Adrian Biller A01018940
//matrix multiplication with 1D
vo... | 0e7738e42e96b01952bed0440bff93f71102b235.cu | #include "common.h"
#include <cstdio>
#include <cstdlib>
#include <math.h>
#include <chrono>
using namespace std;
//Code used from examples and modified for activity
//Adrian Biller A01018940
//matrix multiplication with 1D
void initialData(int *ip, const int size)
{
int i;
for(i = 0; i < size; i++)
... |
d61c4518f2f88db0d4fdd3ade617b0adf9bc8669.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/***************************************************************************
*cr
*cr (C) Copyright 2007 The Board of Trustees of the
*cr University of Illinois
*cr All Ri... | d61c4518f2f88db0d4fdd3ade617b0adf9bc8669.cu | /***************************************************************************
*cr
*cr (C) Copyright 2007 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
********************************************************************... |
91808057da1ace747978d3d5db9d4cb7d5f6ef9e.hip | // !!! This is a file automatically generated by hipify!!!
// Includes
#include <stdio.h>
#include <stdlib.h>
// includes from project
// includes from CUDA
#include <hip/hip_runtime.h>
//#include <helper_math.h>
#define THREADS_PER_BLOCK 256
#define NUM_OF_BLOCKS 640
// Variables
unsigned* h_A;
unsigned* h_B;
uns... | 91808057da1ace747978d3d5db9d4cb7d5f6ef9e.cu | // Includes
#include <stdio.h>
#include <stdlib.h>
// includes from project
// includes from CUDA
#include <cuda_runtime.h>
//#include <helper_math.h>
#define THREADS_PER_BLOCK 256
#define NUM_OF_BLOCKS 640
// Variables
unsigned* h_A;
unsigned* h_B;
unsigned* h_C;
unsigned* d_A;
unsigned* d_B;
unsigned* d_C;
// F... |
8fdc5b260ae0d546a5cb68758c87a836e5912391.hip | // !!! This is a file automatically generated by hipify!!!
#include "reduce.hpp"
#include "checkCudaErrors.hpp"
#include "cudaMemory.hpp"
#include "functions.hpp"
#include <hip/hip_runtime.h>
#include <thrust/reduce.h>
#include <thrust/extrema.h>
#include <thrust/functional.h>
#include <thrust/execution_policy.h>
#i... | 8fdc5b260ae0d546a5cb68758c87a836e5912391.cu | #include "reduce.hpp"
#include "checkCudaErrors.hpp"
#include "cudaMemory.hpp"
#include "functions.hpp"
#include <cuda.h>
#include <thrust/reduce.h>
#include <thrust/extrema.h>
#include <thrust/functional.h>
#include <thrust/execution_policy.h>
#include <stdexcept>
#include <string>
#include <limits>
#include <utili... |
ab86ab453116818f1b87aa9af1e6859e9e6e16ef.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdlib.h>
#include <stdio.h>
__global__ void read_mem(char* state){
*state = threadIdx.x + blockIdx.x * blockDim.x + 0xffffffff;
//for(int i=0; i<1; i++){
//printf("%x\n", *((char *)0x6048a0000));
... | ab86ab453116818f1b87aa9af1e6859e9e6e16ef.cu | #include <stdlib.h>
#include <stdio.h>
__global__ void read_mem(char* state){
*state = threadIdx.x + blockIdx.x * blockDim.x + 0xffffffff;
//for(int i=0; i<1; i++){
//printf("%x\n", *((char *)0x6048a0000));
//printf("%x\n", *((char *)0x6048a1000));
printf("%p\n", state);
if((long)st... |
8e2813b0775981dbc06d9c9597dc1943caf549dd.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <iostream>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <cassert>
#include <utils.h>
using std::vector;
__device__ __host__
int f(int i) {
return i*i;
}
__global__
void kernel(int* out) {
out[t... | 8e2813b0775981dbc06d9c9597dc1943caf549dd.cu | #include <iostream>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <cassert>
#include <utils.h>
using std::vector;
__device__ __host__
int f(int i) {
return i*i;
}
__global__
void kernel(int* out) {
out[threadIdx.x] = f(threadIdx.x);
}
int main(int argc, const char** argv) {
int N = 32;... |
fb2e05abfacfcfae923dea7e6dc83a9a94087d24.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Suma de matrices por hilos */
#include <ctime>
#include <iostream>
#include <time.h>
#include <math.h>
#define N 90000000
using namespace std;
void generateRandom(int *h_a);
void parallelAddition();
void serialAddition();
// ... | fb2e05abfacfcfae923dea7e6dc83a9a94087d24.cu | /* Suma de matrices por hilos */
#include <ctime>
#include <iostream>
#include <time.h>
#include <math.h>
#define N 90000000
using namespace std;
void generateRandom(int *h_a);
void parallelAddition();
void serialAddition();
// en el host "h_"
// en device "d_"
int *h_a, *h_b, *h_c, *serialC;
int *d_a, *d_b, *d_c;
... |
aadeb13f7f58f23c3c84d9c3922929f61932e7b7.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of t... | aadeb13f7f58f23c3c84d9c3922929f61932e7b7.cu | // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
e78fe7e571c596ee007a8dac53a75198b9c9e7ea.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License a... | e78fe7e571c596ee007a8dac53a75198b9c9e7ea.cu | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... |
f8f69e6b612822d24c3f1e937f5006cf985bba54.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... | f8f69e6b612822d24c3f1e937f5006cf985bba54.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... |
79c4889658b9042ea69e9c91f90fa97dfb9dfbea.hip | // !!! This is a file automatically generated by hipify!!!
/* Copyright 2019 The Microsoft DeepSpeed Team */
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <cmath>
#include "ATen/ATen.h"
#include "ATen/TensorUtils.h"
#include "ATen/hip/HIPContext.h"
#include "ATen/hip/detail/Index... | 79c4889658b9042ea69e9c91f90fa97dfb9dfbea.cu | /* Copyright 2019 The Microsoft DeepSpeed Team */
#include <cuda.h>
#include <cuda_runtime.h>
#include <stdio.h>
#include <cmath>
#include "ATen/ATen.h"
#include "ATen/TensorUtils.h"
#include "ATen/cuda/CUDAContext.h"
#include "ATen/cuda/detail/IndexUtils.cuh"
// #include "ATen/Type.h"
#include "ATen/AccumulateType.h"
... |
833f21f007d2b0031833f2e95926c2b9802afaac.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <math.h>
#include "../headers/graph.h"
#define THREADS_PER_BLOCK_X 32
#define THREADS_PER_BLOCK_Y 32
#define MAX_THREADS_PER_BLOCK 1024
#define MAX... | 833f21f007d2b0031833f2e95926c2b9802afaac.cu | #include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <math.h>
#include "../headers/graph.h"
#define THREADS_PER_BLOCK_X 32
#define THREADS_PER_BLOCK_Y 32
#define MAX_THREADS_PER_BLOCK 1024
#define MAX_SHARED_MEM_PER_BLOCK 1024
#define S_MATRIX_SIZE 32
#define AFW_CONST 1
#define BFW_CONS... |
baf2e10eadd55a70d2d3fd671b3ab18c918cab2b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you... | baf2e10eadd55a70d2d3fd671b3ab18c918cab2b.cu | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
db716e25baee96678654bbd84de336fff7c4a8b0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Date: 15-12-2016
Author: Omer Anjum
Description:
RK integration 55-Point
Comments:
Omer Anjum: Changed the 19-point RK integration Kernel to 55-Point integration Kernel without changing the requirements of shared mem... | db716e25baee96678654bbd84de336fff7c4a8b0.cu |
/* Date: 15-12-2016
Author: Omer Anjum
Description:
RK integration 55-Point
Comments:
Omer Anjum: Changed the 19-point RK integration Kernel to 55-Point integration Kernel without changing the requirements of shared memory and simultaneously reducing the global memory traffic. The technique applied to achi... |
97dda833a70a14207338f9a9cf0ca58edbf900a6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hetu_gpu_table.h"
#include "common/helper_cuda.h"
using namespace hetuCTR;
unsigned long hetuCTR::__seed = 0;
void HetuTable::pushPull(embed_t *grad, embed_t *dst) {
checkCudaErrors(hipSetDevice(device_id_));
// If no grad is provided, than t... | 97dda833a70a14207338f9a9cf0ca58edbf900a6.cu | #include "hetu_gpu_table.h"
#include "common/helper_cuda.h"
using namespace hetuCTR;
unsigned long hetuCTR::__seed = 0;
void HetuTable::pushPull(embed_t *grad, embed_t *dst) {
checkCudaErrors(cudaSetDevice(device_id_));
// If no grad is provided, than this batch is considered as inference batch.
// Set shape... |
765937d4b217e76958eb0359ea9cf9276e7789e3.hip | // !!! This is a file automatically generated by hipify!!!
//
// Copyright (c) 2010-2015, Raymond Tay, Singapore
// 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 o... | 765937d4b217e76958eb0359ea9cf9276e7789e3.cu | //
// Copyright (c) 2010-2015, Raymond Tay, Singapore
// 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
// noti... |
16439f3341324da040a072d4a84679c2913b364a.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <hipfft.h>
#include "helper_cuda.hpp"
#include "cu_image.hpp"
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
// The images contained are padded.
// fullSquareSize is with overlap, but wit... | 16439f3341324da040a072d4a84679c2913b364a.cu | #include <cufft.h>
#include "helper_cuda.hpp"
#include "cu_image.hpp"
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
// The images contained are padded.
// fullSquareSize is with overlap, but without padding.
// Actual image sizes are pitch by pitch, which includes half zeros along e... |
544efb54c6b9ec412f0738113455307ca955c8f8.hip | // !!! This is a file automatically generated by hipify!!!
//
// Created by Jacob Austin on 5/17/18.
//
#define GLM_FORCE_PURE
#include "mass.h"
Mass::Mass() {
m = 1.0;
dt = 0.0001;
damping = 1.0;
extduration = 0;
force = Vec(0., 0., 0.);
extforce = Vec(0., 0., 0.);
maxforce = Vec(0, 0, 0);... | 544efb54c6b9ec412f0738113455307ca955c8f8.cu | //
// Created by Jacob Austin on 5/17/18.
//
#define GLM_FORCE_PURE
#include "mass.h"
Mass::Mass() {
m = 1.0;
dt = 0.0001;
damping = 1.0;
extduration = 0;
force = Vec(0., 0., 0.);
extforce = Vec(0., 0., 0.);
maxforce = Vec(0, 0, 0);
T = 0;
density = 1.0;
valid = true;
arrayp... |
b0554e08765aa6c0d0e4255d96d50dac88c4f95d.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduction, disclosure, ... | b0554e08765aa6c0d0e4255d96d50dac88c4f95d.cu | /*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduction, disclosure, or distribution of this software
* and related documentat... |
146a94b3c6a4a3f6e326f8f154aa844f8e59af5c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License,... | 146a94b3c6a4a3f6e326f8f154aa844f8e59af5c.cu | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
a4b56bfeac2f1769ef3a48db877116788598640f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
This program generates 2 N*N matrices and then multiplies them on a GPU
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<cuda.h>
#include<unistd.h>
//#define N 100
__global__ void multiply(float* A, float* B, ... | a4b56bfeac2f1769ef3a48db877116788598640f.cu | /*
This program generates 2 N*N matrices and then multiplies them on a GPU
*/
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<cuda.h>
#include<unistd.h>
//#define N 100
__global__ void multiply(float* A, float* B, float* C, int K)
{
/*
The Kernel is a 2D grid. Tried doing the same with a 1D grid but... |
2da82949d586d64dfc721dc057547c7a086c081c.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <torch/types.h>
#include <hipsparse.h>
#define checkCudaError( a ) do { \
if (hipSuccess != (a)) { \
fprintf(stderr, "Cuda runTime error in line %d of file %s \
: %s \n", __LINE__, __FILE__, hipGetErrorString(h... | 2da82949d586d64dfc721dc057547c7a086c081c.cu | #include <cuda.h>
#include <torch/types.h>
#include <cusparse.h>
#define checkCudaError( a ) do { \
if (cudaSuccess != (a)) { \
fprintf(stderr, "Cuda runTime error in line %d of file %s \
: %s \n", __LINE__, __FILE__, cudaGetErrorString(cudaGetLastError()) ); \
exit(EXIT_FAILURE); \
} \
} while(0)
... |
9e9b1db41c5f619dee05cfbab802d2e274044add.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
__global__ void cube(float * d_out, float * d_in){
// Todo: Fill in this function
int x = threadIdx.x;
float f = d_in[x];
d_out[x] = f*f*f;
}
int main(int argc, char ** argv) {
const int ARRAY_SIZE = 64;
c... | 9e9b1db41c5f619dee05cfbab802d2e274044add.cu | #include <stdio.h>
__global__ void cube(float * d_out, float * d_in){
// Todo: Fill in this function
int x = threadIdx.x;
float f = d_in[x];
d_out[x] = f*f*f;
}
int main(int argc, char ** argv) {
const int ARRAY_SIZE = 64;
const int ARRAY_BYTES = ARRAY_SIZE * sizeof(float);
// generate the input array on the ... |
coalesced4.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void coalesced4(float *A, float *C, const int N)
{
int i = (blockIdx.x * blockDim.x + threadIdx.x)*4;
if (i+3 < N) { C[i] = A[i]; C[i+1] = A[i+1];
C[i+2] = A[i+2]; C[i+3] = A[i+3];}
} | coalesced4.cu | #include "includes.h"
__global__ void coalesced4(float *A, float *C, const int N)
{
int i = (blockIdx.x * blockDim.x + threadIdx.x)*4;
if (i+3 < N) { C[i] = A[i]; C[i+1] = A[i+1];
C[i+2] = A[i+2]; C[i+3] = A[i+3];}
} |
13962ea580b5fd501198c5dca27cf0e36965422d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include<stdio.h>
//#include<gl/glew.h>
#include"glew.h"
#include<gl/GL.h>
#include"vmath.h"
#include"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include\cuda.h"
#include"C:\Program Files\NVIDIA GPU Computing Toolkit\CU... | 13962ea580b5fd501198c5dca27cf0e36965422d.cu | #include<stdio.h>
//#include<gl/glew.h>
#include"glew.h"
#include<gl/GL.h>
#include"vmath.h"
#include"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include\cuda.h"
#include"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include\cuda_runtime.h"
#include"C:\Program Files\NVIDIA GPU Computing Toolkit\... |
aad95623ed8b65bde4b0aac86eecfed6bff5c481.hip | // !!! This is a file automatically generated by hipify!!!
// 3D Bouyant Ball viscous code
// nvcc -arch=sm_70 -O3 visBouy_accel_3d.cu
// run: ./a.out
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "hip/hip_runtime.h"
#define USE_SINGLE_PRECISION /* Comment this line using "//" if you want to use... | aad95623ed8b65bde4b0aac86eecfed6bff5c481.cu | // 3D Bouyant Ball viscous code
// nvcc -arch=sm_70 -O3 visBouy_accel_3d.cu
// run: ./a.out
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "cuda.h"
#define USE_SINGLE_PRECISION /* Comment this line using "//" if you want to use double precision. */
#ifdef USE_SINGLE_PRECISION
#define DAT flo... |
c2bd70fce78eb5050c45b81d6cd014ba5b78bd89.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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
... | c2bd70fce78eb5050c45b81d6cd014ba5b78bd89.cu | /**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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... |
95baa823f97672b1ef43609a465be6d0dcf7e62a.hip | // !!! This is a file automatically generated by hipify!!!
#include <sys/types.h>
#include <math.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <jansson.h>
#include <sys/time.h>
#include "point.h"
#include "kmeans.h"
#include "config.h"
int NUMBER_OF_POINTS = 100000;
int ... | 95baa823f97672b1ef43609a465be6d0dcf7e62a.cu | #include <sys/types.h>
#include <math.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <jansson.h>
#include <sys/time.h>
#include "point.h"
#include "kmeans.h"
#include "config.h"
int NUMBER_OF_POINTS = 100000;
int NUMBER_OF_CENTROIDS = 10;
/**
* 打印聚类信息
*/
void printCentr... |
d0e088242e0f0379df68d34610fc7391febce62d.hip | // !!! This is a file automatically generated by hipify!!!
#include <unittest/testframework.h>
#include <unittest/cuda/testframework.h>
#include <thrust/system/hip/memory.h>
#include <hip/hip_runtime.h>
#include <numeric>
__global__ void dummy_kernel() {}
bool binary_exists_for_current_device()
{
// check against t... | d0e088242e0f0379df68d34610fc7391febce62d.cu | #include <unittest/testframework.h>
#include <unittest/cuda/testframework.h>
#include <thrust/system/cuda/memory.h>
#include <cuda_runtime.h>
#include <numeric>
__global__ void dummy_kernel() {}
bool binary_exists_for_current_device()
{
// check against the dummy_kernel
// if we're unable to get the attributes, t... |
28869aadfdc54ab193373942d7698b7ddff0255d.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__device__ bool checkBoundary(int blockIdx, int blockDim, int threadIdx){
int x = threadIdx;
int y = blockIdx;
return (x == 0 || x == (blockDim-1) || y == 0 || y == 479);
}
__global__ void mGradient_TwoDim(floa... | 28869aadfdc54ab193373942d7698b7ddff0255d.cu | #include "includes.h"
__device__ bool checkBoundary(int blockIdx, int blockDim, int threadIdx){
int x = threadIdx;
int y = blockIdx;
return (x == 0 || x == (blockDim-1) || y == 0 || y == 479);
}
__global__ void mGradient_TwoDim(float *u_dimX, float *u_dimY, float *scalar, float coeffX, float coeffY) {
if(checkBoundary(... |
a7f1ea528f6bff9874689e2298d3aa35023bed55.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdlib.h>
#include <sys/time.h>
#include<stdio.h>
#include<cuda.h>
#include<math.h>
#define SQRT_TWO_PI 2.506628274631000
#define BLOCK_D1 1024
#define BLOCK_D2 1
#define BLOCK_D3 1
// Note: Needs compute capability >= 2... | a7f1ea528f6bff9874689e2298d3aa35023bed55.cu | #include <stdlib.h>
#include <sys/time.h>
#include<stdio.h>
#include<cuda.h>
#include<math.h>
#define SQRT_TWO_PI 2.506628274631000
#define BLOCK_D1 1024
#define BLOCK_D2 1
#define BLOCK_D3 1
// Note: Needs compute capability >= 2.0 for calculation with doubles, so compile with:
// nvcc kernelExample-pinned.cu -arch=... |
a227a11e3846afcb1e250d120611a025a7b2507c.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <malloc.h>
#include <hip/hip_runtime.h>
#define SIZE_thread 1024
__global__ void VectorAdd(int *A, int *B, int *C,int n)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i<n)
C[i]=A[i]+B[i];
}
int main()
{
int n = 3000;
... | a227a11e3846afcb1e250d120611a025a7b2507c.cu | #include <stdio.h>
#include <malloc.h>
#include <cuda.h>
#define SIZE_thread 1024
__global__ void VectorAdd(int *A, int *B, int *C,int n)
{
int i = threadIdx.x + blockIdx.x*blockDim.x;
if(i<n)
C[i]=A[i]+B[i];
}
int main()
{
int n = 3000;
clock_t start = clock();
int *a, *b, *c;
int *d_a, *d_b, *d_c;
a... |
d70bcfbd0c3e39e7adc7cd147cae3526a623ba25.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
// Print device properties
void printDevProp(hipDeviceProp_t devProp)
{
printf("Major revision number: %d\n", devProp.major);
printf("Minor revision number: %d\n", devProp.minor);
printf("Name: ... | d70bcfbd0c3e39e7adc7cd147cae3526a623ba25.cu | #include <stdio.h>
// Print device properties
void printDevProp(cudaDeviceProp devProp)
{
printf("Major revision number: %d\n", devProp.major);
printf("Minor revision number: %d\n", devProp.minor);
printf("Name: %s\n", devProp.name);
printf("Total global memo... |
0a401cb91a78da6656f36d2c5d287bb4a1a0b5eb.hip | // !!! This is a file automatically generated by hipify!!!
// the GPU code can be found in power_gpu.cu
// jiabing jin, sept 2017
////////////////////////////////////////////
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "hip/hip_runtime.h"
const int BLOCK... | 0a401cb91a78da6656f36d2c5d287bb4a1a0b5eb.cu | // the GPU code can be found in power_gpu.cu
// jiabing jin, sept 2017
////////////////////////////////////////////
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "cuda.h"
const int BLOCK_SIZE =256;
// #include "power_gpu.cu"
// Input Array Variables
float... |
0d9463ad31afcdb54bdfd822b6aac688e23e2589.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
extern "C"
__global__ void kMul(double* a, double* b, double* dest, int n) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if(idx<n) {
dest[idx] = a[idx] * b[idx];
}
}
extern "C"
__global__ void kFillArray(double* a, ... | 0d9463ad31afcdb54bdfd822b6aac688e23e2589.cu | extern "C"
__global__ void kMul(double* a, double* b, double* dest, int n) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if(idx<n) {
dest[idx] = a[idx] * b[idx];
}
}
extern "C"
__global__ void kFillArray(double* a, int m, double* dest, int n) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if(id... |
fdbc6ec8e7ac511e49071d3b5171d173b41e29a9.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/**
* @file depth_convert.cu
* @copyright Copyright (c) 2020 University of Turku, MIT License
* @author Nicolas Pope
*/
#include <ftl/codecs/depth_convert_cuda.hpp>
#include "../Utils/ColorSpace.h"
#include <opencv2/core/cuda_s... | fdbc6ec8e7ac511e49071d3b5171d173b41e29a9.cu | /**
* @file depth_convert.cu
* @copyright Copyright (c) 2020 University of Turku, MIT License
* @author Nicolas Pope
*/
#include <ftl/codecs/depth_convert_cuda.hpp>
#include "../Utils/ColorSpace.h"
#include <opencv2/core/cuda_stream_accessor.hpp>
// Encoding
__device__ inline float clamp(float v) {
return max(0... |
d952bbd3ac7e955b7b498442dcd0b8ad2719e1c2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <bits/stdc++.h>
#include <mpi.h>
#include <omp.h>
using namespace std;
#define CSC(call) \
do { \
hipError_t res = call; \
if (res != hipSuc... | d952bbd3ac7e955b7b498442dcd0b8ad2719e1c2.cu | #include <bits/stdc++.h>
#include <mpi.h>
#include <omp.h>
using namespace std;
#define CSC(call) \
do { \
cudaError_t res = call; \
if (res != cudaSuccess) { \
fprintf(stderr, "ERROR in %s:%d. Message: %s\n", ... |
c4b6d6dbbc33199a071c98c40179c6846ef5b297.hip | // !!! This is a file automatically generated by hipify!!!
#include <processing.h>
#include <hip/hip_runtime.h>
#include <stdio.h>
using namespace std;
__global__
void gaussianKernel(int *original, int width, int height, int *imgblur){
int id = threadIdx.x + blockDim.x * blockIdx.x;
// Declaraciones
unsigned int ... | c4b6d6dbbc33199a071c98c40179c6846ef5b297.cu | #include <processing.h>
#include <cuda.h>
#include <stdio.h>
using namespace std;
__global__
void gaussianKernel(int *original, int width, int height, int *imgblur){
int id = threadIdx.x + blockDim.x * blockIdx.x;
// Declaraciones
unsigned int blurpixel;
signed int dx, dy;
unsigned int pixelweight;
unsigned in... |
9e2f5f7ea1e75fb71ae5d0e97ebcbe53a79456fe.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* Copyright 2019 Xilinx Inc.
*
* 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.apac... | 9e2f5f7ea1e75fb71ae5d0e97ebcbe53a79456fe.cu | /*
* Copyright 2019 Xilinx Inc.
*
* 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 writin... |
c48a2c58afb874a057f273b2d418ccfc3bf02110.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 "Matrix_getRow_FloatId_naive.cu"
#include<chrono>
#include<iostre... | c48a2c58afb874a057f273b2d418ccfc3bf02110.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 "Matrix_getRow_FloatId_naive.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,... |
34966c1dbca28f3357213f0f6fbd3202ecd34ed3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest.h>
#include <heteroflow/heteroflow.hpp>
// ----------------------------------------------------------------------------
// Parameters
// --------------------------------... | 34966c1dbca28f3357213f0f6fbd3202ecd34ed3.cu | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest.h>
#include <heteroflow/heteroflow.hpp>
// ----------------------------------------------------------------------------
// Parameters
// ----------------------------------------------------------------------------
const size_t C = std::min(16u, std::thread:... |
d72ef79354ca93943db1d4a157616c955ad96f23.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2020-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... | d72ef79354ca93943db1d4a157616c955ad96f23.cu | /*
* Copyright (c) 2020-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... |
44ddd5d51c3443070f7396fb1aa952dc2221dfb8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 1.6.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2015
@precisions normal z -> s d c
*/
#include "common_magm... | 44ddd5d51c3443070f7396fb1aa952dc2221dfb8.cu | /*
-- MAGMA (version 1.6.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2015
@precisions normal z -> s d c
*/
#include "common_magma.h"
#include "commonblas_z.h"
#define PRECISION_z
// 512 is maximum number of threads... |
20b772f140511214790a447a69a7c2686760cef8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void thresholdSIMD(unsigned int *data, unsigned int threshold)
{
int thread = (gridDim.x * blockIdx.y + blockIdx.x) * blockDim.x + threadIdx.x;
unsigned int *ptr = data + thread;
*ptr = __vcmpgeu4(*... | 20b772f140511214790a447a69a7c2686760cef8.cu | #include "includes.h"
__global__ void thresholdSIMD(unsigned int *data, unsigned int threshold)
{
int thread = (gridDim.x * blockIdx.y + blockIdx.x) * blockDim.x + threadIdx.x;
unsigned int *ptr = data + thread;
*ptr = __vcmpgeu4(*ptr, threshold);
} |
17a839a889df9d6d6fd51cad8c287bccb0996cc9.hip | // !!! This is a file automatically generated by hipify!!!
//
// Created by root on 2020/11/19.
//
#include "stdio.h"
#include <hip/hip_runtime.h>
#define DIM 128
__global__ void reduceGmem(int *g_idata, int *g_odata, int n) {
int tid = threadIdx.x;
int *idata = g_idata + blockIdx.x * blockDim.x;
int id... | 17a839a889df9d6d6fd51cad8c287bccb0996cc9.cu | //
// Created by root on 2020/11/19.
//
#include "stdio.h"
#include <cuda_runtime.h>
#define DIM 128
__global__ void reduceGmem(int *g_idata, int *g_odata, int n) {
int tid = threadIdx.x;
int *idata = g_idata + blockIdx.x * blockDim.x;
int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx >= n) ... |
edb573150d9e5afd1e5562ae0a27905de5ceef6f.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
///
/// Copyright (c) 2013, Intel Corporation
///
/// Redistribution and use in source and binary forms, with or without
/// modification, are permitted provided that the following conditions
/// are met:
///
/// * Redistributions ... | edb573150d9e5afd1e5562ae0a27905de5ceef6f.cu |
///
/// Copyright (c) 2013, Intel Corporation
///
/// Redistribution and use in source and binary forms, with or without
/// modification, are permitted provided that the following conditions
/// are met:
///
/// * Redistributions of source code must retain the above copyright
/// notice, this list of conditions... |
9bfee8acd69cf25ca38585d9d81622d3d70a5144.hip | // !!! This is a file automatically generated by hipify!!!
#include "cuElectron.h"
#include "Electron.h"
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include "Constants.h"
void /*cuElectron::*/cuMalloc(void **cuElectrons, int memSize)
{
hipMalloc(cuElectrons, memSize);
}
extern "C" __glob... | 9bfee8acd69cf25ca38585d9d81622d3d70a5144.cu | #include "cuElectron.h"
#include "Electron.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include "Constants.h"
void /*cuElectron::*/cuMalloc(void **cuElectrons, int memSize)
{
cudaMalloc(cuElectrons, memSize);
}
extern "C" __global__ void pole_cuda(TPL_Point *cuElectrons, int b1, int e1, f... |
284ecd09a0be83cdfa34658735438a7130fddd27.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
Rashid Hafez
*/
#include "ISplit.h"
dim3 GRID;
dim3 BLOCK;
static hipDeviceProp_t PROPS;
/******************************
Increment Kernel
*******************************/
__global__ void Incr(float * vec, float* cc, unsign... | 284ecd09a0be83cdfa34658735438a7130fddd27.cu | /*
Rashid Hafez
*/
#include "ISplit.h"
dim3 GRID;
dim3 BLOCK;
static cudaDeviceProp PROPS;
/******************************
Increment Kernel
*******************************/
__global__ void Incr(float * vec, float* cc, unsigned long n, unsigned long long it){
long long x = (long long)threadIdx.x + (long long)blo... |
254c976cdeae24fe84cae3e781b25937d1ae0a55.hip | // !!! This is a file automatically generated by hipify!!!
// ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Winter Semester 2013/2014, March 3 - April 4
// ###
// ###
// ### Evgeny Strekalovskiy, Maria Klodt, Jan Stu... | 254c976cdeae24fe84cae3e781b25937d1ae0a55.cu | // ###
// ###
// ### Practical Course: GPU Programming in Computer Vision
// ###
// ###
// ### Technical University Munich, Computer Vision Group
// ### Winter Semester 2013/2014, March 3 - April 4
// ###
// ###
// ### Evgeny Strekalovskiy, Maria Klodt, Jan Stuehmer, Mohamed Souiai
// ###
// ###
// ###
// ###
// ###... |
625a773e5283b529c895b4339ff0f7d58d35b667.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Julian Gutierrez
* Northeastern University
* High Performance Computing
*
* Sobel Algorithm Implementation
*
*/
#include "sobel.h"
/*******************************************************/
/* Cuda Err... | 625a773e5283b529c895b4339ff0f7d58d35b667.cu | /* Julian Gutierrez
* Northeastern University
* High Performance Computing
*
* Sobel Algorithm Implementation
*
*/
#include "sobel.h"
/*******************************************************/
/* Cuda Error Function */
/*******************************************************/... |
4bde7a0af5ed0c0a31fcda016f9d326e1a21d29f.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <hip/hip_runtime.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 = ... | 4bde7a0af5ed0c0a31fcda016f9d326e1a21d29f.cu | #include <stdio.h>
#include <cuda_runtime.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... |
61e26596c7b9f329b8375e4cea5adba211c4e31e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/io.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/layers/split_channel_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void split... | 61e26596c7b9f329b8375e4cea5adba211c4e31e.cu | #include <vector>
#include "caffe/layer.hpp"
#include "caffe/util/io.hpp"
#include "caffe/util/math_functions.hpp"
#include "caffe/layers/split_channel_layer.hpp"
namespace caffe {
template <typename Dtype>
__global__ void split_data_forward_gpu_kernel(const int num, const Dtype* const bottom, Dtype * const top,
... |
719e01cf6497587bb53107405c5db58eb0995407.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2019-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.o... | 719e01cf6497587bb53107405c5db58eb0995407.cu | /*
* Copyright (c) 2019-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... |
6870785f74022002551157d2fa8b201096f66d6e.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
-- MAGMA (version 2.4.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date June 2018
@generated from magmablas/zgerbt_func_batched.cu, normal z ... | 6870785f74022002551157d2fa8b201096f66d6e.cu | /*
-- MAGMA (version 2.4.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date June 2018
@generated from magmablas/zgerbt_func_batched.cu, normal z -> c, Mon Jun 25 18:24:14 2018
@author Adrien Remy
@author Azzam Haidar
*... |
3280c6c99b708607c258ff1dfc05bce4f843dcc2.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 "prova3.cu"
#include<chrono>
#include<iostream>
using namespace s... | 3280c6c99b708607c258ff1dfc05bce4f843dcc2.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 "prova3.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{3... |
52decd200daf0dc6ee60ad09d6c0321b947f3f9a.hip | // !!! This is a file automatically generated by hipify!!!
//blackScholesAnalyticEngine.cu
//Scott Grauer-Gray
//Functions for running black scholes using the analytic engine (from Quantlib) on the GPU
//needed for optionInputStruct
#include "blackScholesAnalyticEngineStructs.cuh"
//needed for the kernel(s) to run on... | 52decd200daf0dc6ee60ad09d6c0321b947f3f9a.cu | //blackScholesAnalyticEngine.cu
//Scott Grauer-Gray
//Functions for running black scholes using the analytic engine (from Quantlib) on the GPU
//needed for optionInputStruct
#include "blackScholesAnalyticEngineStructs.cuh"
//needed for the kernel(s) to run on the GPU
#include "blackScholesAnalyticEngineKernels.cu"
#... |
6e70bf3924a1b061d4986fbbe275f94c8f7aa806.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
* Modified by Shuai Che
*****************************... | 6e70bf3924a1b061d4986fbbe275f94c8f7aa806.cu | /*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
* Modified by Shuai Che
******************************************************************
*/
#include <stdio.h>
#include <stdlib.h>
#incl... |
41c92e558edccc1d0962027032161aace0f18733.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
hipDeviceProp_t prop;
hipError_t cudaStatus;
int count;
cudaStatus = hipGetDeviceCount( &count );
if (... | 41c92e558edccc1d0962027032161aace0f18733.cu |
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
cudaDeviceProp prop;
cudaError_t cudaStatus;
int count;
cudaStatus = cudaGetDeviceCount( &count );
if (cudaStatus != cudaSuccess)
{
cout << "cudaMalloc failed!" ... |
cd5926d276cec53a3fa2642312b0c572b051786d.hip | // !!! This is a file automatically generated by hipify!!!
#include <iostream>
#include "../CPU/linear.h"
#include "../CPU/relu.h"
#include "../CPU/train.h"
#include "../GPU/linear.h"
#include "../GPU/relu.h"
#include "../GPU/train.h"
#include "../utils/utils.h"
int main(){
int bs, n_in, n_hidden, n_epochs;
... | cd5926d276cec53a3fa2642312b0c572b051786d.cu | #include <iostream>
#include "../CPU/linear.h"
#include "../CPU/relu.h"
#include "../CPU/train.h"
#include "../GPU/linear.h"
#include "../GPU/relu.h"
#include "../GPU/train.h"
#include "../utils/utils.h"
int main(){
int bs, n_in, n_hidden, n_epochs;
int sz_inp, sz_weights1, sz_hidden;
float *inp_cpu, *ou... |
06bbcd81c1b435562efe3331589f02486e7c23a0.hip | // !!! This is a file automatically generated by hipify!!!
/**
Genetic algorithm for finding function aproximation. GPU accelerated version
Given data points {x, f(x)+noise} generated by noisy polynomial function
f(x) = c4*x^3 + c3*x^2 + c2*x + c1,
find unknown parameters c1, c2, c3 and c4.
Inputs:
The set of poin... | 06bbcd81c1b435562efe3331589f02486e7c23a0.cu | /**
Genetic algorithm for finding function aproximation. GPU accelerated version
Given data points {x, f(x)+noise} generated by noisy polynomial function
f(x) = c4*x^3 + c3*x^2 + c2*x + c1,
find unknown parameters c1, c2, c3 and c4.
Inputs:
• The set of points on a surface (500–1000);
• The size of population P (10... |
e7366b9f28b558a0f96062cdeae7a40fa2b69f5a.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include "hip/hip_runtime.h"
#include "device_launch_parameters.h"
#include <list>
using namespace std;
hipError_t addWithCuda(int* c, const int* a, const int* b, unsigned int size);
__global__ void addKernel(int* c, const int* a, const in... | e7366b9f28b558a0f96062cdeae7a40fa2b69f5a.cu | #include <stdio.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <list>
using namespace std;
cudaError_t addWithCuda(int* c, const int* a, const int* b, unsigned int size);
__global__ void addKernel(int* c, const int* a, const int* b)
{
int i = threadIdx.x;
c[i] = a[i] + b[i];
}
... |
abb5c891649a893dadf77f31d9e23adfdc9673a0.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// Copyright (c) 2009-2023 The Regents of the University of Michigan.
// Part of HOOMD-blue, released under the BSD 3-Clause License.
#include "ParticleData.cuh"
/*! \file ParticleData.cu
\brief ImplementsGPU kernel code and d... | abb5c891649a893dadf77f31d9e23adfdc9673a0.cu | // Copyright (c) 2009-2023 The Regents of the University of Michigan.
// Part of HOOMD-blue, released under the BSD 3-Clause License.
#include "ParticleData.cuh"
/*! \file ParticleData.cu
\brief ImplementsGPU kernel code and data structure functions used by ParticleData
*/
#ifdef ENABLE_MPI
#pragma GCC diagnost... |
9d12e0a9ffc3132afb28aacfd662597f3444cde9.hip | // !!! This is a file automatically generated by hipify!!!
#include <nvgraph_gdf.h>
#include <thrust/device_vector.h>
#include <ctime>
#include "utilities/error_utils.h"
//RMM:
//
#include <rmm_utils.h>
template<typename T>
using Vector = thrust::device_vector<T, rmm_allocator<T>>;
gdf_error nvgraph2gdf_error(nv... | 9d12e0a9ffc3132afb28aacfd662597f3444cde9.cu | #include <nvgraph_gdf.h>
#include <thrust/device_vector.h>
#include <ctime>
#include "utilities/error_utils.h"
//RMM:
//
#include <rmm_utils.h>
template<typename T>
using Vector = thrust::device_vector<T, rmm_allocator<T>>;
gdf_error nvgraph2gdf_error(nvgraphStatus_t nvg_stat)
{
switch (nvg_stat) {
case NV... |
bad6509492c94f72602997b4841bc03179bbb8a3.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "includes.h"
__global__ void im2col_gpu_kernel(const int n, const float* data_im, const int height, const int width, const int ksize, const int pad, const int stride, const int height_col, const int width_col, float *data_c... | bad6509492c94f72602997b4841bc03179bbb8a3.cu | #include "includes.h"
__global__ void im2col_gpu_kernel(const int n, const float* data_im, const int height, const int width, const int ksize, const int pad, const int stride, const int height_col, const int width_col, float *data_col) {
int index = blockIdx.x*blockDim.x+threadIdx.x;
for(; index < n; index += blockDim.... |
fd201c90359d3f5b4f98ef5bb4f302ce96c12ed8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
extern "C"
__global__
void sigmoid(float *activation, unsigned int length)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x;
i < length;
i += blockDim.x * gridDim.x)
{
activat... | fd201c90359d3f5b4f98ef5bb4f302ce96c12ed8.cu | extern "C"
__global__
void sigmoid(float *activation, unsigned int length)
{
for (int i = blockIdx.x * blockDim.x + threadIdx.x;
i < length;
i += blockDim.x * gridDim.x)
{
activation[i]=1.0f/(1.0f+__expf(-activation[i]));
//activation[i]=1.0f/(1.... |
ca2a9bf18167297a3f261f619afeac5a01098633.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "external/petscvector/petscvector.cuh"
#include "external/petscvector/common/fem2D.h"
namespace pascinference {
namespace common {
__global__ void kernel_fem2D_reduce_data(double *data1, double *data2, int T1, int T2, int... | ca2a9bf18167297a3f261f619afeac5a01098633.cu | #include "external/petscvector/petscvector.cuh"
#include "external/petscvector/common/fem2D.h"
namespace pascinference {
namespace common {
__global__ void kernel_fem2D_reduce_data(double *data1, double *data2, int T1, int T2, int Tbegin1, int Tbegin2, int T1local, int T2local, int left_t1_idx, int left_t2_idx, doubl... |
45fd796e6a15e7f5bcea14f44d89bced90daa391.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 "vec_divScalarFloat.cu"
#include<chrono>
#include<iostream>
using... | 45fd796e6a15e7f5bcea14f44d89bced90daa391.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 "vec_divScalarFloat.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16... |
03a6a867151034ff7177b1e6257b7af15bda2fb2.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <stdio.h>
__global__ void vector_dot_product_cu(int *d_c, int *d_a, int *d_b){
__shared__ int tmp[4];
int i = threadIdx.x;
tmp[i] = d_a[i] * d_b[i];
__syncthreads();
int sum = 0;
for (int j = 0; j < 4; j++) {
sum... | 03a6a867151034ff7177b1e6257b7af15bda2fb2.cu | #include <stdio.h>
__global__ void vector_dot_product_cu(int *d_c, int *d_a, int *d_b){
__shared__ int tmp[4];
int i = threadIdx.x;
tmp[i] = d_a[i] * d_b[i];
__syncthreads();
int sum = 0;
for (int j = 0; j < 4; j++) {
sum = sum + tmp[j];
}
*d_c = sum;
}
int main(void) {
int N = 4;
int a[N] = { 22, 13, ... |
6a202c85f01e5cf8ff3b5bba0db1bd3e0e292a1d.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
int main() {
int nDevices;
hipGetDeviceCount(&nDevices);
for (int i = 0; i < nDevices; i++) {
hipDeviceProp_t prop;
hipGetDeviceProperties(&prop, i);
printf("Device Number: %d\n", i);
printf(" Device name: %s\n", prop... | 6a202c85f01e5cf8ff3b5bba0db1bd3e0e292a1d.cu | #include <stdio.h>
int main() {
int nDevices;
cudaGetDeviceCount(&nDevices);
for (int i = 0; i < nDevices; i++) {
cudaDeviceProp prop;
cudaGetDeviceProperties(&prop, i);
printf("Device Number: %d\n", i);
printf(" Device name: %s\n", prop.name);
printf(" Memory Clock Rate (KHz): %d\n",
... |
397ff2ff04d2109625d7d3380cab668d59127452.hip | // !!! This is a file automatically generated by hipify!!!
#include <cudatbx/cuda_base.cuh>
#include <simtbx/gpu/structure_factors.h>
namespace simtbx {
namespace gpu {
gpu_energy_channels::gpu_energy_channels(int const& deviceId){
h_deviceID = deviceId;
hipSetDevice(deviceId);
}
void
gpu_energy_chan... | 397ff2ff04d2109625d7d3380cab668d59127452.cu | #include <cudatbx/cuda_base.cuh>
#include <simtbx/gpu/structure_factors.h>
namespace simtbx {
namespace gpu {
gpu_energy_channels::gpu_energy_channels(int const& deviceId){
h_deviceID = deviceId;
cudaSetDevice(deviceId);
}
void
gpu_energy_channels::structure_factors_to_GPU_detail(af::shared<double> l... |
245df5157cc07445972284dae21a64314476773e.hip | // !!! This is a file automatically generated by hipify!!!
// Includes
#include <stdio.h>
#include <stdlib.h>
// includes CUDA
#include <hip/hip_runtime.h>
#define THREADS_PER_BLOCK 256
#define NUM_OF_BLOCKS 640
// Functions
void CleanupResources(void);
void RandomInit_int(unsigned*, int);
void RandomInit_fp(floa... | 245df5157cc07445972284dae21a64314476773e.cu | // Includes
#include <stdio.h>
#include <stdlib.h>
// includes CUDA
#include <cuda_runtime.h>
#define THREADS_PER_BLOCK 256
#define NUM_OF_BLOCKS 640
// Functions
void CleanupResources(void);
void RandomInit_int(unsigned*, int);
void RandomInit_fp(float*, int);
///////////////////////////////////////////////////... |
b52da1bb199e79899808bfaf97547ea011aae23e.hip | // !!! This is a file automatically generated by hipify!!!
/* Copyright (c) 2017, 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 retai... | b52da1bb199e79899808bfaf97547ea011aae23e.cu | /* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions ... |
80e07843f21b3cdc731f98771552fbd89991aa0b.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License... | 80e07843f21b3cdc731f98771552fbd89991aa0b.cu | /* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law... |
3c900669ea4fd4f7c921e8cf4f97ceafcdc049be.hip | // !!! This is a file automatically generated by hipify!!!
#include "params.hpp"
#include "indices.cuh"
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <device_launch_parameters.h>
#include <hip/hip_vector_types.h>
// Nearest lower power of 2
__device__ __inline__ uint flp2 (uint x)
{
return (0x8... | 3c900669ea4fd4f7c921e8cf4f97ceafcdc049be.cu | #include "params.hpp"
#include "indices.cuh"
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#include <vector_types.h>
// Nearest lower power of 2
__device__ __inline__ uint flp2 (uint x)
{
return (0x80000000u >> __clz(x));
}
//Computes the squared difference between two numbers
t... |
bf16e049ecfe1ecc2acf0ae9df1106f8ce04f3fe.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
//
// Created by chengjin on 2020-06-30.
//
#include "cu_utils.h"
#include "embedding_kernel.h"
namespace quake {
namespace framework {
namespace ops_lib {
template<typename T,typename Tidx>
__global__ static void _gather(int idx... | bf16e049ecfe1ecc2acf0ae9df1106f8ce04f3fe.cu | //
// Created by chengjin on 2020-06-30.
//
#include "cu_utils.h"
#include "embedding_kernel.h"
namespace quake {
namespace framework {
namespace ops_lib {
template<typename T,typename Tidx>
__global__ static void _gather(int idx_num,int row,int col,
const T* data,const Tidx* index,T* output)
{
int c = blockIdx... |
81c15d8ed0d5bd82e6cc84bf021ecd3055c7804c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
// This file is adapted from TetGen
#include "CudaMesh.h"
#include "CudaPredicates.h"
#include <thrust/device_ptr.h>
#include <stdio.h>
#include <assert.h>
#include <vector>
////////////////////////////////////////////////////////... | 81c15d8ed0d5bd82e6cc84bf021ecd3055c7804c.cu | // This file is adapted from TetGen
#include "CudaMesh.h"
#include "CudaPredicates.h"
#include <thrust/device_ptr.h>
#include <stdio.h>
#include <assert.h>
#include <vector>
///////////////////////////////////////////////////////////////////////////////
// ... |
dbbc5faf74c65268d380892722349cf06cb59ffd.hip | // !!! This is a file automatically generated by hipify!!!
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | dbbc5faf74c65268d380892722349cf06cb59ffd.cu | /*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
35aa69a3ad6c8f6a5fa5d507bd384db2ab922252.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*
* 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
*
*... | 35aa69a3ad6c8f6a5fa5d507bd384db2ab922252.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 ... |
b749972cf8a97a1f90bc024f8cde1d26498be4a9.hip | // !!! This is a file automatically generated by hipify!!!
// Copyright 2020 Tier IV, Inc.
//
// 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... | b749972cf8a97a1f90bc024f8cde1d26498be4a9.cu | // Copyright 2020 Tier IV, Inc.
//
// 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 i... |
2759a91108dd8e65376dfac52b1d7f7760b704d1.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include <hiprand/hiprand.h>
#define CHUNK 1 //Run CHUNK blocks, each with 1024 threads (or with the specified argument) and check error
#define LOG 1024 // Print progress each LOG iterations
#define LIMIT 1024*1024 // LIMIT of ite... | 2759a91108dd8e65376dfac52b1d7f7760b704d1.cu | #include <curand.h>
#define CHUNK 1 //Run CHUNK blocks, each with 1024 threads (or with the specified argument) and check error
#define LOG 1024 // Print progress each LOG iterations
#define LIMIT 1024*1024 // LIMIT of iterations
#include "../common.h"
__global__ void MontecarloPI(unsigned long *inside, unsigned lon... |
9f12cf1b2da406caae3979ab3bcf2278565b76c5.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hipfft.h>
#include <hermes/hermes.h>
#include <iostream>
using namespace hermes::cuda;
#define NX 256
#define NY 128
__global__ void NormalizeIFFT(float *g_data, int width, int height, float N) {
// index = x * heigh... | 9f12cf1b2da406caae3979ab3bcf2278565b76c5.cu | #include <cuda_runtime.h>
#include <cufft.h>
#include <hermes/hermes.h>
#include <iostream>
using namespace hermes::cuda;
#define NX 256
#define NY 128
__global__ void NormalizeIFFT(float *g_data, int width, int height, float N) {
// index = x * height + y
unsigned int xIndex = blockDim.x * blockIdx.x + thread... |
6a4823b1a41e111fd6a7e2dddb4113bfe8f78e3c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
/*------------------------------------------------------------------------
CUDA C extension for Python
Provides functionality for back projection in PET image
reconstruction.
author: Pawel Markiewicz
Copyrights: 2018
--------------... | 6a4823b1a41e111fd6a7e2dddb4113bfe8f78e3c.cu | /*------------------------------------------------------------------------
CUDA C extension for Python
Provides functionality for back projection in PET image
reconstruction.
author: Pawel Markiewicz
Copyrights: 2018
------------------------------------------------------------------------*/
#include "auxmath.h"
#inclu... |
c91c77f6fb34f0067e73f6a198c2f2c72bf6e7f2.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
#include <stdio.h>
#include <assert.h>
#define N 2//8
__device__ double C[2][2][2];
__device__ int index (int a, int b, int c){
return 4*a + 2*b + c;
}
__global__ void foo(double *H) {
int i... | c91c77f6fb34f0067e73f6a198c2f2c72bf6e7f2.cu | #include <cuda.h>
#include <cuda_runtime_api.h>
#include <stdio.h>
#include <assert.h>
#define N 2//8
__device__ double C[2][2][2];
__device__ int index (int a, int b, int c){
return 4*a + 2*b + c;
}
__global__ void foo(double *H) {
int idx = index (threadIdx.x,threadIdx.y,threadIdx.z);
H[idx] = C[threadIdx.... |
be65bd699aab3ab520ab21bdf2c76b56f5abb0b6.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "Montecarlo.h"
#include <iostream>
#include <hiprand/hiprand_kernel.h>
#include "Device.h"
using std::cout;
using std::endl;
/*----------------------------------------------------------------------*\
|* Declaration ... | be65bd699aab3ab520ab21bdf2c76b56f5abb0b6.cu | #include "Montecarlo.h"
#include <iostream>
#include <curand_kernel.h>
#include "Device.h"
using std::cout;
using std::endl;
/*----------------------------------------------------------------------*\
|* Declaration *|
\*---------------------------------------------------------------------*/
/*------------... |
f86a224f6402a4e182c9422f65fd9026a5cb9200.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 "rgb2hsl_kernel.cu"
#include<chrono>
#include<iostream>
using nam... | f86a224f6402a4e182c9422f65fd9026a5cb9200.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 "rgb2hsl_kernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{2... |
07f093834a349a0cf7cc2f6dbab37ecbbbd5dec8.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "../include/cuda_utils.h"
#define DEG2RAD 57.29578
#define R 25
typedef unsigned char uchar;
__global__ void linearInterp(const uchar* const src, uchar* dst, int cols, int k) {
int i = blockIdx.y, j = blockIdx.x;
... | 07f093834a349a0cf7cc2f6dbab37ecbbbd5dec8.cu | #include "../include/cuda_utils.h"
#define DEG2RAD 57.29578
#define R 25
typedef unsigned char uchar;
__global__ void linearInterp(const uchar* const src, uchar* dst, int cols, int k) {
int i = blockIdx.y, j = blockIdx.x;
int px = j / k, py = i / k;
double u = double(j) / double(k) - double(px), v = doub... |
6a46c350142c763b9f0c514c858af6dc6d0ba779.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <hiprand/hiprand_kernel.h>
#include <stdlib.h>
#include <hip/hip_runtime.h>
#include <sys/time.h>
#include "kernel.hip"
#include<chrono>
#include<iostream>
using namespace ... | 6a46c350142c763b9f0c514c858af6dc6d0ba779.cu | #include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <curand_kernel.h>
#include <stdlib.h>
#include <cuda.h>
#include <sys/time.h>
#include "kernel.cu"
#include<chrono>
#include<iostream>
using namespace std;
using namespace std::chrono;
int blocks_[20][2] = {{8,8},{16,16},{24,24},{3... |
b3306f56584b0b2055fdeab1ce1ff54910074b7c.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "kernel.h"
#define TX 32
#define TY 32
#define DIM 2100
struct hipComplex {
float r;
float i;
__device__ hipComplex( float a, float b ) : r(a), i(b) {}
__device__ float magnitude2( void ) {
re... | b3306f56584b0b2055fdeab1ce1ff54910074b7c.cu | #include "kernel.h"
#define TX 32
#define TY 32
#define DIM 2100
struct cuComplex {
float r;
float i;
__device__ cuComplex( float a, float b ) : r(a), i(b) {}
__device__ float magnitude2( void ) {
return r * r + i * i;
}
__device__ cuComplex operator*(const cuComplex& a) {
... |
2878fa1634fb2a9f4f9119c50200e84093085869.hip | // !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "gradient.h"
#include "util.h"
__global__ void g_l2norm(float * I, float *O, int w, int h, int nc)
{
int x = threadIdx.x + blockDim.x * blockIdx.x;
int y = threadIdx.y + blockDim.y * blockIdx.y;
float sum = 0.... | 2878fa1634fb2a9f4f9119c50200e84093085869.cu | #include "gradient.h"
#include "util.h"
__global__ void g_l2norm(float * I, float *O, int w, int h, int nc)
{
int x = threadIdx.x + blockDim.x * blockIdx.x;
int y = threadIdx.y + blockDim.y * blockIdx.y;
float sum = 0.f;
if(nc > 1)
{
for(int c = 0; c < nc; c++)
{
sum +=... |
1946fee93c5ca44be037779fa94dc81d41bdec62.hip | // !!! This is a file automatically generated by hipify!!!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hip/hip_runtime.h>
#include <omp.h>
#include <hip/hip_runtime.h>
#include <driver_functions.h>
#include <math_constants.h>
#include "pushRelabelGPU.h"
#ifdef DEBUG
#define cudaCheckError(ans... | 1946fee93c5ca44be037779fa94dc81d41bdec62.cu | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cuda.h>
#include <omp.h>
#include <cuda_runtime.h>
#include <driver_functions.h>
#include <math_constants.h>
#include "pushRelabelGPU.h"
#ifdef DEBUG
#define cudaCheckError(ans) { cudaAssert((ans), __FILE__, __LINE__); }
inline void cudaAssert(cudaE... |
73604210fe64055116c500c628ca0f26fc293e70.hip | // !!! This is a file automatically generated by hipify!!!
#include <hip/hip_runtime.h>
#include <hip/hip_runtime.h>
#include <driver_functions.h> | 73604210fe64055116c500c628ca0f26fc293e70.cu |
#include <cuda.h>
#include <cuda_runtime.h>
#include <driver_functions.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.