PandA-2024.02
Data Structures | Macros | Functions
qsort.c File Reference
#include <limits.h>
#include <stdlib.h>
Include dependency graph for qsort.c:

Go to the source code of this file.

Data Structures

struct  stack_node
 

Macros

#define SWAP(a, b, size)
 
#define MAX_THRESH   4
 
#define STACK_SIZE   (CHAR_BIT * sizeof(size_t))
 
#define PUSH(low, high)   ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
 
#define POP(low, high)   ((void) (--top, (low = top->lo), (high = top->hi)))
 
#define STACK_NOT_EMPTY   (stack < top)
 
#define min(x, y)   ((x) < (y) ? (x) : (y))
 

Functions

void _quicksort (void *const pbase, size_t total_elems, size_t size, int(*cmp)(const void *, const void *, void *), void *arg)
 

Macro Definition Documentation

◆ MAX_THRESH

#define MAX_THRESH   4

Definition at line 42 of file qsort.c.

Referenced by _quicksort().

◆ min

#define min (   x,
 
)    ((x) < (y) ? (x) : (y))

Referenced by _quicksort(), Range::abs(), tree_helper::AccessedMinimunBitsize(), Range::add(), Bit_Value::backward_transfer(), module_binding_check< vertex_type >::check_edge_compatibility(), simple_code_motion::CheckMovable(), StateTransitionGraphManager::ComputeCyclesCount(), tree_manipulation::CreateNopExpr(), tree_manipulation::CreateUnsigned(), mux_connection_binding::determine_connection(), IR_lowering::division_by_a_constant(), HWDiscrepancyAnalysis::Exec(), RTS_based_clique_covering< vertex_type >::exec(), Bit_Value::forward_transfer(), Range::fromBitValues(), AllocationInformation::get_attribute_of_fu_per_op(), memory::get_first_address(), TTT_maximal_weighted_clique< Graph >::get_weighted_maximal_cliques(), TTT_maximal_weighted_clique_fast< Graph >::get_weighted_maximal_cliques(), Range::getBitValues(), AllocationInformation::GetNodeTypePrec(), BB_based_stg::InternalExec(), RemoveEndingIf::InternalExec(), parametric_list_based::InternalExec(), cdfc_module_binding::InternalExec(), tree_helper::IsPositiveIntegerValue(), laplacian(), main(), Range::Not(), Bit_Value_opt::optimize(), Range::sat_add(), Range::sat_sub(), HLS_constraints::set_max_registers(), Range::shl(), Range::shr(), tree_helper::Size(), Range::SMax(), Range::SMin(), sobel(), fu_binding::specialise_fu(), Range::srem(), Range::sub(), BitLatticeManipulator::sup(), synth_mult(), RealRange::toFloat32(), Range::UMax(), Range::UMin(), module_binding_check< vertex_type >::update_after_join(), Range::usat_add(), Range::usat_sub(), vcd_parser::vcd_add_signal(), enumeral_type::visit(), integer_type::visit(), fu_binding::write_init(), port_o::xload(), and signal_o::xload().

◆ POP

#define POP (   low,
  high 
)    ((void) (--top, (low = top->lo), (high = top->hi)))

Definition at line 58 of file qsort.c.

Referenced by _quicksort().

◆ PUSH

#define PUSH (   low,
  high 
)    ((void) ((top->lo = (low)), (top->hi = (high)), ++top))

Definition at line 57 of file qsort.c.

Referenced by _quicksort().

◆ STACK_NOT_EMPTY

#define STACK_NOT_EMPTY   (stack < top)

Definition at line 59 of file qsort.c.

Referenced by _quicksort().

◆ STACK_SIZE

#define STACK_SIZE   (CHAR_BIT * sizeof(size_t))

Definition at line 56 of file qsort.c.

Referenced by _quicksort().

◆ SWAP

#define SWAP (   a,
  b,
  size 
)
Value:
do \
{ \
size_t __size = (size); \
char *__a = (a), *__b = (b); \
do \
{ \
char __tmp = *__a; \
*__a++ = *__b; \
*__b++ = __tmp; \
} while (--__size > 0); \
} while (0)

Definition at line 27 of file qsort.c.

Referenced by _quicksort().

Function Documentation

◆ _quicksort()

void _quicksort ( void *const  pbase,
size_t  total_elems,
size_t  size,
int(*)(const void *, const void *, void *)  cmp,
void *  arg 
)

Definition at line 87 of file qsort.c.


Generated on Mon Feb 12 2024 13:02:58 for PandA-2024.02 by doxygen 1.8.13