Skip to content

Commit 8992a05

Browse files
authored
Merge pull request #34 from alicevision/dev_pinErrorMsg
More detailed error message on memory allocation failure
2 parents d8700a1 + 253c253 commit 8992a05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/popsift/features.cu

+4
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,16 @@ void FeaturesHost::pin( )
103103
if( err != cudaSuccess ) {
104104
cerr << __FILE__ << ":" << __LINE__ << " Runtime warning:" << endl
105105
<< " Failed to register feature memory in CUDA." << endl
106+
<< " Features count: " << getFeatureCount() << endl
107+
<< " Memory size requested: " << getFeatureCount() * sizeof(Feature) << endl
106108
<< " " << cudaGetErrorString(err) << endl;
107109
}
108110
err = cudaHostRegister( _ori, getDescriptorCount() * sizeof(Descriptor), 0 );
109111
if( err != cudaSuccess ) {
110112
cerr << __FILE__ << ":" << __LINE__ << " Runtime warning:" << endl
111113
<< " Failed to register descriptor memory in CUDA." << endl
114+
<< " Descriptors count: " << getDescriptorCount() << endl
115+
<< " Memory size requested: " << getDescriptorCount() * sizeof(Descriptor) << endl
112116
<< " " << cudaGetErrorString(err) << endl;
113117
}
114118
}

0 commit comments

Comments
 (0)