All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Rydberg <rydberg@bitmath.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Peter Hutterer <peter.hutterer@who-t.net>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: MT - Add support for balanced slot assignment
Date: Thu, 22 Jan 2015 21:24:01 +0100	[thread overview]
Message-ID: <54C15C61.9000100@bitmath.org> (raw)
In-Reply-To: <20150122200252.GE18153@dtor-ws>

Hi Dmitry,

On 01/22/2015 09:02 PM, Dmitry Torokhov wrote:
> On Thu, Jan 22, 2015 at 08:52:25PM +0100, Henrik Rydberg wrote:
>>  int input_mt_assign_slots(struct input_dev *dev, int *slots,
>> -			  const struct input_mt_pos *pos, int num_pos)
>> +			  const struct input_mt_pos *pos, int num_pos,
>> +			  int dmax)
> 
> Should dmax be unsigned and do we really need to treat 0 specially or we
> could use UNIT_MAX as "don't care" value?

We could have dmax unsigned, but it does not have to be from a branching
perspective, since the square is what gets used anyways.

>>  {
>>  	struct input_mt *mt = dev->mt;
>> +	int mu = 2 * dmax * dmax;
> 
> For my education, what does "mu" stand for?

I chose mu because of the mathematical similarity to the chemical potential in
statistical mechanics, where it denotes the energy per particle. Here, it
denotes the energy per contact assignment.

> Ideally, if someone could create a
> write-up on the contact matching that would be most awesome.

Heh, I guess I will have to write something at some point, without requiring
prior knowledge of Lagrange relaxation or the like. Time is a luxury these days...

Henrik


  reply	other threads:[~2015-01-22 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 19:52 [PATCH] Input: MT - Add support for balanced slot assignment Henrik Rydberg
2015-01-22 20:02 ` Dmitry Torokhov
2015-01-22 20:24   ` Henrik Rydberg [this message]
2015-01-23  1:30     ` Peter Hutterer
2015-01-26 16:56 ` Benjamin Tissoires
2015-02-01  9:03   ` Henrik Rydberg
2015-02-02 15:32     ` Benjamin Tissoires
2015-02-02 17:12       ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C15C61.9000100@bitmath.org \
    --to=rydberg@bitmath.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.