Modules | Alphabetical List | Class List | Directories | File List | GIL Home Page # apply_operation.hpp Go to the documentation of this file.
    00001 /*
    00002     Copyright 2005-2007 Adobe Systems Incorporated
    00003
    00004     Use, modification and distribution are subject to the Boost Software License,
    00005     Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    00006     http://www.boost.org/LICENSE_1_0.txt).
    00007
    00008     See http://opensource.adobe.com/gil for most recent version including documentation.
    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 } }  // namespace boost::gil
    00054
    00055 #else
    00056
    00057 #include "reduce.hpp"
    00058
    00059 #endif
    00060
    00061 #endif