mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
committed by
Rasmus Munk Larsen
parent
0269c017aa
commit
abc3d6014d
@@ -35,8 +35,8 @@ void test_cuda_complex_cwise_ops() {
|
||||
Eigen::TensorMap<Eigen::Tensor<std::complex<T>, 1, 0, int>, Eigen::Aligned> gpu_in2(d_in2, kNumItems);
|
||||
Eigen::TensorMap<Eigen::Tensor<std::complex<T>, 1, 0, int>, Eigen::Aligned> gpu_out(d_out, kNumItems);
|
||||
|
||||
const std::complex<T> a(3.14f, 2.7f);
|
||||
const std::complex<T> b(-10.6f, 1.4f);
|
||||
const std::complex<T> a(static_cast<T>(3.14), static_cast<T>(2.7));
|
||||
const std::complex<T> b(static_cast<T>(-10.6), static_cast<T>(1.4));
|
||||
|
||||
gpu_in1.device(gpu_device) = gpu_in1.constant(a);
|
||||
gpu_in2.device(gpu_device) = gpu_in2.constant(b);
|
||||
|
||||
@@ -176,7 +176,7 @@ void test_3d_convolution(Context* context) {
|
||||
|
||||
// Helper method to synchronize device.
|
||||
template <typename Device>
|
||||
void synchronize(Device& device) { /*nothing*/
|
||||
void synchronize(Device& /*device*/) { /*nothing*/
|
||||
}
|
||||
template <>
|
||||
void synchronize(Eigen::GpuDevice& device) {
|
||||
@@ -197,7 +197,7 @@ void test_device_memory(const TensorDevice& device) {
|
||||
device.memcpyDeviceToHost(host.data(), device_data, count * sizeof(DataType));
|
||||
synchronize(device);
|
||||
memset(expected.data(), byte_value, count * sizeof(DataType));
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
for (Index i = 0; i < count; i++) {
|
||||
VERIFY_IS_EQUAL(host(i), expected(i));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user