/*******************************************************
 * Copyright (c) 2015, ArrayFire
 * All rights reserved.
 *
 * This file is distributed under 3-clause BSD license.
 * The complete license agreement can be obtained at:
 * http://arrayfire.com/licenses/BSD-3-Clause
 ********************************************************/
#pragma once
#include <af/dim4.hpp>
#include <Array.hpp>

namespace opencl
{
    template<typename T>
    void select(Array<T> &out, const Array<char> &cond, const Array<T> &a, const Array<T> &b);

    template<typename T, bool flip>
    void select_scalar(Array<T> &out, const Array<char> &cond, const Array<T> &a, const double &b);

    template<typename T>
    Array<T> createSelectNode(const Array<char> &cond,
                              const Array<T> &a, const Array<T> &b,
                              const af::dim4 &odims);

    template<typename T, bool flip>
    Array<T> createSelectNode(const Array<char> &cond,
                              const Array<T> &a, const double &b_val,
                              const af::dim4 &odims);
}
