MLX
Loading...
Searching...
No Matches
scan.h File Reference

Go to the source code of this file.

Classes

struct  CumSum< U >
 
struct  CumProd< U >
 
struct  CumProd< bool >
 
struct  CumMax< U >
 
struct  CumMin< U >
 

Functions

template<typename T , typename U , int N_READS, bool reverse>
void load_unsafe (U values[N_READS], const device T *input)
 
template<typename T , typename U , int N_READS, bool reverse>
void load_safe (U values[N_READS], const device T *input, int start, int total, U init)
 
template<typename U , int N_READS, bool reverse>
void write_unsafe (U values[N_READS], device U *out)
 
template<typename U , int N_READS, bool reverse>
void write_safe (U values[N_READS], device U *out, int start, int total)
 
template<typename T , typename U , typename Op , int N_READS, bool inclusive, bool reverse>
void contiguous_scan (const device T *in, device U *out, const constant size_t &axis_size, uint gid, uint lid, uint lsize, uint simd_size, uint simd_lane_id, uint simd_group_id)
 
template<typename T , typename U , typename Op , int N_READS, bool inclusive, bool reverse>
void strided_scan (const device T *in, device U *out, const constant size_t &axis_size, const constant size_t &stride, uint2 gid, uint2 lid, uint2 lsize, uint simd_size)
 

Function Documentation

◆ contiguous_scan()

template<typename T , typename U , typename Op , int N_READS, bool inclusive, bool reverse>
void contiguous_scan ( const device T * in,
device U * out,
const constant size_t & axis_size,
uint gid,
uint lid,
uint lsize,
uint simd_size,
uint simd_lane_id,
uint simd_group_id )

◆ load_safe()

template<typename T , typename U , int N_READS, bool reverse>
void load_safe ( U values[N_READS],
const device T * input,
int start,
int total,
U init )
inline

◆ load_unsafe()

template<typename T , typename U , int N_READS, bool reverse>
void load_unsafe ( U values[N_READS],
const device T * input )
inline

◆ strided_scan()

template<typename T , typename U , typename Op , int N_READS, bool inclusive, bool reverse>
void strided_scan ( const device T * in,
device U * out,
const constant size_t & axis_size,
const constant size_t & stride,
uint2 gid,
uint2 lid,
uint2 lsize,
uint simd_size )

◆ write_safe()

template<typename U , int N_READS, bool reverse>
void write_safe ( U values[N_READS],
device U * out,
int start,
int total )
inline

◆ write_unsafe()

template<typename U , int N_READS, bool reverse>
void write_unsafe ( U values[N_READS],
device U * out )
inline