목록 분류 전체보기 (299)
정적 스코프 : 컴파일 시에 결정되는 가장 가까운 바깥쪽의 스코프 변수 값으로 처리 동적 스코프 : 컴파일 시 자료형 체크 불가능 : 대개 인터프리티드 언어에서 사용되는 방식 : 스택을 이용해서 호출되는 스코프들을 쌓고 가장 가까운 것의 변수 값이 바인딩 int count = 10; void foo2(){ print(count); } void foo1(){ int count = 20; foo2(); } main(){ foo1(); } // 정적 스코핑 : foo2의 출력은 count = 10 // 동적 스코핑 : foo2의 출력은 count = 20
- Binding Times : 언어 설계 (language design time) : 연산자와 연산 바인딩 : 언어 구현 (language implementation time) : 데이터 타입과 데이터 값 바인딩 : 프로그램 작성 (program writing time) : 알고리즘, 데이터 구조, 모듈 바인딩 : 컴파일 (compile time) : 변수와 데이터 유형 바인딩 : 링크 (link time) : 메모리 내의 프로그램 전체 라이브러리, 모듈 확정 : 로드 (load time) : 물리적 주소 선택 : 실행 (run time) : 변수에 메모리가 위치한 값 바인딩
constructor ary = new int*[count_rows]; for (int i = 0; i
/// matmul_op.cc #endif // GOOGLE_CUDA template class MatMulOp : public OpKernel { public: explicit MatMulOp(OpKernelConstruction* ctx) : OpKernel(ctx), algorithms_set_already_(false) { OP_REQUIRES_OK(ctx, ctx->GetAttr("transpose_a", &transpose_a_)); OP_REQUIRES_OK(ctx, ctx->GetAttr("transpose_b", &transpose_b_)); LaunchMatMul::GetBlasGemmAlgorithm( ctx, &algorithms_, &algorithms_set_already_); ..
/// matmul_op.cc 1468 REGISTER_KERNEL_BUILDER #if defined(INTEL_MKL) // math kernel library TF_CALL_float(REGISTER_CPU_EIGEN); #else TF_CALL_float(REGISTER_CPU); #define REGISTER_CPU_EIGEN(T) \ REGISTER_KERNEL_BUILDER( \ Name("MatMul").Device(DEVICE_CPU).TypeConstraint("T").Label("eigen"), \ MatMulOp); #define REGISTER_CPU(T) \ REGISTER_KERNEL_BUILDER( \ Name("MatMul").Device(DEVICE_CPU).TypeCon..
암시적으로 생성자가 호출되면서 발생할 수 있는 의도치 않은 형 변환을 막기 위해 생성자의 명시적 호출을 강제하기 위한 키워드
/// REGISTER_KERNEL_BUILDER(Name("SparseApplyAdadelta") \ .Device(DEVICE_CPU) \ .TypeConstraint("T") \ .TypeConstraint("Tindices"), \ SparseApplyAdadeltaOp); /// #define REGISTER_KERNEL_BUILDER_UNIQ(ctr, kernel_builder, ...) \ constexpr bool should_register_##ctr##__flag = \ SHOULD_REGISTER_OP_KERNEL(#__VA_ARGS__); \ static ::tensorflow::kernel_factory::OpKernelRegistrar \ registrar__body__##ctr..