petsc-master 2020-09-19
Report Typos and Errors

# MatMatMatMult

Performs Matrix-Matrix-Matrix Multiplication D=A*B*C.

### Synopsis

```#include "petscmat.h"
PetscErrorCode MatMatMatMult(Mat A,Mat B,Mat C,MatReuse scall,PetscReal fill,Mat *D)
```
Neighbor-wise Collective on Mat

### Input Parameters

 A - the left matrix B - the middle matrix C - the right matrix scall - either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX fill - expected fill as ratio of nnz(D)/(nnz(A) + nnz(B)+nnz(C)), use PETSC_DEFAULT if you do not have a good estimate if the result is a dense matrix this is irrelevent

### Output Parameters

 D - the product matrix

### Notes

Unless scall is MAT_REUSE_MATRIX D will be created.

MAT_REUSE_MATRIX can only be used if the matrices A, B and C have the same nonzero pattern as in the previous call

To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value actually needed.

If you have many matrices with the same non-zero structure to multiply, you should use MAT_REUSE_MATRIX in all calls but the first or
{"ft_lang_label":"__label__en","ft_lang_prob":0.66723967,"math_prob":0.81164515,"size":833,"snap":"2020-34-2020-40","text_gpt3_token_len":213,"char_repetition_ratio":0.1278649,"word_repetition_ratio":0.0,"special_character_ratio":0.2364946,"punctuation_ratio":0.070512824,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98978055,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-20T05:49:38Z\",\"WARC-Record-ID\":\"<urn:uuid:3b049f83-0f86-4cdb-844b-c9ccd53dafce>\",\"Content-Length\":\"4001\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7fa69939-0718-41dc-bd96-9d1bfedbcd24>\",\"WARC-Concurrent-To\":\"<urn:uuid:ed8fcb58-f032-4123-9a82-150cb0794bb2>\",\"WARC-IP-Address\":\"140.221.25.3\",\"WARC-Target-URI\":\"https://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatMatMatMult.html\",\"WARC-Payload-Digest\":\"sha1:HUQFZWJFF2UUHHGEPULBE2I3F3LBDNUY\",\"WARC-Block-Digest\":\"sha1:64W44GPUQVEVKNFUXZXAGKC6SZCAIQ57\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400193391.9_warc_CC-MAIN-20200920031425-20200920061425-00669.warc.gz\"}"}