2010/8/18 Tim Blechmann <[email protected]>: > hi dan, > >> I'm thinking about implementing an ARM NEON flavour for nova-simd. I >> have some questions... > > great! > >> In common/include/nova-simd/vec.hpp, vec_generic.hpp is always >> included, even if SSE - so is there a kind of override semantics going >> on here, i.e. anything not implemented in vec_sse.hpp falls back to >> the vec_generic implementation? >> >> Why does vec_generic say >> template <typename float_type> >> struct vec >> when vec_sse says >> template <> >> struct vec<float> >> ? > > it is template specialization. the templated class is the generic version, but > we can implement specialized versions for certain types.
Ah I see, so the generic code would still be used if someone was processing doubles or ints. Interesting. >> Why "typedef __m128 internal_vector_type"? I don't see the latter used >> anywhere. > > i was thinking to use it for some generic implementations, for now, i haven't > used it ... > > >> If implementing a NEON version, can I implement any subset of >> optimised instructions that I choose, or are there risks of breakage? >> (At the moment I'm not worrying whether the implementation is optimal >> or not, just whether I can implement it incrementally without >> jeopardising correctness.) For example, I might start with neon >> versions of load() store() get() set() before getting on to the actual >> manipulations after that. > > i think, you will need to implement the full interface to run the testsuite. > but for the first, you can probably use the generic version and replace > float_type data_[size]; > with the data type, that specifies a float register. OK, thanks. It would be v good to run the testsuite, but on Android that's not so straightforward since I'd have to turn it into libs and invoke them from Java! Ick. >> It looks to me like I don't need to worry about leftovers (e.g. the >> last 3 floats in an array of size 19), they're handled elsewhere and I >> just need to deal with my chosen-sized chunks (i.e. 128-bit). That's >> correct? > > there are non-simd versions of all algorithms. the selection of the code is > done in the ugen code, depending on the control rate ... OK grand. Thanks - Dan _______________________________________________ nova-dev mailing list [email protected] http://klingt.org/cgi-bin/mailman/listinfo/nova-dev http://tim.klingt.org/nova
