MCPcopy Index your code
hub / github.com/arrayfire/arrayfire-rust / generate

Method generate

src/core/data.rs:142–154  ·  view source on GitHub ↗
(&self, dims: Dim4)

Source from the content-addressed store, hash-verified

140 type OutType = i64;
141
142 fn generate(&self, dims: Dim4) -> Array<Self::OutType> {
143 unsafe {
144 let mut temp: af_array = std::ptr::null_mut();
145 let err_val = af_constant_long(
146 &mut temp as *mut af_array,
147 *self,
148 dims.ndims() as c_uint,
149 dims.get().as_ptr() as *const dim_t,
150 );
151 HANDLE_ERROR(AfError::from(err_val));
152 temp.into()
153 }
154 }
155}
156
157impl ConstGenerator for u64 {

Callers 1

constantFunction · 0.80

Calls 4

HANDLE_ERRORFunction · 0.85
ndimsMethod · 0.80
intoMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected