summaryrefslogtreecommitdiff
path: root/vector.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-03-01 20:51:37 +0100
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:45 +0200
commit4c21b2ea8d42a92e2f1cbfd93346ff77041ea44d (patch)
tree32b955a06368886d4df77c0e2bfb53ef137580ef /vector.h
parent4d2d896e28446928d820bf1353abcf40e3f66ed8 (diff)
downloadpucket-4c21b2ea8d42a92e2f1cbfd93346ff77041ea44d.tar.gz
pucket-4c21b2ea8d42a92e2f1cbfd93346ff77041ea44d.tar.bz2
pucket-4c21b2ea8d42a92e2f1cbfd93346ff77041ea44d.zip
Fix colormap segfault
The segfaults due to unaligned vector access should have happened before the recent changes. Not sure why it worked before. Reverts colormap vectorization. This is going to be restored once I rework the colormaps.
Diffstat (limited to 'vector.h')
-rw-r--r--vector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/vector.h b/vector.h
index 2c4ff52..f914500 100644
--- a/vector.h
+++ b/vector.h
@@ -14,3 +14,8 @@ typedef double double4 __attribute__ ((vector_size (sizeof (double)*4)));
typedef unsigned int uint2 __attribute__ ((vector_size (sizeof (unsigned int)*2)));
#endif
+inline double4 vector_d4 (const double c[4]) {
+ return (double4) { c[0], c[1], c[2], c[3] };
+}
+
+