language-agnostic

Find location using only distance and bearing?

浪子不回头ぞ 提交于 2020-08-01 10:48:33
问题 Triangulation works by checking your angle to three KNOWN targets. "I know the that's the Lighthouse of Alexandria, it's located here (X,Y) on a map, and it's to my right at 90 degrees." Repeat 2 more times for different targets and angles. Trilateration works by checking your distance from three KNOWN targets. "I know the that's the Lighthouse of Alexandria, it's located here (X,Y) on a map, and I'm 100 meters away from that." Repeat 2 more times for different targets and ranges. But both of

How to load two packed 64-bit quadwords into a 128-bit xmm register

倾然丶 夕夏残阳落幕 提交于 2020-07-09 05:43:07
问题 I have two UInt64 (i.e. 64-bit quadword) integers. they are aligned to an 8-byte ( sizeof(UInt64) ) boundary (i could also align them to 16-byte if that's useful for anything) they are packed together so they are side-by-side in memory How do i load them into an xmm register, e.g. xmm0 : I've found: movq xmm0, v[0] but that only moves v[0] , and sets the upper 64-bits in xmm0 to zeros: xmm0 0000000000000000 24FC18D93B2C9D8F Bonus Questions How do i get them back out? What if they're not side

Job scheduling with minimization by parallel grouping

做~自己de王妃 提交于 2020-07-07 16:16:36
问题 I have a job scheduling problem with a twist- a minimization constraint. The task is- I have many jobs, each with various dependencies on other jobs, without cycles. These jobs have categories as well, and can be ran together in parallel for free if they belong to the same category. So, I want to order the jobs so that each job comes after its dependencies, but arranged in such a way that they are grouped by category (to run many in parallel) to minimize the number of serial jobs I run. That

Job scheduling with minimization by parallel grouping

人盡茶涼 提交于 2020-07-07 16:13:31
问题 I have a job scheduling problem with a twist- a minimization constraint. The task is- I have many jobs, each with various dependencies on other jobs, without cycles. These jobs have categories as well, and can be ran together in parallel for free if they belong to the same category. So, I want to order the jobs so that each job comes after its dependencies, but arranged in such a way that they are grouped by category (to run many in parallel) to minimize the number of serial jobs I run. That

Job scheduling with minimization by parallel grouping

半世苍凉 提交于 2020-07-07 16:11:30
问题 I have a job scheduling problem with a twist- a minimization constraint. The task is- I have many jobs, each with various dependencies on other jobs, without cycles. These jobs have categories as well, and can be ran together in parallel for free if they belong to the same category. So, I want to order the jobs so that each job comes after its dependencies, but arranged in such a way that they are grouped by category (to run many in parallel) to minimize the number of serial jobs I run. That

Job scheduling with minimization by parallel grouping

和自甴很熟 提交于 2020-07-07 16:11:27
问题 I have a job scheduling problem with a twist- a minimization constraint. The task is- I have many jobs, each with various dependencies on other jobs, without cycles. These jobs have categories as well, and can be ran together in parallel for free if they belong to the same category. So, I want to order the jobs so that each job comes after its dependencies, but arranged in such a way that they are grouped by category (to run many in parallel) to minimize the number of serial jobs I run. That