Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interface for ConstFsa #45

Merged
merged 26 commits into from
May 31, 2020
Merged

Add interface for ConstFsa #45

merged 26 commits into from
May 31, 2020

Conversation

danpovey
Copy link
Collaborator

No description provided.

k2/csrc/fsa.h Outdated

int32_t NumFsas() { return num_fsas; }

Cfsa &&operator [] (int32_t f) const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does it return an rvalue reference?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that was when you wanted to move the data? So there aren't unnecessary constructors? I may misunderstand.

k2/csrc/fsa.h Outdated Show resolved Hide resolved
k2/csrc/fsa.h Outdated
int32_t num_fsas;

// The raw underlying data
int32_t *data;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we disable its copy constructor and assignment operator?

k2/csrc/fsa.h Outdated Show resolved Hide resolved
@csukuangfj
Copy link
Collaborator

@danpovey
Have you finished the interface? I would like to write the implementation.

@danpovey
Copy link
Collaborator Author

danpovey commented May 30, 2020 via email

@danpovey
Copy link
Collaborator Author

danpovey commented May 30, 2020 via email

@csukuangfj
Copy link
Collaborator

@danpovey
As for the Python interface, should we depend on torch::Tensor in c++ directly?

@danpovey
Copy link
Collaborator Author

danpovey commented May 30, 2020 via email

@danpovey
Copy link
Collaborator Author

danpovey commented May 30, 2020 via email

@csukuangfj
Copy link
Collaborator

thanks, I see.

@csukuangfj
Copy link
Collaborator

There are conflicts now. Could you please resolve them and then merge?
I'll add implementation tomorrow.

@csukuangfj
Copy link
Collaborator

Merging now. If there are any problems, they can be fixed later.

@csukuangfj csukuangfj merged commit 71c7fc2 into master May 31, 2020
@qindazhu qindazhu deleted the cfsa_etc branch July 18, 2020 15:16
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