Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

How to use SIMD types #97

Open
darknoon opened this issue Jan 24, 2019 · 1 comment
Open

How to use SIMD types #97

darknoon opened this issue Jan 24, 2019 · 1 comment

Comments

@darknoon
Copy link

I tried this:

%library name="simd"
%type name=vector_int2 library=simd canForwardDeclare=false
MyObject {
  NSString *identifier
  vector_int2 position
}

Output:

[error][Thu Jan 24 2019 15:31:14 GMT-0500 (Eastern Standard Time)] [/REDACTED/Broken.value]The Description plugin does not know how to format the type "vector_int2" from MyObject.position. Did you forget to declare a backing type?
[/REDACTED/Broken.value]The Equality plugin does not know how to compare or hash the type "vector_int2" from MyObject.position. Did you forget to declare a backing type?
Successfuly generated 0 objects. Encountered 1 errors in other files

Based on the documentation for a value type, it seems like I can declare an "underlying" type, but vector_int2 can't be composed out of the builtin types.

How do I tell remodel that it's a value type you can compare with == and copy with =? Does this require changes to remodel-gen to support?

@ColinCampbell
Copy link
Contributor

This would require changes in remodel-gen to support unfortunately. We've added quite a few types to it but there isn't a flexible way of telling it about new types in configuration or the type definition :\ This is definitely something that should get added though (through some sort of per-plugin configuration that we could add into the .valueObjectConfig file likely?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants