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

In syncedmem.cpp, functions shall return a value #3321

Merged
merged 1 commit into from
Nov 16, 2015
Merged

In syncedmem.cpp, functions shall return a value #3321

merged 1 commit into from
Nov 16, 2015

Conversation

eelstork
Copy link
Contributor

with CPU_ONLY builds gpu_data() and mutable_gpu_data() must return a value.

@shelhamer
Copy link
Member

NO_GPU triggers a fatal error so the return will never execute; see https://github.com/BVLC/caffe/blob/master/include/caffe/util/device_alternate.hpp#L10. Is this to make a compiler happy?

@eelstork
Copy link
Contributor Author

@shelhamer - Yes, this is to make a compiler happy. Actually I am somewhat surprised that a compiler would accept this at all.

@shelhamer
Copy link
Member

Alright, thanks for the compiler therapy!

shelhamer added a commit that referenced this pull request Nov 16, 2015
…rn-a-value

In syncedmem.cpp, functions shall return a value
@shelhamer shelhamer merged commit 603cbfb into BVLC:master Nov 16, 2015
@eelstork eelstork deleted the synced-mem-functions-will-return-a-value branch November 18, 2015 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants