On Fri, Feb 21, 2025 at 08:35:54PM +0900, Alexandre Courbot wrote:
> On Thu Feb 20, 2025 at 9:14 AM JST, John Hubbard wrote:
> > On 2/19/25 3:13 PM, Daniel Almeida wrote:
> >>> On 19 Feb 2025, at 17:23, Dave Airlie wrote:
> >>> On Thu, 20 Feb 2025 at 06:22, John Hubbard wrote:
> On 2/19/25 4
On Thu Feb 20, 2025 at 9:14 AM JST, John Hubbard wrote:
> On 2/19/25 3:13 PM, Daniel Almeida wrote:
>>> On 19 Feb 2025, at 17:23, Dave Airlie wrote:
>>> On Thu, 20 Feb 2025 at 06:22, John Hubbard wrote:
On 2/19/25 4:51 AM, Alexandre Courbot wrote:
> Yes, that looks like the optimal way t
On 18/02/2025 14:07, Alexandre Courbot wrote:
> On Tue Feb 18, 2025 at 7:07 PM JST, Dirk Behme wrote:
>> On 17/02/2025 15:04, Alexandre Courbot wrote:
>>> It is common to build a u64 from its high and low parts obtained from
>>> two 32-bit registers. Conversely, it is also common to split a u64 int
On 2/19/25 3:13 PM, Daniel Almeida wrote:
On 19 Feb 2025, at 17:23, Dave Airlie wrote:
On Thu, 20 Feb 2025 at 06:22, John Hubbard wrote:
On 2/19/25 4:51 AM, Alexandre Courbot wrote:
Yes, that looks like the optimal way to do this actually. It also
doesn't introduce any overhead as the destruc
> On 19 Feb 2025, at 17:23, Dave Airlie wrote:
>
> On Thu, 20 Feb 2025 at 06:22, John Hubbard wrote:
>>
>> On 2/19/25 4:51 AM, Alexandre Courbot wrote:
>>> Yes, that looks like the optimal way to do this actually. It also
>>> doesn't introduce any overhead as the destructuring was doing both
> Actually. How about adding methods to this trait that return either
> component?
>
> let some_u32 = some_u64.high_half();
> let another_u32 = some_u64.low_half();
>
> These should be used most of the times, and using destructuring/tuple
> would only be useful for a few select cases.
>
Indeed
On Thu, 20 Feb 2025 at 06:22, John Hubbard wrote:
>
> On 2/19/25 4:51 AM, Alexandre Courbot wrote:
> > Yes, that looks like the optimal way to do this actually. It also
> > doesn't introduce any overhead as the destructuring was doing both
> > high_half() and low_half() in sequence, so in some cas
On 2/19/25 4:51 AM, Alexandre Courbot wrote:
Yes, that looks like the optimal way to do this actually. It also
doesn't introduce any overhead as the destructuring was doing both
high_half() and low_half() in sequence, so in some cases it might
even be more efficient.
I'd just like to find a bett
On Wed Feb 19, 2025 at 12:24 PM JST, John Hubbard wrote:
> On 2/18/25 5:21 PM, Alexandre Courbot wrote:
>> On Wed Feb 19, 2025 at 5:51 AM JST, Timur Tabi wrote:
>>> On Tue, 2025-02-18 at 22:16 +0900, Alexandre Courbot wrote:
> ...
>> More likely this would be something like:
>>
>>let SplitU64
On 17/02/2025 15:04, Alexandre Courbot wrote:
> It is common to build a u64 from its high and low parts obtained from
> two 32-bit registers. Conversely, it is also common to split a u64 into
> two u32s to write them into registers. Add an extension trait for u64
> that implement these methods in a
On 2/18/25 5:21 PM, Alexandre Courbot wrote:
On Wed Feb 19, 2025 at 5:51 AM JST, Timur Tabi wrote:
On Tue, 2025-02-18 at 22:16 +0900, Alexandre Courbot wrote:
...
More likely this would be something like:
let SplitU64 { high: some_u32, .. } = some_u64;
Which is still a bit verbose, but a
On Wed Feb 19, 2025 at 5:51 AM JST, Timur Tabi wrote:
> On Tue, 2025-02-18 at 22:16 +0900, Alexandre Courbot wrote:
>> > A proper struct with `high` and `low` might be more verbose, but
>> > it rules out this issue.
>>
>> Mmm indeed, so we would have client code looking like:
>>
>> let SplitU64
On Tue, 2025-02-18 at 22:16 +0900, Alexandre Courbot wrote:
> > A proper struct with `high` and `low` might be more verbose, but
> > it rules out this issue.
>
> Mmm indeed, so we would have client code looking like:
>
> let SplitU64 { high, low } = some_u64.into_u32();
>
> instead of
>
>
Hi Daniel!
On Tue Feb 18, 2025 at 6:10 AM JST, Daniel Almeida wrote:
> Hi Alex,
>
>> On 17 Feb 2025, at 11:04, Alexandre Courbot wrote:
>>
>> It is common to build a u64 from its high and low parts obtained from
>> two 32-bit registers. Conversely, it is also common to split a u64 into
>> two u
On Tue Feb 18, 2025 at 7:07 PM JST, Dirk Behme wrote:
> On 17/02/2025 15:04, Alexandre Courbot wrote:
>> It is common to build a u64 from its high and low parts obtained from
>> two 32-bit registers. Conversely, it is also common to split a u64 into
>> two u32s to write them into registers. Add an
On Mon, 17 Feb 2025 at 15:07, Alexandre Courbot wrote:
>
> It is common to build a u64 from its high and low parts obtained from
> two 32-bit registers. Conversely, it is also common to split a u64 into
> two u32s to write them into registers. Add an extension trait for u64
> that implement these
Hi Alex,
> On 17 Feb 2025, at 11:04, Alexandre Courbot wrote:
>
> It is common to build a u64 from its high and low parts obtained from
> two 32-bit registers. Conversely, it is also common to split a u64 into
> two u32s to write them into registers. Add an extension trait for u64
> that implem
17 matches
Mail list logo