mirror of
https://github.com/fverdugo/XM_40017.git
synced 2026-07-01 19:10:34 +02:00
Automatically convert images to base64
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
```@meta
|
||||
EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/julia_distributed_test.ipynb"
|
||||
```
|
||||
|
||||
```@raw html
|
||||
<div class="admonition is-success">
|
||||
<header class="admonition-header">Tip</header>
|
||||
<div class="admonition-body">
|
||||
<ul>
|
||||
<li>
|
||||
Download this notebook and run it locally on your machine [recommended]. Click <a href="notebooks/julia_distributed_test.ipynb" download>here</a>.
|
||||
</li>
|
||||
<li>
|
||||
You can also run this notebook in the cloud using Binder. Click <a href="https://mybinder.org/v2/gh/fverdugo/XM_40017/gh-pages?filepath=dev/notebooks/julia_distributed_test.ipynb">here</a>
|
||||
.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
```@raw html
|
||||
<iframe id="notebook" src="../notebook-output/julia_distributed_test.html" style="width:100%"></iframe>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
var myIframe = document.getElementById("notebook");
|
||||
iFrameResize({log:true}, myIframe);
|
||||
});
|
||||
</script>
|
||||
```
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d6d12733",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Solution to Matrix Multiplication Exercises\n",
|
||||
"\n",
|
||||
"## Implementation of Algorithm 3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "be73e87a",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"function matmul_dist_3!(C,A,B)\n",
|
||||
" m = size(C,1)\n",
|
||||
" n = size(C,2)\n",
|
||||
" l = size(A,2)\n",
|
||||
" @assert size(A,1) == m\n",
|
||||
" @assert size(B,2) == n\n",
|
||||
" @assert size(B,1) == l\n",
|
||||
" @assert mod(m,nworkers()) == 0\n",
|
||||
" # Implement here\n",
|
||||
" nrows_w = div(m,nworkers())\n",
|
||||
" @sync for (i,w) in enumerate(workers())\n",
|
||||
" rows_w = (1:nrows_w) .+ (i-1)*nrows_w\n",
|
||||
" Aw = A[rows_w,:]\n",
|
||||
" ftr = @spawnat w begin\n",
|
||||
" Cw = similar(Aw,nrows_w,n)\n",
|
||||
" matmul_seq!(Cw,Aw,B)\n",
|
||||
" Cw\n",
|
||||
" end\n",
|
||||
" @async C[rows_w,:] = fetch(ftr)\n",
|
||||
" end\n",
|
||||
" C\n",
|
||||
"end"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Julia 1.9.1",
|
||||
"language": "julia",
|
||||
"name": "julia-1.9"
|
||||
},
|
||||
"language_info": {
|
||||
"file_extension": ".jl",
|
||||
"mimetype": "application/julia",
|
||||
"name": "julia",
|
||||
"version": "1.9.1"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
```@meta
|
||||
EditURL = "https://github.com/fverdugo/XM_40017/blob/main/docs/src/notebooks/sol_matrix_matrix.ipynb"
|
||||
```
|
||||
|
||||
```@raw html
|
||||
<div class="admonition is-success">
|
||||
<header class="admonition-header">Tip</header>
|
||||
<div class="admonition-body">
|
||||
<ul>
|
||||
<li>
|
||||
Download this notebook and run it locally on your machine [recommended]. Click <a href="notebooks/sol_matrix_matrix.ipynb" download>here</a>.
|
||||
</li>
|
||||
<li>
|
||||
You can also run this notebook in the cloud using Binder. Click <a href="https://mybinder.org/v2/gh/fverdugo/XM_40017/gh-pages?filepath=dev/notebooks/sol_matrix_matrix.ipynb">here</a>
|
||||
.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
```@raw html
|
||||
<iframe id="notebook" src="../notebook-output/sol_matrix_matrix.html" style="width:100%"></iframe>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
var myIframe = document.getElementById("notebook");
|
||||
iFrameResize({log:true}, myIframe);
|
||||
});
|
||||
</script>
|
||||
```
|
||||
Reference in New Issue
Block a user