[Mesa-dev] [PATCH libclc] Add bitselect builtin

Tom Stellard tom at stellard.net
Thu May 23 10:48:13 PDT 2013


From: Tom Stellard <thomas.stellard at amd.com>

---
 generic/include/clc/clc.h                  | 1 +
 generic/include/clc/relational/bitselect.h | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 generic/include/clc/relational/bitselect.h

diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index d2858a8..b53a217 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -80,6 +80,7 @@
 
 /* 6.11.6 Relational Functions */
 #include <clc/relational/any.h>
+#include <clc/relational/bitselect.h>
 #include <clc/relational/select.h>
 
 /* 6.11.8 Synchronization Functions */
diff --git a/generic/include/clc/relational/bitselect.h b/generic/include/clc/relational/bitselect.h
new file mode 100644
index 0000000..e91cbfd
--- /dev/null
+++ b/generic/include/clc/relational/bitselect.h
@@ -0,0 +1 @@
+#define bitselect(x, y, z) ((x) ^ ((z) & ((y) ^ (x))))
-- 
1.8.1.5



More information about the mesa-dev mailing list