Skip to content

Rcpp interface#293

Open
Chandraveersingh1717 wants to merge 5 commits intomlverse:mainfrom
Chandraveersingh1717:rcpp-interface
Open

Rcpp interface#293
Chandraveersingh1717 wants to merge 5 commits intomlverse:mainfrom
Chandraveersingh1717:rcpp-interface

Conversation

@Chandraveersingh1717
Copy link
Contributor

What this does

Adds a C++ implementation for calculating bounding box areas using Rcpp. This is for the GSoC "Rcpp interface" task.

Why

This demonstrates:

  • Writing C++ code that works with R
  • Using Rcpp to expose C++ functions
  • Handling parameters (NumericMatrix input, NumericVector output)
  • Input validation and error handling
  • Making it work with torch tensors and regular matrices

Usage

# Works with matrices
boxes <- matrix(c(0, 0, 10, 10), nrow = 1)
box_area_cpp(boxes)  # returns 100

# Also works with torch tensors
box_area_fast(torch_tensor(boxes))

@Chandraveersingh1717
Copy link
Contributor Author

Can you review this PR
Is there something I need to fix or any reason for which it still haven't gotten reviewed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant