 bitmaskToExecCapability :: CLDeviceExecCapability_ -> [CLDeviceExecCapability]
 bitmaskToExecCapability mask = filter (testMask mask . fromIntegral . fromEnum) $ binaryFlags maxBound
 
--- -----------------------------------------------------------------------------
+bitmaskFromMemFlags :: [CLMemFlag] -> CLMemFlags_
+bitmaskFromMemFlags = foldl' (.|.) 0 . map (fromIntegral . fromEnum)
+  
+-- -----------------------------------------------------------------------------

  CLCommandQueueProperty(..), CLCommandType(..),  CLCommandExecutionStatus(..), 
  CLProfilingInfo(..), CLImageFormat(..), CLPlatformInfo(..), CLMemFlag(..),
  -- * Functions
  clSuccess, getProfilingInfoValue, getImageFormat, getDeviceTypeValue, 
  getDeviceLocalMemType, getDeviceMemCacheType, getCommandType, 
  getCommandExecutionStatus, bitmaskToDeviceTypes, bitmaskFromDeviceTypes, 
  bitmaskToCommandQueueProperties, bitmaskFromCommandQueueProperties, 
  bitmaskToFPConfig, bitmaskToExecCapability, getPlatformInfoValue )
       where

-- -----------------------------------------------------------------------------

  };
#endc

{-| 
* 'CLBUILD_PROGRAM_FAILURE', Returned if there is a failure to build the
program executable.
