From 3dd6173a657690c96405e726a1943f8e1c1d4ecd Mon Sep 17 00:00:00 2001 From: Evghenii Date: Mon, 11 Nov 2013 12:25:15 +0100 Subject: [PATCH] added packed_store_active that can be called with active flag --- stdlib.ispc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib.ispc b/stdlib.ispc index b6be0cdb..25728ed0 100644 --- a/stdlib.ispc +++ b/stdlib.ispc @@ -1276,6 +1276,11 @@ packed_store_active(uniform int a[], int vals) { return __packed_store_active(a, vals, (IntMaskType)__mask); } +static inline uniform int +packed_store_active(bool active, uniform int a[], int vals) { + return __packed_store_active(a, vals, (IntMaskType)(-(int)active)); +} + /////////////////////////////////////////////////////////////////////////// // System information