const Type * DeclSpecs::GetBaseType(SourcePos pos) const { const Type *retType = baseType; if (retType == NULL) { Warning(pos, "No type specified in declaration. Assuming int32."); retType = AtomicType::UniformInt32->GetAsUnboundVariabilityType(); } if (vectorSize > 0) { const AtomicType *atomicType = CastType<AtomicType>(retType); if (atomicType == NULL) { Error(pos, "Only atomic types (int, float, ...) are legal for vector " "types."); return NULL; } retType = new VectorType(atomicType, vectorSize); } retType = lApplyTypeQualifiers(typeQualifiers, retType, pos); if (soaWidth > 0) { const StructType *st = CastType<StructType>(retType); if (st == NULL) { Error(pos, "Illegal to provide soa<%d> qualifier with non-struct " "type \"%s\".", soaWidth, retType->GetString().c_str()); return NULL; } else if (soaWidth <= 0 || (soaWidth & (soaWidth - 1)) != 0) { Error(pos, "soa<%d> width illegal. Value must be positive power " "of two.", soaWidth); return NULL; } if (st->IsUniformType()) { Error(pos, "\"uniform\" qualifier and \"soa<%d>\" qualifier can't " "both be used in a type declaration.", soaWidth); return NULL; } else if (st->IsVaryingType()) { Error(pos, "\"varying\" qualifier and \"soa<%d>\" qualifier can't " "both be used in a type declaration.", soaWidth); return NULL; } else retType = st->GetAsSOAType(soaWidth); if (soaWidth < g->target.vectorWidth) PerformanceWarning(pos, "soa<%d> width smaller than gang size %d " "currently leads to inefficient code to access " "soa types.", soaWidth, g->target.vectorWidth); } return retType; }
const AllTypeVariant LZ4Segment<T>::operator[](const ChunkOffset chunk_offset) const { PerformanceWarning("operator[] used"); DebugAssert(chunk_offset < size(), "Passed chunk offset must be valid."); const auto typed_value = get_typed_value(chunk_offset); if (!typed_value) { return NULL_VALUE; } return *typed_value; }
namespace opossum { bool PerformanceWarningClass::_disabled = []() { // NOLINT // static initializer hack to print some warnings in various binaries #if HYRISE_DEBUG PerformanceWarning("Hyrise is running as a debug build."); #endif return false; }(); } // namespace opossum