Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add array cast to pointer #131

Merged
merged 5 commits into from
May 10, 2024
Merged

Add array cast to pointer #131

merged 5 commits into from
May 10, 2024

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented May 9, 2024

Also fixes some GEPs that were not entirely correct, it now uses the gep using the array type and not the array element type.

mod Main {
    pub extern fn puts(data: *mut char) -> i32;

    pub fn main() -> i32 {
        let x: [char; 13] = ['h','e','l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\0'];
        let z: *mut char = x as *mut char;
        puts(z);
        return 0;
    }
}

Copy link

github-actions bot commented May 9, 2024

Benchmarking factorial

Compiling factorial (factorial.con)
Finished release in 29.313253ms
Running 5000000 iterations
Using input value: 20
Concrete Result = 2432902008176640000 Time taken : 59.25 ms
Rust Result = 2432902008176640000 Time taken : 60.13 ms

Benchmarking fib

Compiling fib (fib.con)
Finished release in 26.030158ms
Running 5000 iterations
Using input value: 20
Concrete Result = 6765 Time taken : 137.29 ms
Rust Result = 6765 Time taken : 85.25 ms

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2024

Codecov Report

Attention: Patch coverage is 79.03226% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 61.97%. Comparing base (56a8221) to head (a849920).
Report is 6 commits behind head on main.

Files Patch % Lines
crates/concrete_codegen_mlir/src/codegen.rs 78.99% 25 Missing ⚠️
crates/concrete_ir/src/lib.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
+ Coverage   61.71%   61.97%   +0.25%     
==========================================
  Files          25       25              
  Lines        4532     4610      +78     
==========================================
+ Hits         2797     2857      +60     
- Misses       1735     1753      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from ptr_add to main May 9, 2024 16:41
@juanbono juanbono added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit bc72356 May 10, 2024
6 checks passed
@juanbono juanbono deleted the array_cast branch May 10, 2024 14:23
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.

4 participants