Skip to content

Conversation

yekatkov
Copy link
Contributor

No description provided.

NeoML-maintainer and others added 25 commits January 14, 2021 23:36
vectorFill replaced by std::fill_n
dataCopy replaced by std::copy

Signed-off-by: Yury Katkov <[email protected]>
Signed-off-by: Yury Katkov <[email protected]>
Extract common code for simple math primitives.

Signed-off-by: Yury Katkov <[email protected]>

sseSize -= 4;
if( vectorSize > 0 ) {
memcpy( dst, src, vectorSize * sizeof( T ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Какая-то непоследовательность. Если std::fill_n, тогда std::copy_n, зачем memcpy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, согласен. copy_n будет лучше смотреться

}
genInst.lock.unlock();
return genInst.gen.getCode();
return reinterpret_cast<void*>( const_cast<uint8_t*>( genInst.gen.getCode() ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хватило бы static_cast, а reinterpret_cast - перебор.

Fix PR comment.

Signed-off-by: Yury Katkov <[email protected]>
Signed-off-by: Yury Katkov <[email protected]>
@favorart favorart added the performance Changes of performance improvements only label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Changes of performance improvements only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants