C++ Logo


Advanced search

Subject: Re: a standard way to tell the compiler to choose an implementation version following policies ?
From: Vishal Oza (vickoza_at_[hidden])
Date: 2020-06-13 10:01:11

Dear Cessar:

I would look at the 2D graphics for any type of custom iterator being built
into the language

Vishal Oza

On Fri, Jun 12, 2020 at 4:02 PM c.ohanessian via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> ‌‌Hi,
> My name is Cesar OHANESSIAN, a C++ enthusiast. I am currently working on
> the implementation of a multidimensional array, the purpose being to extend
> std::array while being adaptable to most of the usual conventions (row/col
> vector, row/col major). I would like to allow people to mix the
> conventions, not only for compatibility reasons but also for local
> optimization purposes, for example:
> - the matrix-vector product in col vector/row major gives 3 independent
> std::inner_product with contiguous iterators
> - the recopy of a specific basis vector is a simple memcpy in col
> vector/col major (or in row vector/row major).
> With that in mind, iterating over two arrays with different conventions is
> intrinsically sub optimal in memory and is a deciding factor to keep or
> reject a local optimization regarding its compatibility impact (when doing
> std::copy, std::equal).
> I would like to tell the compiler to choose between different iterator
> implementations (all the stride order permutations) which are all
> equivalent in their defined behavior, following some policies (memory
> space/execution speed). It's a low level decision, depending on various
> fixed costs including the iterator implementation itself (dealing with for
> loops and counters). It would be pleasant to have a standard way for taking
> benefit of the compiler decisions, allowing more flexibility at compile
> time => each template instantiation has a unique solution so we shouldn't
> have to perform infinite experimental plans ! Does such a feature exist ?
> Thank you in advance, you people are doing a formidable work and I owe you
> so much !
> Best Regards,
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups