Cal
功能描述
计算公式
- asdBlasSscal
- 计算公式:
- 计算公式:
- asdBlasCsscal
- 计算公式:
- 计算公式:
- asdBlasCscal
接口原型
- AspbStatus asdBlasMakeCalPlan(asdBlasHandle handle)
- AspbStatus asdBlasSscal(asdBlasHandle handle, const int64_t n, const float *alpha, aclTensor *x, const int64_t incx)
- AspbStatus asdBlasCsscal(asdBlasHandle handle, const int64_t n, const float *alpha, aclTensor *x, const int64_t incx)
- AspbStatus asdBlasCscal(asdBlasHandle handle, const int64_t n, const std::complex<float> *alpha, aclTensor *x,const int64_t incx)
参数列表
- asdBlasMakeCalPlan
参数名称
Input/Output
类型
描述
handle
Input
asdBlasHandle
cal算子的句柄。
- asdBlasSscal & asdBlasCsscal & asdBlasCscal
参数名称
Input/Output
类型
描述
handle
Input
asdBlasHandle
sscal算子的句柄。
n
Input
const int64_t
总的元素个数。
alpha
Input
const float *
公式中的alpha,向量的缩放因子。
x
Input/Output
aclTensor *
公式中的x,Device侧的Tensor,数据类型支持FLOAT32,数据格式支持ND,shape为[n]。
incx
Input
const int64_t
相邻元素间的内存地址偏移量(当前约束为1)。
规格约束
- asdBlasMakeCalPlan:无。
- asdBlasSscal
- 输入的元素个数当前覆盖支持[1,6.71e+06];
- 算子输入shape为[n],输出shape为[n];
- 算子实际计算时,不支持ND高维度运算(不支持维度≥3的运算)。
- asdBlasCsscal
- 输入的元素个数当前覆盖支持[1,6.71e+06];
- 算子输入shape为[n],输出shape为[n];
- 算子实际计算时,不支持ND高维度运算(不支持维度≥3的运算)。
- asdBlasCscal
- 输入的元素个数当前覆盖支持[1,6.71e+06];
- 算子输入shape为[n],输出shape为[n];
- 算子实际计算时,不支持ND高维度运算(不支持维度≥3的运算)
父主题: BLAS