30 lines
1.3 KiB
Plaintext
30 lines
1.3 KiB
Plaintext
/*************************************************************************
|
|
* Copyright (C) [2023-2024] by Cambricon, Inc.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*************************************************************************/
|
|
#ifndef CSRC_KERNELS_ADD_SCALAR_MLUH_
|
|
#define CSRC_KERNELS_ADD_SCALAR_MLUH_
|
|
#include "kernel_utils.h"
|
|
|
|
namespace tmo {
|
|
/**
|
|
* @brief Add src with a scalar and save the result to dst.
|
|
* @param queue: The queue for mlu.
|
|
* @param dst: Pointer to the MLU memory of dst.
|
|
* @param src: Pointer to the MLU memory of src.
|
|
* @param count: The elements number in src.
|
|
* @param scalar: The scalar to add.
|
|
* @note: only support int. dst can overlap with src.
|
|
*/
|
|
KernelStatus invokeMLUAddScalar(cnrtQueue_t queue, int *dst, int *src, int count, int scalar);
|
|
} // namespace tmo
|
|
|
|
#endif // CSRC_KERNELS_ADD_SCALAR_MLUH_
|