小编abh*_*nav的帖子

如何用gcc编译SIMD代码

我在SIMD中为Matrix乘法编写了这段代码,我可以在Visual Studio中编译,但现在我需要使用gcc/g ++在Ubuntu中编译它.

我应该使用哪些命令来编译它?我是否需要对代码本身进行任何更改?

#include <stdio.h>
#include <stdlib.h>
#include <xmmintrin.h>
#include <iostream>
#include <conio.h>
#include <math.h>
#include <ctime>

using namespace std;

#define MAX_NUM 1000
#define MAX_DIM 252

int main()
{
    int l = MAX_DIM, m = MAX_DIM, n = MAX_DIM;
    __declspec(align(16)) float a[MAX_DIM][MAX_DIM], b[MAX_DIM][MAX_DIM],c[MAX_DIM][MAX_DIM],d[MAX_DIM][MAX_DIM];

    srand((unsigned)time(0));

    for(int i = 0; i < l; ++i)
    {
        for(int j = 0; j < m; ++j)
        {
            a[i][j] = rand()%MAX_NUM;
        }
    }

    for(int i = 0; i < m; ++i)
    {
        for(int j = …
Run Code Online (Sandbox Code Playgroud)

c++ gcc g++ simd

5
推荐指数
1
解决办法
8363
查看次数

关闭后,从模态MFC对话框中获取编辑框文本

从模态MFC对话框,我想在关闭对话框后从编辑框中提取文本.我试过这个:

CPreparationDlg Dlg;
CString m_str;

m_pMainWnd = &Dlg;
Dlg.DoModal();
CWnd *pMyDialog=AfxGetMainWnd();
CWnd *pWnd=pMyDialog->GetDlgItem(IDC_EDIT1);
pWnd->SetWindowText("huha max");
return TRUE;
Run Code Online (Sandbox Code Playgroud)

这是行不通的.

mfc modal-dialog visual-c++

3
推荐指数
1
解决办法
2万
查看次数

Div元素不会在css中换行

ID=content 的 Div 标签不会换行。它会像这样进入标题行。 在此处输入图片说明

谁能解释一下为什么会这样??,以及如何将其放在新行中?

<html>

<head>
<title> Home Page </title>

<style>

#wrapper
{
    width:70%;
    margin: 0 auto;
}

#header .Nav  
{
    width:60%;
    float:right;
}

#header .Nav ul a
{
    margin: 0 3%;
    float:right;
    text-decoration:none;
}

#header .logo
{
    width=40%;
    float:left;
}

.title
{
    float:left;
    width:30%;
}

.main_content
{
    float:right;
    width:70%;
}


</style>


</head>

<body>

<div id="wrapper" >

    <div id="header">

        <a href="/" class="logo"><img src="./logo.gif" alt="Zach Woomer" /></a>

        <div class="Nav">


        <ul>

            <a href="./contact.htm">Home</a> 
            <a href="./contact.htm">About US</a> 
            <a href="./contact.htm">Products</a>
            <a href="./contact.htm">Contact US</a> …
Run Code Online (Sandbox Code Playgroud)

html css css-float

2
推荐指数
1
解决办法
4938
查看次数

标签 统计

c++ ×1

css ×1

css-float ×1

g++ ×1

gcc ×1

html ×1

mfc ×1

modal-dialog ×1

simd ×1

visual-c++ ×1