00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef GIL_APPLY_OPERATION_HPP
00014 #define GIL_APPLY_OPERATION_HPP
00015
00024
00025 #include "apply_operation_base.hpp"
00026 #include "variant.hpp"
00027
00028 #ifndef GIL_REDUCE_CODE_BLOAT
00029
00030 namespace boost { namespace gil {
00031
00034 template <typename Types, typename UnaryOp> GIL_FORCEINLINE
00035 typename UnaryOp::result_type apply_operation(variant<Types>& arg, UnaryOp op) {
00036 return apply_operation_base<Types>(arg._bits, arg._index ,op);
00037 }
00038
00041 template <typename Types, typename UnaryOp> GIL_FORCEINLINE
00042 typename UnaryOp::result_type apply_operation(const variant<Types>& arg, UnaryOp op) {
00043 return apply_operation_basec<Types>(arg._bits, arg._index ,op);
00044 }
00045
00048 template <typename Types1, typename Types2, typename BinaryOp> GIL_FORCEINLINE
00049 typename BinaryOp::result_type apply_operation(const variant<Types1>& arg1, const variant<Types2>& arg2, BinaryOp op) {
00050 return apply_operation_base<Types1,Types2>(arg1._bits, arg1._index, arg2._bits, arg2._index, op);
00051 }
00052
00053 } }
00054
00055 #else
00056
00057 #include "reduce.hpp"
00058
00059 #endif
00060
00061 #endif