We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ncnn::Mat in(128, 128); in.fill(2.0f); fprintf(stderr, "%f\n", in.row(0)[0]);//此处打印2.000000
ncnn::Mat intest(128,128); intest.fill(2); const int* readonly_ptr = intest; fprintf(stderr, "intest fill row %d\n", intest.row(0)[0]);//此处打印0 fprintf(stderr, "intest fill ptr %d\n", *readonly_ptr);//此处打印2
以fill填充int、float访问方式不同吗?
The text was updated successfully, but these errors were encountered:
使用mat.row要指定类型 fprintf(stderr, "intest fill row %d\n", intest.row<int>(0)[0]);
Sorry, something went wrong.
No branches or pull requests
ncnn::Mat in(128, 128);
in.fill(2.0f);
fprintf(stderr, "%f\n", in.row(0)[0]);//此处打印2.000000
ncnn::Mat intest(128,128);
intest.fill(2);
const int* readonly_ptr = intest;
fprintf(stderr, "intest fill row %d\n", intest.row(0)[0]);//此处打印0
fprintf(stderr, "intest fill ptr %d\n", *readonly_ptr);//此处打印2
以fill填充int、float访问方式不同吗?
The text was updated successfully, but these errors were encountered: