Revision: 53803
          http://brlcad.svn.sourceforge.net/brlcad/?rev=53803&view=rev
Author:   brlcad
Date:     2012-11-24 16:41:37 +0000 (Sat, 24 Nov 2012)
Log Message:
-----------
the header does not declare an aligned boolean and could be accommodated in 
other ways internally (copy to an aligned array).  just document the assertion.

Modified Paths:
--------------
    brlcad/trunk/include/vector_x86.h

Modified: brlcad/trunk/include/vector_x86.h
===================================================================
--- brlcad/trunk/include/vector_x86.h   2012-11-24 16:35:04 UTC (rev 53802)
+++ brlcad/trunk/include/vector_x86.h   2012-11-24 16:41:37 UTC (rev 53803)
@@ -62,20 +62,24 @@
 }
 
 template<int LEN>
-inline dvec<LEN>::dvec(const double* vals, bool aligned)
+inline dvec<LEN>::dvec(const float* vals)
 {
-    if (aligned) {
-       for (int i = 0; i < LEN/2; i++) {
-           data.v[i] = _mm_load_pd(&vals[i*2]);
-       }
-    } else {
-       for (int i = 0; i < LEN/2; i++) {
-           data.v[i] = _mm_loadu_pd(&vals[i*2]);
-       }
+    for (int i = 0; i < LEN/2; i++) {
+       /* NOTE: assumes that vals are 16-byte aligned */
+       data.v[i] = _mm_load_ps(&vals[i*2]);
     }
 }
 
 template<int LEN>
+inline dvec<LEN>::dvec(const double* vals)
+{
+    for (int i = 0; i < LEN/2; i++) {
+       /* NOTE: assumes that vals are 16-byte aligned */
+       data.v[i] = _mm_load_pd(&vals[i*2]);
+    }
+}
+
+template<int LEN>
 inline dvec<LEN>::dvec(const dvec<LEN>& p)
 {
     for (int i = 0; i < LEN/2; i++) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to