Home
last modified time | relevance | path

Searched refs:sem (Results 1 – 25 of 542) sorted by relevance

12345678910>>...22

/third_party/skia/third_party/externals/tint/src/resolver/
Dresolver_constants_test.cc25 using Scalar = sem::Constant::Scalar;
35 auto* sem = Sem().Get(expr); in TEST_F() local
36 EXPECT_NE(sem, nullptr); in TEST_F()
37 EXPECT_TRUE(sem->Type()->Is<sem::I32>()); in TEST_F()
38 EXPECT_EQ(sem->ConstantValue().Type(), sem->Type()); in TEST_F()
39 EXPECT_EQ(sem->ConstantValue().ElementType(), sem->Type()); in TEST_F()
40 ASSERT_EQ(sem->ConstantValue().Elements().size(), 1u); in TEST_F()
41 EXPECT_EQ(sem->ConstantValue().Elements()[0].i32, 99); in TEST_F()
50 auto* sem = Sem().Get(expr); in TEST_F() local
51 EXPECT_NE(sem, nullptr); in TEST_F()
[all …]
Dstruct_layout_test.cc37 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
38 ASSERT_NE(sem, nullptr); in TEST_F()
39 EXPECT_EQ(sem->Size(), 12u); in TEST_F()
40 EXPECT_EQ(sem->SizeNoPadding(), 12u); in TEST_F()
41 EXPECT_EQ(sem->Align(), 4u); in TEST_F()
42 ASSERT_EQ(sem->Members().size(), 3u); in TEST_F()
43 EXPECT_EQ(sem->Members()[0]->Offset(), 0u); in TEST_F()
44 EXPECT_EQ(sem->Members()[0]->Align(), 4u); in TEST_F()
45 EXPECT_EQ(sem->Members()[0]->Size(), 4u); in TEST_F()
46 EXPECT_EQ(sem->Members()[1]->Offset(), 4u); in TEST_F()
[all …]
Dresolver_behavior_test.cc45 auto* sem = Sem().Get(stmt); in TEST_F() local
46 EXPECT_EQ(sem->Behaviors(), in TEST_F()
47 sem::Behaviors(sem::Behavior::kDiscard, sem::Behavior::kNext)); in TEST_F()
56 auto* sem = Sem().Get(stmt); in TEST_F() local
57 EXPECT_EQ(sem->Behaviors(), in TEST_F()
58 sem::Behaviors(sem::Behavior::kDiscard, sem::Behavior::kNext)); in TEST_F()
67 auto* sem = Sem().Get(stmt); in TEST_F() local
68 EXPECT_EQ(sem->Behaviors(), in TEST_F()
69 sem::Behaviors(sem::Behavior::kDiscard, sem::Behavior::kNext)); in TEST_F()
85 auto* sem = Sem().Get(stmt); in TEST_F() local
[all …]
Dis_host_shareable_test.cc28 EXPECT_FALSE(r()->IsHostShareable(create<sem::Void>())); in TEST_F()
32 EXPECT_FALSE(r()->IsHostShareable(create<sem::Bool>())); in TEST_F()
36 EXPECT_TRUE(r()->IsHostShareable(create<sem::I32>())); in TEST_F()
37 EXPECT_TRUE(r()->IsHostShareable(create<sem::U32>())); in TEST_F()
38 EXPECT_TRUE(r()->IsHostShareable(create<sem::F32>())); in TEST_F()
42 EXPECT_TRUE(r()->IsHostShareable(create<sem::Vector>(create<sem::I32>(), 2))); in TEST_F()
43 EXPECT_TRUE(r()->IsHostShareable(create<sem::Vector>(create<sem::I32>(), 3))); in TEST_F()
44 EXPECT_TRUE(r()->IsHostShareable(create<sem::Vector>(create<sem::I32>(), 4))); in TEST_F()
45 EXPECT_TRUE(r()->IsHostShareable(create<sem::Vector>(create<sem::U32>(), 2))); in TEST_F()
46 EXPECT_TRUE(r()->IsHostShareable(create<sem::Vector>(create<sem::U32>(), 3))); in TEST_F()
[all …]
Dresolver.h58 namespace sem {
93 bool IsPlain(const sem::Type* type) const;
97 bool IsStorable(const sem::Type* type) const;
101 bool IsHostShareable(const sem::Type* type) const;
107 std::set<std::pair<const sem::Struct*, ast::StorageClass>>
147 sem::Type* const sem; member
167 sem::Type* GetImportData(const Source& src,
179 sem::Expression* IndexAccessor(const ast::IndexAccessorExpression*);
180 sem::Expression* Binary(const ast::BinaryExpression*);
181 sem::Expression* Bitcast(const ast::BitcastExpression*);
[all …]
Dresolver.cc164 sem::Type* Resolver::Type(const ast::Type* ty) { in Type()
166 auto* s = [&]() -> sem::Type* { in Type()
168 return builder_->create<sem::Void>(); in Type()
171 return builder_->create<sem::Bool>(); in Type()
174 return builder_->create<sem::I32>(); in Type()
177 return builder_->create<sem::U32>(); in Type()
180 return builder_->create<sem::F32>(); in Type()
184 if (auto* vector = builder_->create<sem::Vector>(el, t->width)) { in Type()
194 if (auto* column_type = builder_->create<sem::Vector>(el, t->rows)) { in Type()
196 builder_->create<sem::Matrix>(column_type, t->columns)) { in Type()
[all …]
Dis_storeable_test.cc28 EXPECT_FALSE(r()->IsStorable(create<sem::Void>())); in TEST_F()
32 EXPECT_TRUE(r()->IsStorable(create<sem::Bool>())); in TEST_F()
33 EXPECT_TRUE(r()->IsStorable(create<sem::I32>())); in TEST_F()
34 EXPECT_TRUE(r()->IsStorable(create<sem::U32>())); in TEST_F()
35 EXPECT_TRUE(r()->IsStorable(create<sem::F32>())); in TEST_F()
39 EXPECT_TRUE(r()->IsStorable(create<sem::Vector>(create<sem::I32>(), 2))); in TEST_F()
40 EXPECT_TRUE(r()->IsStorable(create<sem::Vector>(create<sem::I32>(), 3))); in TEST_F()
41 EXPECT_TRUE(r()->IsStorable(create<sem::Vector>(create<sem::I32>(), 4))); in TEST_F()
42 EXPECT_TRUE(r()->IsStorable(create<sem::Vector>(create<sem::U32>(), 2))); in TEST_F()
43 EXPECT_TRUE(r()->IsStorable(create<sem::Vector>(create<sem::U32>(), 3))); in TEST_F()
[all …]
Dstruct_pipeline_stage_use_test.cc35 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
36 ASSERT_NE(sem, nullptr); in TEST_F()
37 EXPECT_TRUE(sem->PipelineStageUses().empty()); in TEST_F()
47 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
48 ASSERT_NE(sem, nullptr); in TEST_F()
49 EXPECT_TRUE(sem->PipelineStageUses().empty()); in TEST_F()
59 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
60 ASSERT_NE(sem, nullptr); in TEST_F()
61 EXPECT_TRUE(sem->PipelineStageUses().empty()); in TEST_F()
74 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
[all …]
Dstruct_storage_class_use_test.cc35 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
36 ASSERT_NE(sem, nullptr); in TEST_F()
37 EXPECT_TRUE(sem->StorageClassUsage().empty()); in TEST_F()
47 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
48 ASSERT_NE(sem, nullptr); in TEST_F()
49 EXPECT_THAT(sem->StorageClassUsage(), in TEST_F()
60 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
61 ASSERT_NE(sem, nullptr); in TEST_F()
62 EXPECT_THAT(sem->StorageClassUsage(), in TEST_F()
73 auto* sem = TypeOf(s)->As<sem::Struct>(); in TEST_F() local
[all …]
Dcompound_statement_test.cc43 ASSERT_TRUE(s->Block()->Is<sem::FunctionBlockStatement>()); in TEST_F()
44 EXPECT_EQ(s->Block(), s->FindFirstParent<sem::BlockStatement>()); in TEST_F()
45 EXPECT_EQ(s->Block(), s->FindFirstParent<sem::FunctionBlockStatement>()); in TEST_F()
65 EXPECT_TRUE(s->Is<sem::BlockStatement>()); in TEST_F()
67 EXPECT_EQ(s->Parent(), s->FindFirstParent<sem::FunctionBlockStatement>()); in TEST_F()
73 EXPECT_EQ(s->Block(), s->FindFirstParent<sem::BlockStatement>()); in TEST_F()
75 s->FindFirstParent<sem::FunctionBlockStatement>()); in TEST_F()
76 ASSERT_TRUE(s->Block()->Parent()->Is<sem::FunctionBlockStatement>()); in TEST_F()
101 EXPECT_TRUE(s->Is<sem::LoopStatement>()); in TEST_F()
102 EXPECT_EQ(s->Parent(), s->FindFirstParent<sem::FunctionBlockStatement>()); in TEST_F()
[all …]
Dresolver_constants.cc31 sem::Constant Resolver::EvaluateConstantValue(const ast::Expression* expr, in EvaluateConstantValue()
32 const sem::Type* type) { in EvaluateConstantValue()
42 sem::Constant Resolver::EvaluateConstantValue( in EvaluateConstantValue()
44 const sem::Type* type) { in EvaluateConstantValue()
61 sem::Constant Resolver::EvaluateConstantValue(const ast::CallExpression* call, in EvaluateConstantValue()
62 const sem::Type* type) { in EvaluateConstantValue()
63 auto* vec = type->As<sem::Vector>(); in EvaluateConstantValue()
75 if (elem_type->Is<sem::I32>()) { in EvaluateConstantValue()
76 return sem::Constant(type, sem::Constant::Scalars(result_size, 0)); in EvaluateConstantValue()
78 if (elem_type->Is<sem::U32>()) { in EvaluateConstantValue()
[all …]
Dvar_let_test.cc64 ASSERT_TRUE(TypeOf(i)->Is<sem::Reference>()); in TEST_F()
65 ASSERT_TRUE(TypeOf(u)->Is<sem::Reference>()); in TEST_F()
66 ASSERT_TRUE(TypeOf(f)->Is<sem::Reference>()); in TEST_F()
67 ASSERT_TRUE(TypeOf(b)->Is<sem::Reference>()); in TEST_F()
68 ASSERT_TRUE(TypeOf(s)->Is<sem::Reference>()); in TEST_F()
69 ASSERT_TRUE(TypeOf(a)->Is<sem::Reference>()); in TEST_F()
71 EXPECT_TRUE(TypeOf(i)->As<sem::Reference>()->StoreType()->Is<sem::I32>()); in TEST_F()
72 EXPECT_TRUE(TypeOf(u)->As<sem::Reference>()->StoreType()->Is<sem::U32>()); in TEST_F()
73 EXPECT_TRUE(TypeOf(f)->As<sem::Reference>()->StoreType()->Is<sem::F32>()); in TEST_F()
74 EXPECT_TRUE(TypeOf(b)->As<sem::Reference>()->StoreType()->Is<sem::Bool>()); in TEST_F()
[all …]
/third_party/FreeBSD/sys/compat/linuxkpi/common/src/
Dlinux_semaphore.c39 int _sema_init(losMutexDef_t *sem, unsigned int value) in _sema_init() argument
44 if ((sem == NULL) || (value > OS_SEM_COUNT_MAX)) { in _sema_init()
53 sem->sem = GET_SEM(semHandle); in _sema_init()
58 int _sema_lock(losMutexDef_t *sem) in _sema_lock() argument
62 if ((sem == NULL) || (sem->sem == NULL)) { in _sema_lock()
66 if ((UINTPTR)sem->sem == UNINIT_VALUE) { in _sema_lock()
67 if (_sema_init(sem, sem->count) != 0) { in _sema_lock()
72 ret = LOS_SemPend(sem->sem->semID, LOS_WAIT_FOREVER); in _sema_lock()
80 int _sema_trylock(losMutexDef_t *sem) in _sema_trylock() argument
84 if ((sem == NULL) || (sem->sem == NULL)) { in _sema_trylock()
[all …]
/third_party/skia/third_party/externals/tint/src/
Dintrinsic_table.cc46 class Any : public Castable<Any, sem::Type> {
109 bool Type(uint32_t idx, const sem::Type* ty) { in Type()
124 const sem::Type* Type(uint32_t idx) const { in Type()
149 std::unordered_map<uint32_t, const sem::Type*> types_;
186 const sem::Type* Type(const sem::Type* ty);
220 virtual const sem::Type* Match(MatchState& state,
221 const sem::Type* type) const = 0;
254 const sem::Type* Match(MatchState& state, in Match()
255 const sem::Type* type) const override { in Match()
296 using ParameterUsage = sem::ParameterUsage;
[all …]
DBUILD.gn381 "sem/array.h",
382 "sem/atomic_type.h",
383 "sem/behavior.h",
384 "sem/binding_point.h",
385 "sem/bool_type.h",
386 "sem/call.h",
387 "sem/call_target.h",
388 "sem/constant.h",
389 "sem/depth_multisampled_texture_type.h",
390 "sem/depth_texture_type.h",
[all …]
/third_party/FreeBSD/sys/compat/linuxkpi/common/include/linux/
Dsemaphore.h44 LosSemCB *sem; member
53 extern int _sema_lock(losMutexDef_t *sem);
54 extern int _sema_unlock(losMutexDef_t *sem);
55 extern int _sema_init(losMutexDef_t *sem, unsigned int value);
56 extern int _sema_destory(losMutexDef_t *sem);
57 extern int _sema_trylock(losMutexDef_t *sem);
59 #define init_MUTEX(sem) _sema_init((losMutexDef_t*)(sem), 1) argument
60 #define destory_MUTEX(sem) _sema_destory((losMutexDef_t*)(sem)) argument
61 #define init_MUTEX_LOCKED(sem) (VOID)_sema_init((losMutexDef_t*)(sem), 0); argument
62 #define down(sem) _sema_lock((losMutexDef_t*)(sem)) argument
[all …]
/third_party/skia/third_party/externals/tint/src/writer/
Dappend_vector.cc32 const sem::Call* call = nullptr;
33 const sem::TypeConstructor* ctor = nullptr;
36 VectorConstructorInfo AsVectorConstructor(const sem::Expression* expr) { in AsVectorConstructor()
37 if (auto* call = expr->As<sem::Call>()) { in AsVectorConstructor()
38 if (auto* ctor = call->Target()->As<sem::TypeConstructor>()) { in AsVectorConstructor()
39 if (ctor->ReturnType()->Is<sem::Vector>()) { in AsVectorConstructor()
47 const sem::Expression* Zero(ProgramBuilder& b, in Zero()
48 const sem::Type* ty, in Zero()
49 const sem::Statement* stmt) { in Zero()
51 if (ty->Is<sem::I32>()) { in Zero()
[all …]
/third_party/skia/third_party/externals/tint/tools/src/cmd/intrinsic-gen/resolver/
Dresolve.go28 s *sem.Sem
31 functions map[string]*sem.Function
32 enumEntryMatchers map[*sem.EnumEntry]*sem.EnumMatcher
36 func Resolve(a *ast.AST) (*sem.Sem, error) {
39 s: sem.New(),
41 functions: map[string]*sem.Function{},
42 enumEntryMatchers: map[*sem.EnumEntry]*sem.EnumMatcher{},
79 s := &sem.Enum{
92 entry := &sem.EnumEntry{
118 t := &sem.Type{
[all …]
/third_party/skia/third_party/externals/tint/src/writer/glsl/
Dgenerator_impl.cc418 if (auto* func = target->As<sem::Function>()) { in EmitCall()
421 if (auto* intrinsic = target->As<sem::Intrinsic>()) { in EmitCall()
424 if (auto* cast = target->As<sem::TypeConversion>()) { in EmitCall()
427 if (auto* ctor = target->As<sem::TypeConstructor>()) { in EmitCall()
436 const sem::Call* call, in EmitFunctionCall()
437 const sem::Function* func) { in EmitFunctionCall()
479 const sem::Call* call, in EmitIntrinsicCall()
480 const sem::Intrinsic* intrinsic) { in EmitIntrinsicCall()
485 if (intrinsic->Type() == sem::IntrinsicType::kSelect) { in EmitIntrinsicCall()
488 if (intrinsic->Type() == sem::IntrinsicType::kDot) { in EmitIntrinsicCall()
[all …]
/third_party/skia/third_party/externals/tint/docs/
Dcompound_statements.md22 sem::IfStatement {
24 sem::BlockStatement {
27 sem::ElseStatement {
29 sem::BlockStatement {
33 sem::ElseStatement {
34 sem::BlockStatement {
52 sem::ForLoopStatement {
53 sem::Statement initializer
54 sem::Expression condition
55 sem::Statement continuing
[all …]
/third_party/skia/third_party/externals/tint/tools/src/cmd/intrinsic-gen/gen/
Dpermutate.go29 sem *sem.Sem member
30 allTypes []sem.FullyQualifiedName
34 func buildPermuter(s *sem.Sem) (*Permuter, error) {
36 allTypes := []sem.FullyQualifiedName{}
43 allTypes = append(allTypes, sem.FullyQualifiedName{Target: ty})
46 sem: s,
53 sem.Overload // The permutated overload signature
59 func (p *Permuter) Permute(overload *sem.Overload) ([]Permutation, error) {
62 closedTypes: map[sem.TemplateParam]sem.FullyQualifiedName{},
63 closedNumbers: map[sem.TemplateParam]interface{}{},
[all …]
/third_party/libuv/src/unix/
Dthread.c446 int uv_sem_init(uv_sem_t* sem, unsigned int value) { in uv_sem_init() argument
449 err = semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, value); in uv_sem_init()
462 void uv_sem_destroy(uv_sem_t* sem) { in uv_sem_destroy() argument
463 if (semaphore_destroy(mach_task_self(), *sem)) in uv_sem_destroy()
468 void uv_sem_post(uv_sem_t* sem) { in uv_sem_post() argument
469 if (semaphore_signal(*sem)) in uv_sem_post()
474 void uv_sem_wait(uv_sem_t* sem) { in uv_sem_wait() argument
478 r = semaphore_wait(*sem); in uv_sem_wait()
486 int uv_sem_trywait(uv_sem_t* sem) { in uv_sem_trywait() argument
493 err = semaphore_timedwait(*sem, interval); in uv_sem_trywait()
[all …]
/third_party/node/deps/uv/src/unix/
Dthread.c446 int uv_sem_init(uv_sem_t* sem, unsigned int value) { in uv_sem_init() argument
449 err = semaphore_create(mach_task_self(), sem, SYNC_POLICY_FIFO, value); in uv_sem_init()
462 void uv_sem_destroy(uv_sem_t* sem) { in uv_sem_destroy() argument
463 if (semaphore_destroy(mach_task_self(), *sem)) in uv_sem_destroy()
468 void uv_sem_post(uv_sem_t* sem) { in uv_sem_post() argument
469 if (semaphore_signal(*sem)) in uv_sem_post()
474 void uv_sem_wait(uv_sem_t* sem) { in uv_sem_wait() argument
478 r = semaphore_wait(*sem); in uv_sem_wait()
486 int uv_sem_trywait(uv_sem_t* sem) { in uv_sem_trywait() argument
493 err = semaphore_timedwait(*sem, interval); in uv_sem_trywait()
[all …]
/third_party/skia/third_party/externals/tint/src/writer/msl/
Dgenerator_impl.cc91 const sem::Type* curr_type, in ScopedBitCast()
92 const sem::Type* target_type) in ScopedBitCast()
94 auto* target_vec_type = target_type->As<sem::Vector>(); in ScopedBitCast()
140 sem::BindingPoint{0, buffer_size_ubo_index}); in Sanitize()
143 auto* global = in->Sem().Get<sem::GlobalVariable>(var); in Sanitize()
263 bool GeneratorImpl::EmitTypeDecl(const sem::Type* ty) { in EmitTypeDecl()
264 if (auto* str = ty->As<sem::Struct>()) { in EmitTypeDecl()
413 auto signed_type_of = [&](const sem::Type* ty) -> const sem::Type* { in EmitBinary()
415 return builder_.create<sem::I32>(); in EmitBinary()
416 } else if (auto* v = ty->As<sem::Vector>()) { in EmitBinary()
[all …]
/third_party/lwip/test/unit/arch/
Dsys_arch.c75 sys_sem_new(sys_sem_t *sem, u8_t count) in sys_sem_new() argument
77 LWIP_ASSERT("sem != NULL", sem != NULL); in sys_sem_new()
78 *sem = count + 1; in sys_sem_new()
83 sys_sem_free(sys_sem_t *sem) in sys_sem_free() argument
85 LWIP_ASSERT("sem != NULL", sem != NULL); in sys_sem_free()
86 *sem = 0; in sys_sem_free()
90 sys_sem_set_invalid(sys_sem_t *sem) in sys_sem_set_invalid() argument
92 LWIP_ASSERT("sem != NULL", sem != NULL); in sys_sem_set_invalid()
93 *sem = 0; in sys_sem_set_invalid()
98 sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) in sys_arch_sem_wait() argument
[all …]

12345678910>>...22