Closed qc20000sj closed 1 month ago
Is that M4RI code you are writing? Looks more like GMP?
M4RI support is mostly intended for applications that want to use MCCL library with M4RI matrices. Or to use M4RI algorithm implementations on MCCL matrices.
You need to enable M4RI at configure time:
./configure --with-m4ri
.
You also need to include mccl/core/matrix_m4ri.hpp
.
Now you can call the functions specified in that header library.
The basic concept is that you create a M4RI handle for a MCCL matrix, which you can then use for M4RI functions calls.
I need to search several times, so I want to convert the result ISD_stern_dumer.get_solution()
to the mzd_t*
in the m4ri library and store it. And I need a lot of operations based on the m4ri library. What should I do?
M4RI support is quite experimental, and isn't deeply supported yet. Deep down M4RI and MCCL have very similar memory layout for binary matrices and vectors, so it isn't too hard to make them work together by manually creating handles / views. I don't have much more expertise to help you further, so you'll have to figure some things out yourself. I would suggest to look at everything written in matrix_m4ri.hpp and matrix_m4ri.cpp. If you manage to get better support code for M4RI and MCCL then a PR would be greatly appreciated to further help the community with similar issues.
Thanks for you reply very much.
Now I face a problem.When I ues test_mmt.cpp
, I set n=10000,w=10
, but the program can't find any results. How should I solve this problem?Thank you.
Aren't you just giving it a too large problem, and it would take too long to find a solution.
The program reports error results as follows:
terminate called after throwing an instance of 'std::runtime_error' what(): ISD_generic::callback: internal error 2: solution is incorrect!
And I use test_dumer.cpp
, this program can search for results.
I used your program to solve the following problem:
Given Code word matrix C
, find a vector h
, s.t. ChT=0, wt(h)<=w.(Vector hT is the transpose of h).
I have solved this problem using the test_dumer.cpp
program. I want to see if using test_mmt.cpp
will find the desired ground vector h faster. However, when I tried to solve the above problem using the test_mmt.cpp
program, I set n=10000,w=10, but the program said: internal error 2: solution is incorrect!
This seems a bug in the MMT implementation. Could you start a new issue and give a minimal problematic example (code & data) that we can test and debug?
Ok,Thank you very much.
I want to use m4ri in test_dumer.cpp ,for example mzd_t* h=mzd_init(1,2). What should I do?