forked from FutureSDR/FutureSDR
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
93 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# [build] | ||
# target = "wasm32-unknown-unknown" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
perf-data | ||
wgpu.pdf | ||
*.log | ||
*.log | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build] | ||
target = "index.html" | ||
dist = "dist" |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link data-trunk rel="icon" href="assets/favicon.ico"/> | ||
<link data-trunk rel="rust" data-bin="perf" data-wasm-opt="4" data-weak-refs data-reference-types/> | ||
<title>FutureSDR :: WGPU Perf</title> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
use futuresdr::anyhow::Result; | ||
|
||
#[cfg(not(target_arch = "wasm32"))] | ||
mod foo { | ||
use clap::Parser; | ||
use futuresdr::anyhow::Result; | ||
|
||
#[derive(Parser, Debug)] | ||
struct Args { | ||
#[clap(short, long, default_value_t = 0)] | ||
run: u64, | ||
#[clap(short = 'S', long, default_value = "smol1")] | ||
scheduler: String, | ||
#[clap(short, long, default_value_t = 1000000)] | ||
samples: u64, | ||
#[clap(short, long, default_value_t = 4096)] | ||
buffer_size: u64, | ||
} | ||
|
||
pub fn main() -> Result<()> { | ||
let Args { | ||
run, | ||
scheduler, | ||
samples, | ||
buffer_size, | ||
} = Args::parse(); | ||
|
||
futuresdr::async_io::block_on(perf_wgpu::run(run, scheduler, samples, buffer_size))?; | ||
Ok(()) | ||
} | ||
} | ||
|
||
#[cfg(target_arch = "wasm32")] | ||
mod foo { | ||
use futuresdr::anyhow::Result; | ||
use leptos::*; | ||
|
||
#[component] | ||
/// Main GUI | ||
fn Gui() -> impl IntoView { | ||
let start = move |_| { | ||
leptos::spawn_local(async { | ||
perf_wgpu::run(0, "wasm".to_string(), 1000000, 32768) | ||
.await | ||
.unwrap(); | ||
}); | ||
}; | ||
view! { | ||
<h1>"FutureSDR WGPU Perf"</h1> | ||
<button on:click=start type="button" class="bg-fs-blue hover:brightness-75 text-slate-200 font-bold py-2 px-4 rounded">Start</button> | ||
} | ||
} | ||
|
||
pub fn main() -> Result<()> { | ||
_ = console_log::init_with_level(futuresdr::log::Level::Debug); | ||
console_error_panic_hook::set_once(); | ||
mount_to_body(|| view! { <Gui /> }); | ||
Ok(()) | ||
} | ||
} | ||
|
||
fn main() -> Result<()> { | ||
foo::main() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.