cleancode r1.9 for python and cpp 1009

This commit is contained in:
zhanzhan1 2022-10-09 17:17:40 +08:00
parent f4727bc937
commit 2711fe6655
2 changed files with 7 additions and 7 deletions

View File

@ -151,7 +151,7 @@ class MSPhiloxRandom {
return result;
}
void RaiseKey(Key *key) {
void RaiseKey(Key *const key) {
(*key)[kIndex0] += kMSPhiloxW32A;
(*key)[kIndex1] += kMSPhiloxW32B;
}

View File

@ -20,12 +20,12 @@ from mindspore.ops import operations as P
from mindspore.ops import functional as F
from mindspore.ops.primitive import constexpr
from mindspore.ops.composite.multitype_ops import _constexpr_utils as const_utils
from ...common import dtype as mstype
from ...common.seed import _get_graph_seed
from ...common.tensor import Tensor
from ..operations.random_ops import RandomShuffle
from .._primitive_cache import _get_cache_prim
from .._utils import get_broadcast_shape
from mindspore.common import dtype as mstype
from mindspore.common.seed import _get_graph_seed
from mindspore.common.tensor import Tensor
from mindspore.ops.operations.random_ops import RandomShuffle
from mindspore.ops._primitive_cache import _get_cache_prim
from mindspore.ops._utils import get_broadcast_shape
def random_gamma(shape, alpha, seed=0, seed2=0):