Bug 142

Summary: Vector Ops needed (DOT, Cross, Dist, normalise, CORDIC, S/LERP etc)
Product: Libre-SOC's first SoC Reporter: Luke Kenneth Casson Leighton <lkcl>
Component: SpecificationAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: CONFIRMED ---    
Severity: enhancement CC: konstantinos, libre-soc-bugs
Priority: ---    
Version: unspecified   
Hardware: Other   
OS: Linux   
URL: https://libre-soc.org/openpower/sv/3d_vector_ops/
See Also: https://bugs.libre-soc.org/show_bug.cgi?id=541
https://bugs.libre-soc.org/show_bug.cgi?id=53
https://bugs.libre-soc.org/show_bug.cgi?id=213
NLnet milestone: --- total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0 parent task for budget allocation:
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:
Bug Depends on: 139    
Bug Blocks: 53, 255    

Description Luke Kenneth Casson Leighton 2019-10-05 06:17:59 BST
https://libre-riscv.org/simple_v_extension/vector_ops/

A Vector ops subextension to SimpleV is needed which is characterised by either dependence on nonstandard SUBVL and/or inter-element data interactions.

(Swizzle also falls into this category)
Comment 2 Luke Kenneth Casson Leighton 2019-10-05 08:28:06 BST
Wondering how (whether) to add vec2 cross product and if vec4 cross product exists.

Found this:

vec2D a, b;
...
double z = a.x * b.y - b.x * a.y;
return z;
Comment 3 Luke Kenneth Casson Leighton 2019-10-05 08:31:25 BST
https://stackoverflow.com/questions/10759206/how-to-calculate-vec4-cross-product-with-glm

Answer seems to be no on vec4 cross product because it is called wedge product and is 2 planes.
Comment 4 Luke Kenneth Casson Leighton 2019-10-05 10:41:35 BST
http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2019-October/002956.html
Should VLEN and normalise be macro ops or microcode?
Comment 5 Luke Kenneth Casson Leighton 2022-06-16 12:11:43 BST
(In reply to Luke Kenneth Casson Leighton from comment #2)
> Wondering how (whether) to add vec2 cross product and if vec4 cross product
> exists.
> 
> Found this:
> 
> vec2D a, b;
> ...
> double z = a.x * b.y - b.x * a.y;
> return z;

it *should* be possible to do this by way of the sparse matrix,
making it potentially possible to do in more dimensions than just 2/3.
Comment 6 Luke Kenneth Casson Leighton 2023-04-30 13:15:59 BST
https://libre-soc.org/irclog/%23libre-soc.2023-04-29.log.html#t2023-04-29T22:16:42

should be possible by a Determinant Matrix Schedule to do crossproduct