Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Halide::SimdOpCheckTest Class Referenceabstract

#include <simd_op_check.h>

Public Types

using Sharder = Halide::Internal::Test::Sharder
 

Public Member Functions

 SimdOpCheckTest (const Target t, int w, int h)
 
virtual ~SimdOpCheckTest ()=default
 
void set_seed (int seed)
 
virtual bool can_run_code () const
 
virtual void compile_and_check (Func error, const std::string &op, const std::string &name, int vector_width, const std::vector< Argument > &arg_types, std::ostringstream &error_msg)
 
bool wildcard_match (const char *p, const char *str) const
 
bool wildcard_match (const std::string &p, const std::string &str) const
 
bool wildcard_search (const std::string &p, const std::string &str) const
 
Target get_run_target () const
 
TestResult check_one (const std::string &op, const std::string &name, int vector_width, Expr e)
 
void check (std::string op, int vector_width, Expr e)
 
virtual void add_tests ()=0
 
virtual int image_param_alignment ()
 
virtual bool use_multiple_threads () const
 
virtual bool test_all ()
 

Static Public Member Functions

template<typename SIMDOpCheckT >
static int main (int argc, char **argv, const std::vector< Target > &targets_to_test)
 

Public Attributes

const Expr max_u32 = UInt(32).max()
 
std::string filter {"*"}
 
std::string output_directory {Internal::get_test_tmp_dir()}
 
std::vector< Tasktasks
 
Target target
 
int W
 
int H
 
int rng_seed
 

Static Public Attributes

static constexpr int max_i8 = 127
 
static constexpr int max_i16 = 32767
 
static constexpr int max_i32 = 0x7fffffff
 
static constexpr int max_u8 = 255
 
static constexpr int max_u16 = 65535
 

Detailed Description

Definition at line 72 of file simd_op_check.h.

Member Typedef Documentation

◆ Sharder

Constructor & Destructor Documentation

◆ SimdOpCheckTest()

Halide::SimdOpCheckTest::SimdOpCheckTest ( const Target t,
int w,
int h )
inline

◆ ~SimdOpCheckTest()

virtual Halide::SimdOpCheckTest::~SimdOpCheckTest ( )
virtualdefault

Member Function Documentation

◆ set_seed()

void Halide::SimdOpCheckTest::set_seed ( int seed)
inline

Definition at line 103 of file simd_op_check.h.

References rng_seed.

◆ can_run_code()

◆ compile_and_check()

virtual void Halide::SimdOpCheckTest::compile_and_check ( Func error,
const std::string & op,
const std::string & name,
int vector_width,
const std::vector< Argument > & arg_types,
std::ostringstream & error_msg )
inlinevirtual

◆ wildcard_match() [1/2]

bool Halide::SimdOpCheckTest::wildcard_match ( const char * p,
const char * str ) const
inline

Definition at line 199 of file simd_op_check.h.

References wildcard_match().

Referenced by check(), wildcard_match(), wildcard_match(), and wildcard_search().

◆ wildcard_match() [2/2]

bool Halide::SimdOpCheckTest::wildcard_match ( const std::string & p,
const std::string & str ) const
inline

Definition at line 229 of file simd_op_check.h.

References wildcard_match().

◆ wildcard_search()

bool Halide::SimdOpCheckTest::wildcard_search ( const std::string & p,
const std::string & str ) const
inline

Definition at line 234 of file simd_op_check.h.

References wildcard_match().

Referenced by compile_and_check().

◆ get_run_target()

Target Halide::SimdOpCheckTest::get_run_target ( ) const
inline

◆ check_one()

◆ check()

void Halide::SimdOpCheckTest::check ( std::string op,
int vector_width,
Expr e )
inline

Definition at line 441 of file simd_op_check.h.

References filter, tasks, and wildcard_match().

◆ add_tests()

virtual void Halide::SimdOpCheckTest::add_tests ( )
pure virtual

Referenced by test_all().

◆ image_param_alignment()

virtual int Halide::SimdOpCheckTest::image_param_alignment ( )
inlinevirtual

Definition at line 458 of file simd_op_check.h.

Referenced by check_one().

◆ use_multiple_threads()

virtual bool Halide::SimdOpCheckTest::use_multiple_threads ( ) const
inlinevirtual

Definition at line 462 of file simd_op_check.h.

Referenced by test_all().

◆ test_all()

virtual bool Halide::SimdOpCheckTest::test_all ( )
inlinevirtual

◆ main()

template<typename SIMDOpCheckT >
static int Halide::SimdOpCheckTest::main ( int argc,
char ** argv,
const std::vector< Target > & targets_to_test )
inlinestatic

Member Data Documentation

◆ max_i8

int Halide::SimdOpCheckTest::max_i8 = 127
staticconstexpr

Definition at line 74 of file simd_op_check.h.

◆ max_i16

int Halide::SimdOpCheckTest::max_i16 = 32767
staticconstexpr

Definition at line 75 of file simd_op_check.h.

◆ max_i32

int Halide::SimdOpCheckTest::max_i32 = 0x7fffffff
staticconstexpr

Definition at line 76 of file simd_op_check.h.

◆ max_u8

int Halide::SimdOpCheckTest::max_u8 = 255
staticconstexpr

Definition at line 77 of file simd_op_check.h.

◆ max_u16

int Halide::SimdOpCheckTest::max_u16 = 65535
staticconstexpr

Definition at line 78 of file simd_op_check.h.

◆ max_u32

const Expr Halide::SimdOpCheckTest::max_u32 = UInt(32).max()

Definition at line 79 of file simd_op_check.h.

◆ filter

std::string Halide::SimdOpCheckTest::filter {"*"}

Definition at line 81 of file simd_op_check.h.

Referenced by check().

◆ output_directory

std::string Halide::SimdOpCheckTest::output_directory {Internal::get_test_tmp_dir()}

Definition at line 82 of file simd_op_check.h.

Referenced by check_one(), and compile_and_check().

◆ tasks

std::vector<Task> Halide::SimdOpCheckTest::tasks

Definition at line 83 of file simd_op_check.h.

Referenced by check(), and test_all().

◆ target

Target Halide::SimdOpCheckTest::target

◆ W

int Halide::SimdOpCheckTest::W

Definition at line 87 of file simd_op_check.h.

Referenced by check_one().

◆ H

int Halide::SimdOpCheckTest::H

Definition at line 88 of file simd_op_check.h.

Referenced by check_one().

◆ rng_seed

int Halide::SimdOpCheckTest::rng_seed

Definition at line 90 of file simd_op_check.h.

Referenced by check_one(), and set_seed().


The documentation for this class was generated from the following file: