Skip to content

Possible bug in sum_by_key #219

@JonathanWoollett-Light

Description

@JonathanWoollett-Light

I have used arrayfire::sum_by_key in its most basic test case and it still produces this error.

While there exists no example in the rust docs, from checking documentation at: http://arrayfire.org/docs/group__reduce__func__sum__by__key.htm

I cannot see a way to simplify my usage.

Attached test project: af_sum_by_key_test.zip

Code:

use arrayfire::{af_print,print_gen,Array,Dim4,sum_by_key};

fn main() {
    println!("Hello, world!");

    let keys = Array::<u32>::new(&[0,0,0,1,1,1],Dim4::new(&[6,1,1,1]));
    af_print!("keys:",keys);
    let vals = Array::<u32>::new(&[1,2,3,4,5,6],Dim4::new(&[6,1,1,1]));
    af_print!("vals:",vals);
    
    let sum_by_key = sum_by_key(&keys,&vals,0i32);
    af_print!("sum_by_key keys:",sum_by_key.0);
    af_print!("sum_by_key vals:",sum_by_key.1);
}

Full error:

thread 'main' panicked at 'Error message: Error either in ArrayFire or in a project upstream
Last error: OpenCL Error (-11): Build Program Failure when calling clBuildProgram', C:\Users\jonat\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.7.0\src\error.rs:40:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: process didn't exit successfully: `target\debug\af_sum_by_key_test.exe` (exit code: 101)

Using windows.
ArrayFire 3.7.1 installed.
System environment variable AF_PATH_v3 set as C:\Program Files\ArrayFire\v3.
System environment variable Path contains C:\Program Files\ArrayFire\v3\lib.

I apologise if this is not an error and it is my own mistake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions