diff --git a/cpp/open3d/ml/impl/continuous_conv/ContinuousConv.h b/cpp/open3d/ml/impl/continuous_conv/ContinuousConv.h index 570cdd84730..a0f66ad9bea 100644 --- a/cpp/open3d/ml/impl/continuous_conv/ContinuousConv.h +++ b/cpp/open3d/ml/impl/continuous_conv/ContinuousConv.h @@ -59,6 +59,9 @@ void _CConvComputeFeaturesCPU(TOut* out_features, memset(out_features, 0, sizeof(TOut) * num_out * out_channels); + typedef Eigen::Array Matrix; + typedef Eigen::Array Matrix3C; + tbb::parallel_for( tbb::blocked_range(0, num_out, 32), [&](const tbb::blocked_range& r) { @@ -72,13 +75,12 @@ void _CConvComputeFeaturesCPU(TOut* out_features, in_channels * spatial_filter_size, range_length); B.setZero(); - typedef Eigen::Array Matrix; Matrix infeat(VECSIZE, in_channels); Eigen::Array offsets_(offsets[0], offsets[1], offsets[2]); - Eigen::Array inv_extents; + Matrix3C inv_extents; if (INDIVIDUAL_EXTENT == false) { if (ISOTROPIC_EXTENT) { inv_extents = 1 / extents[0]; diff --git a/cpp/open3d/ml/impl/continuous_conv/ContinuousConvBackpropFilter.h b/cpp/open3d/ml/impl/continuous_conv/ContinuousConvBackpropFilter.h index b75089cd889..42e427424a0 100644 --- a/cpp/open3d/ml/impl/continuous_conv/ContinuousConvBackpropFilter.h +++ b/cpp/open3d/ml/impl/continuous_conv/ContinuousConvBackpropFilter.h @@ -63,6 +63,9 @@ void _CConvBackropFilterCPU(TOut* filter_backprop, memset(filter_backprop, 0, sizeof(TOut) * total_filter_size); std::mutex filter_backprop_mutex; + typedef Eigen::Array Matrix; + typedef Eigen::Array Matrix3C; + tbb::parallel_for( tbb::blocked_range(0, num_out, 32), [&](const tbb::blocked_range& r) { @@ -74,13 +77,12 @@ void _CConvBackropFilterCPU(TOut* filter_backprop, Eigen::Matrix C( out_channels, range_length); - typedef Eigen::Array Matrix; Matrix infeat(VECSIZE, in_channels); Eigen::Array offsets_(offsets[0], offsets[1], offsets[2]); - Eigen::Array inv_extents; + Matrix3C inv_extents; if (INDIVIDUAL_EXTENT == false) { if (ISOTROPIC_EXTENT) { inv_extents = 1 / extents[0]; diff --git a/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTranspose.h b/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTranspose.h index 1a19cdc4034..2e997a747a5 100644 --- a/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTranspose.h +++ b/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTranspose.h @@ -61,6 +61,9 @@ void _CConvTransposeComputeFeaturesCPU( memset(out_features, 0, sizeof(TOut) * num_out * out_channels); + typedef Eigen::Array Matrix; + typedef Eigen::Array Matrix3C; + tbb::parallel_for( tbb::blocked_range(0, num_out, 32), [&](const tbb::blocked_range& r) { @@ -70,13 +73,12 @@ void _CConvTransposeComputeFeaturesCPU( in_channels * spatial_filter_size, range_length); B.setZero(); - typedef Eigen::Array Matrix; Matrix infeat(VECSIZE, in_channels); Eigen::Array offsets_(offsets[0], offsets[1], offsets[2]); - Eigen::Array inv_extents; + Matrix3C inv_extents; if (INDIVIDUAL_EXTENT == false) { if (ISOTROPIC_EXTENT) { inv_extents = 1 / extents[0]; diff --git a/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTransposeBackpropFilter.h b/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTransposeBackpropFilter.h index 296850f24a2..b1cb93c0949 100644 --- a/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTransposeBackpropFilter.h +++ b/cpp/open3d/ml/impl/continuous_conv/ContinuousConvTransposeBackpropFilter.h @@ -64,6 +64,9 @@ void _CConvTransposeBackpropFilterCPU(TOut* filter_backprop, sizeof(TOut) * spatial_filter_size * in_channels * out_channels); std::mutex filter_backprop_mutex; + typedef Eigen::Array Matrix; + typedef Eigen::Array Matrix3C; + tbb::parallel_for( tbb::blocked_range(0, num_out, 32), [&](const tbb::blocked_range& r) { @@ -75,13 +78,12 @@ void _CConvTransposeBackpropFilterCPU(TOut* filter_backprop, Eigen::Matrix C( out_channels, range_length); - typedef Eigen::Array Matrix; Matrix infeat(VECSIZE, in_channels); Eigen::Array offsets_(offsets[0], offsets[1], offsets[2]); - Eigen::Array inv_extents; + Matrix3C inv_extents; if (INDIVIDUAL_EXTENT == false) { if (ISOTROPIC_EXTENT) { inv_extents = 1 / extents[0];