Skip to content

Comments

Implement fmod, remainder, equal in Cutorch#603

Merged
soumith merged 3 commits intotorch:masterfrom
killeent:remainder
Nov 16, 2016
Merged

Implement fmod, remainder, equal in Cutorch#603
soumith merged 3 commits intotorch:masterfrom
killeent:remainder

Conversation

@killeent
Copy link
Contributor

Please pay special attention in review to equal. Fmod/Remainder were both similar to existing cutorch functions, they simply required new Op definitions.

@soumith soumith merged commit 857f6d2 into torch:master Nov 16, 2016
// 1 if the two tensors are equal at a position, otherwise 0. If the minimum value
// in this buffer is 1, the two tensors are equal, otherwise they are not

THLongStorage *size = THCTensor_(newSizeOf)(state, self_);
Copy link
Member

Choose a reason for hiding this comment

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

i merged this a tad bit prematurely, but ugh this is a memory leak.
you need to free size after using it
THLongStorage_free(size)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants