diff --git a/tests/core/test_core_contiguous_memory_resource.cpp b/tests/core/test_core_contiguous_memory_resource.cpp index 62fc8228..243ef87a 100644 --- a/tests/core/test_core_contiguous_memory_resource.cpp +++ b/tests/core/test_core_contiguous_memory_resource.cpp @@ -59,5 +59,5 @@ TEST_F(core_contiguous_memory_resource_test, allocations) { EXPECT_EQ(static_cast(&*(vec5.begin())), static_cast(&*(vec4.end()))); -#endif // MSVC debug build... +#endif // MSVC debug build... } diff --git a/tests/cuda/test_cuda_containers.cpp b/tests/cuda/test_cuda_containers.cpp index 5b5cf471..1ec63fce 100644 --- a/tests/cuda/test_cuda_containers.cpp +++ b/tests/cuda/test_cuda_containers.cpp @@ -70,8 +70,10 @@ TEST_F(cuda_containers_test, explicit_memory) { // Allocate a device memory block for the output container. auto outputvechost = vecmem::get_data(outputvec); - vecmem::data::vector_buffer outputvecdevice(outputvec.size(), - device_resource); + vecmem::data::vector_buffer outputvecdevice( + static_cast::size_type>( + outputvec.size()), + device_resource); // Create the array that is used in the linear transformation. vecmem::array constants(host_resource); @@ -107,7 +109,7 @@ TEST_F(cuda_containers_test, atomic_memory) { auto vec_on_device = m_copy.to(vecmem::get_data(vec), device_resource); // Give it to the test function. - static constexpr int ITERATIONS = 100; + static constexpr unsigned int ITERATIONS = 100; atomicTransform(ITERATIONS, vec_on_device); // Copy it back to the host. @@ -115,7 +117,7 @@ TEST_F(cuda_containers_test, atomic_memory) { // Check the output. for (int value : vec) { - EXPECT_EQ(value, 2 * ITERATIONS); + EXPECT_EQ(static_cast(value), 2 * ITERATIONS); } } @@ -134,8 +136,9 @@ TEST_F(cuda_containers_test, extendable_memory) { } // Create a buffer that will hold the filtered elements of the input vector. - vecmem::data::vector_buffer output_buffer(input.size(), 0, - device_resource); + vecmem::data::vector_buffer output_buffer( + static_cast::size_type>(input.size()), + 0, device_resource); m_copy.setup(output_buffer); // Run the filtering kernel. diff --git a/tests/cuda/test_cuda_containers_kernels.cu b/tests/cuda/test_cuda_containers_kernels.cu index 99586544..fb56ab1f 100644 --- a/tests/cuda/test_cuda_containers_kernels.cu +++ b/tests/cuda/test_cuda_containers_kernels.cu @@ -74,7 +74,7 @@ __global__ void atomicTransformKernel(std::size_t iterations, return; } -void atomicTransform(std::size_t iterations, +void atomicTransform(unsigned int iterations, vecmem::data::vector_view vec) { // Launch the kernel. @@ -145,12 +145,12 @@ __global__ void filterTransformKernel( } void filterTransform(vecmem::data::jagged_vector_view input, - std::size_t max_vec_size, + unsigned int max_vec_size, vecmem::data::jagged_vector_view output) { // Launch the kernel. - filterTransformKernel<<<1, dim3(input.m_size, max_vec_size)>>>(input, - output); + dim3 dimensions(static_cast(input.m_size), max_vec_size); + filterTransformKernel<<<1, dimensions>>>(input, output); // Check whether it succeeded to run. VECMEM_CUDA_ERROR_CHECK(cudaGetLastError()); VECMEM_CUDA_ERROR_CHECK(cudaDeviceSynchronize()); diff --git a/tests/cuda/test_cuda_containers_kernels.cuh b/tests/cuda/test_cuda_containers_kernels.cuh index eaff3c19..29ef0154 100644 --- a/tests/cuda/test_cuda_containers_kernels.cuh +++ b/tests/cuda/test_cuda_containers_kernels.cuh @@ -20,7 +20,7 @@ void linearTransform(vecmem::data::vector_view constants, vecmem::data::vector_view output); /// Function incrementing the elements of the received vector using atomics -void atomicTransform(std::size_t iterations, +void atomicTransform(unsigned int iterations, vecmem::data::vector_view vec); /// Function filtering elements of an input vector into an output vector @@ -29,5 +29,5 @@ void filterTransform(vecmem::data::vector_view input, /// Function filtering elements of an input vector into an output vector void filterTransform(vecmem::data::jagged_vector_view input, - std::size_t max_vec_size, + unsigned int max_vec_size, vecmem::data::jagged_vector_view output); diff --git a/tests/cuda/test_cuda_jagged_vector_view_kernels.cu b/tests/cuda/test_cuda_jagged_vector_view_kernels.cu index 3b412719..5e2d8812 100644 --- a/tests/cuda/test_cuda_jagged_vector_view_kernels.cu +++ b/tests/cuda/test_cuda_jagged_vector_view_kernels.cu @@ -64,7 +64,8 @@ void linearTransform(const vecmem::data::vector_view& constants, assert(input.m_size == output.m_size); // Launch the kernel. - linearTransformKernel<<<1, input.m_size>>>(constants, input, output); + linearTransformKernel<<<1, static_cast(input.m_size)>>>( + constants, input, output); // Check whether it succeeded to run. VECMEM_CUDA_ERROR_CHECK(cudaGetLastError()); VECMEM_CUDA_ERROR_CHECK(cudaDeviceSynchronize()); diff --git a/tests/cuda/test_cuda_memory_resources.cpp b/tests/cuda/test_cuda_memory_resources.cpp index 8ff57539..f77c738f 100644 --- a/tests/cuda/test_cuda_memory_resources.cpp +++ b/tests/cuda/test_cuda_memory_resources.cpp @@ -109,8 +109,9 @@ class cuda_host_accessible_memory_resource_test // Remove a couple of elements from the vectors. for (int i : {26, 38, 25}) { - std::remove(reference_vector.begin(), reference_vector.end(), i); - std::remove(test_vector.begin(), test_vector.end(), i); + (void)std::remove(reference_vector.begin(), reference_vector.end(), + i); + (void)std::remove(test_vector.begin(), test_vector.end(), i); } // Make sure that they are still the same. EXPECT_EQ(reference_vector.size(), test_vector.size());