using value_type = T;
/**
- * Define width of template type.
+ * Return the width of template type.
*/
- static constexpr std::size_t width = 1;
+ static constexpr std::size_t
+ width()
+ {
+ return 1;
+ }
/**
* Define vectorized value type for internal vectorization.
using vectorized_value_type = VectorizedArray<T>;
/**
- * Define a stride which defines how often the template type T fits into the
- * vectorized_value_type. This is useful to write vectorized templated code
- * where the internal computation is vectorized and the user interface is
- * optionally scalar or also vectorized.
+ * Return a stride which defines how often the template type T fits into
+ * the vectorized_value_type. This is useful to write vectorized templated
+ * code where the internal computation is vectorized and the user
+ * interface is optionally scalar or also vectorized.
*/
- static constexpr std::size_t stride = vectorized_value_type::size();
+ static constexpr std::size_t
+ stride()
+ {
+ return vectorized_value_type::size();
+ }
/**
* Get a reference to scalar value (on lane 0).
static value_type &
get_from_vectorized(vectorized_value_type &values, unsigned int c)
{
- AssertIndexRange(c, stride);
+ AssertIndexRange(c, stride());
return values[c];
}
static const value_type &
get_from_vectorized(const vectorized_value_type &values, unsigned int c)
{
- AssertIndexRange(c, stride);
+ AssertIndexRange(c, stride());
return values[c];
}
using value_type = T;
/**
- * Define width of template type.
+ * Return the width of template type.
*/
- static constexpr std::size_t width = width_;
+ static constexpr std::size_t
+ width()
+ {
+ return width_;
+ }
/**
* Define vectorized value type for internal vectorization.
using vectorized_value_type = VectorizedArray<T, width_>;
/**
- * Define a stride which defines how often the template type
+ * Return a stride which defines how often the template type
* VectorizedArray<T, width_> fits into the vectorized value type. This is
* useful to write vectorized templated code where the internal computation
* is vectorized and the user interface is optionally scalar or also
* vectorized.
*/
- static constexpr std::size_t stride = 1;
+ static constexpr std::size_t
+ stride()
+ {
+ return 1;
+ }
/**
* Get a reference to scalar value on lane c.
get_from_vectorized(vectorized_value_type &values, unsigned int c)
{
(void)c;
- AssertIndexRange(c, stride);
+ AssertIndexRange(c, stride());
return values;
}
get_from_vectorized(const vectorized_value_type &values, unsigned int c)
{
(void)c;
- AssertIndexRange(c, stride);
+ AssertIndexRange(c, stride());
return values;
}
private:
static constexpr std::size_t n_lanes_user_interface =
- internal::VectorizedArrayTrait<Number>::width;
+ internal::VectorizedArrayTrait<Number>::width();
static constexpr std::size_t n_lanes_internal =
- internal::VectorizedArrayTrait<VectorizedArrayType>::width;
+ internal::VectorizedArrayTrait<VectorizedArrayType>::width();
static constexpr std::size_t stride =
- internal::VectorizedArrayTrait<Number>::stride;
+ internal::VectorizedArrayTrait<Number>::stride();
/**
* Common setup function for both constructors. Does the setup for both fast
const unsigned int n_q_points_unvectorized)
{
const unsigned int n_lanes =
- dealii::internal::VectorizedArrayTrait<NumberType>::width;
+ dealii::internal::VectorizedArrayTrait<NumberType>::width();
const unsigned int n_filled_lanes_last_batch =
n_q_points_unvectorized % n_lanes;
unsigned int n_q_points = n_q_points_unvectorized / n_lanes;
const std::vector<Point<dim>> &points)
{
const unsigned int n_lanes =
- dealii::internal::VectorizedArrayTrait<VectorizedArrayType>::width;
+ dealii::internal::VectorizedArrayTrait<VectorizedArrayType>::width();
for (unsigned int q = 0; q < n_q_points; ++q)
{
const MappingInfo::MappingData &mapping_data)
{
const unsigned int n_lanes =
- dealii::internal::VectorizedArrayTrait<Number>::width;
+ dealii::internal::VectorizedArrayTrait<Number>::width();
for (unsigned int q = 0; q < n_q_points; ++q)
{