Re: [PATCH] Input: MT - Add support for balanced slot assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux