Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brosnanyuen/raybnn_cell
Cell Position Generator for RayBNN
https://github.com/brosnanyuen/raybnn_cell
biological-simulations biology cell cells cuda gpu opencl parallel physics raybnn rust
Last synced: 3 months ago
JSON representation
Cell Position Generator for RayBNN
- Host: GitHub
- URL: https://github.com/brosnanyuen/raybnn_cell
- Owner: BrosnanYuen
- License: gpl-3.0
- Created: 2023-10-12T05:14:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-18T05:54:39.000Z (8 months ago)
- Last Synced: 2024-11-06T09:16:00.897Z (3 months ago)
- Topics: biological-simulations, biology, cell, cells, cuda, gpu, opencl, parallel, physics, raybnn, rust
- Language: Rust
- Homepage:
- Size: 109 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RayBNN_Cell
Cell posiition generation library for RayBNN using GPUs, CPUs, and FPGAs via CUDA, OpenCL, and oneAPI
# Install Arrayfire
Install the Arrayfire 3.9.0 binaries at [https://arrayfire.com/binaries/](https://arrayfire.com/binaries/)
or build from source
[https://github.com/arrayfire/arrayfire/wiki/Getting-ArrayFire](https://github.com/arrayfire/arrayfire/wiki/Getting-ArrayFire)# Add to Cargo.toml
```
arrayfire = { version = "3.8.1", package = "arrayfire_fork" }
rayon = "1.7.0"
num = "0.4.1"
num-traits = "0.2.16"
half = { version = "2.3.1" , features = ["num-traits"] }
RayBNN_DataLoader = "2.0.3"
RayBNN_Cell = "2.0.3"
```# List of Examples
# Generate Cells and Check them for Collisions
```//Generate Random Uniform Cells within a Sphere
let mut cell_pos: arrayfire::Array = RayBNN_Cell::Hidden::Sphere::generate_uniform_sphere_position(&modeldata_float, &modeldata_int);//Get indicies of non colliding cells
let idx = RayBNN_Cell::Hidden::Sphere::check_cell_collision_minibatch(
&modeldata_float,
&cell_pos
);let idx = arrayfire::locate(&idx);
//Select non colliding cells
cell_pos = arrayfire::lookup(&cell_pos, &idx, 0);```
# Types of cell collision checkers
```
//Checks One by one
let idx = RayBNN_Cell::Hidden::Sphere::check_cell_collision_serial(
&modeldata_float,
&cell_pos
);//Checks All cells at once
let idx = RayBNN_Cell::Hidden::Sphere::check_cell_collision_batch(
&modeldata_float,
&cell_pos
);//Checks in minibatches
let idx = RayBNN_Cell::Hidden::Sphere::check_cell_collision_minibatch(
&modeldata_float,
&cell_pos
);```
# Generate Input Neuron Positions
```
let input_neurons: arrayfire::Array = RayBNN_Cell::Input::Sphere::create_spaced_neurons_1D(
sphere_rad,
input_size,
);
```