Skip to content

Commit add100b

Browse files
committed
fix cuda error messages
1 parent 2261897 commit add100b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/CudaLib/cuda_calculateEuclideanDistanceWithoutSquareRoot.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Computes the euclidean norm of array a and b.
1717
*/
1818
__global__ void
19-
kernel(float *a, float *b, float *c, int length)
19+
euclidean_norm_kernel(float *a, float *b, float *c, int length)
2020
{
2121
int tid = threadIdx.x;
2222
int i = blockDim.x * blockIdx.x + threadIdx.x;
@@ -105,13 +105,13 @@ float cuda_calculateEuclideanDistanceWithoutSquareRoot(float *a, float *b, int l
105105

106106
// Start kernel
107107
//printf("Starting CUDA Kernel with (%i,%i,%i) blocks and (%i,%i,%i) threads ...\n", dimGrid.x, dimGrid.y, dimGrid.z, dimBlock.x, dimBlock.y, dimBlock.z);
108-
kernel<<<dimGrid, dimBlock>>>(d_a, d_b, d_isum, length);
108+
euclidean_norm_kernel<<<dimGrid, dimBlock>>>(d_a, d_b, d_isum, length);
109109

110110
error = cudaGetLastError();
111111

112112
if (error != cudaSuccess)
113113
{
114-
fprintf(stderr, "Failed to launch vectorAdd kernel (error code %s)!\n", cudaGetErrorString(error));
114+
fprintf(stderr, "Failed to launch euclidean_norm_kernel (error code %s)!\n", cudaGetErrorString(error));
115115
exit(EXIT_FAILURE);
116116
}
117117

src/CudaLib/cuda_rotate.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void cuda_rotate(int height, int width, float *source, float *dest, float alpha)
8989

9090
if (error != cudaSuccess)
9191
{
92-
fprintf(stderr, "Failed to launch vectorAdd kernel (error code %s)!\n", cudaGetErrorString(error));
92+
fprintf(stderr, "Failed to launch rotate kernel (error code %s)!\n", cudaGetErrorString(error));
9393
exit(EXIT_FAILURE);
9494
}
9595

0 commit comments

Comments
 (0)