未验证 提交 08186f14 编写于 作者: Z Zhang Zheng 提交者: GitHub

Correct spelling errors (#46108)

上级 268f097e
......@@ -20,7 +20,7 @@
namespace phi {
template <typename InT, typename OutT>
struct CastFuctor {
struct CastFunctor {
__device__ __forceinline__ OutT operator()(const InT x) const {
return static_cast<OutT>(x);
}
......@@ -36,7 +36,7 @@ void CastCUDAKernelImpl(const GPUContext& dev_ctx,
outputs.emplace_back(out);
dev_ctx.Alloc<OutT>(out);
phi::funcs::ElementwiseKernel<OutT>(
dev_ctx, inputs, &outputs, CastFuctor<InT, OutT>());
dev_ctx, inputs, &outputs, CastFunctor<InT, OutT>());
}
} // namespace phi
......@@ -20,11 +20,11 @@ limitations under the License. */
namespace phi {
template <typename InT, typename OutT = InT>
struct FullFuctor {
struct FullFunctor {
OutT value;
template <typename VType>
explicit inline FullFuctor(VType val) {
explicit inline FullFunctor(VType val) {
value = static_cast<OutT>(val);
}
......@@ -50,7 +50,7 @@ void FullKernel(const Context& dev_ctx,
// the data will not be loaded in the kernel because the number of
// parameters in the operator is 0
phi::funcs::ElementwiseKernel<T>(
dev_ctx, inputs, &outputs, FullFuctor<T>(val.to<T>()));
dev_ctx, inputs, &outputs, FullFunctor<T>(val.to<T>()));
}
}
......@@ -104,7 +104,7 @@ void FullLikeKernel(const Context& dev_ctx,
int numel = out->numel();
if (numel > 0) {
phi::funcs::ElementwiseKernel<T>(
dev_ctx, inputs, &outputs, FullFuctor<T>(value));
dev_ctx, inputs, &outputs, FullFunctor<T>(value));
}
}
......
......@@ -23,11 +23,11 @@ limitations under the License. */
namespace phi {
template <typename InT, typename OutT = InT>
struct FullFuctor {
struct FullFunctor {
OutT value;
template <typename VType>
explicit inline FullFuctor(VType val) {
explicit inline FullFunctor(VType val) {
value = static_cast<OutT>(val);
}
......@@ -54,7 +54,7 @@ void CooFullLikeKernel(const Context& dev_ctx,
int numel = values->numel();
if (numel > 0) {
phi::funcs::ElementwiseKernel<T>(
dev_ctx, inputs, &outputs, FullFuctor<T>(val.to<T>()));
dev_ctx, inputs, &outputs, FullFunctor<T>(val.to<T>()));
}
out->set_dims(x.dims());
}
......@@ -80,7 +80,7 @@ void CsrFullLikeKernel(const Context& dev_ctx,
int numel = values->numel();
if (numel > 0) {
phi::funcs::ElementwiseKernel<T>(
dev_ctx, inputs, &outputs, FullFuctor<T>(val.to<T>()));
dev_ctx, inputs, &outputs, FullFunctor<T>(val.to<T>()));
}
out->set_dims(x.dims());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册