Sha256: 67322190521324fe002bc2b681ae5adf171ad0c6d0be7a5245aae74e03bbaf54
Contents?: true
Size: 949 Bytes
Versions: 1
Compression:
Stored size: 949 Bytes
Contents
#ifndef CUMO_BIT_KERNEL_H #define CUMO_BIT_KERNEL_H typedef BIT_DIGIT dtype; typedef BIT_DIGIT rtype; #define m_zero 0 #define m_one 1 #define m_abs(x) (x) #define m_sign(x) (((x)==0) ? 0:1) #define m_from_double(x) (((x)==0) ? 0 : 1) #define m_from_real(x) (((x)==0) ? 0 : 1) #define m_from_sint(x) (((x)==0) ? 0 : 1) #define m_from_int32(x) (((x)==0) ? 0 : 1) #define m_from_int64(x) (((x)==0) ? 0 : 1) #define m_from_uint32(x) (((x)==0) ? 0 : 1) #define m_from_uint64(x) (((x)==0) ? 0 : 1) #define m_data_to_num(x) INT2FIX(x) #define m_sprintf(s,x) sprintf(s,"%1d",(int)(x)) #define m_copy(x) (x) #define m_not(x) (~(x)) #define m_and(x,y) ((x)&(y)) #define m_or(x,y) ((x)|(y)) #define m_xor(x,y) ((x)^(y)) #define m_eq(x,y) (~((x)^(y))) #define m_count_true(x) ((x)!=0) #define m_count_true_cpu(x) m_count_true(x) #define m_count_false(x) ((x)==0) #define m_count_false_cpu(x) m_count_false(x) #endif // CUMO_BIT_KERNEL_H
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cumo-0.1.0 | ext/cumo/include/cumo/types/bit_kernel.h |